Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ActiveX comctl32 progressbar - Calling com controls from QM
#1
The following code produces a brief screen flash which looks like it might be the action of the control. Is there a way of calling this control from QM? Some syntax is shown in the status bar - is this from QM or the comctl32.ocx library? Is there expanded help available?

typelib ComctlLib {6B7E6392-850A-101B-AFC0-4210102A8DA7} 1.3
ComctlLib.ProgressBar pSingle

Thanks
#2
Ok, I got a little farther and here I'll stop. Any illumination you could throw on the message and any ways around it would be appreciated. Thanks.

typelib ComctlLib {6B7E6392-850A-101B-AFC0-4210102A8DA7} 1.3
ComctlLib.ProgressBar pSingle
pSingle._create

Error (RT) in Macro: 0x80040112, Class is not licensed for use
#3
To use graphical ActiveX controls in dialogs, you need QM 2.1.7.

http://www.quickmacros.com/history.html

The problem is that the control is not licensed. On my computer, it ran without errors.

Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

typelib ComctlLib {6B7E6392-850A-101B-AFC0-4210102A8DA7} 1.3

if(!ShowDialog("Dialog7" &Dialog7)) ret

;BEGIN DIALOG
;0 "" 0x10C80A44 0x100 0 0 139 38 "Form"
;1 Button 0x54030001 0x4 20 20 48 14 "OK"
;2 Button 0x54030000 0x4 72 20 48 14 "Cancel"
;3 ActiveX 0x54000000 0x0 2 4 132 13 "ComctlLib.ProgressBar"
;END DIALOG
;DIALOG EDITOR: "" 0x2010703 "" ""


ret
;messages
sel message
,case WM_INITDIALOG DT_Init(hDlg lParam)
,ComctlLib.ProgressBar pr3._getcontrol(id(3 hDlg))
,pr3.Value=50
,
,ret 1
,case WM_DESTROY DT_DeleteData(hDlg)
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK DT_Ok hDlg
,case IDCANCEL DT_Cancel hDlg
ret 1
#4
The error message when I try it is --

Error in Macro: unknown identifier.

which refers to Dialog7. Yes, 2.1.7 is correctly installed --TY.

Regards, Bob
#5
Replace both Dialog7 to the name of the function where this code is.

And, as always, to paste this code in QM, use Edit -> Other formats -> Paste escaped.
#6
I created a function called Dialog7, triggered with ctl Q - the results were a form dialog box with OK and Cancel in it and nothing else and the following message in the function message frame--

Cannot create ActiveX control ComctlLib.ProgressBar: Class is not licensed for use.
Error (RT) in Dialog7: ActiveX control is not created

I am using v2.1.7. I'll log on and send you a screen shot of the QM
Thanks for your help.
#7
I tested it on several operating systems. Even on fresh operating systems progress bar is shown without problems. Try to register comctl32.ocx. Open the Type Libraries dialog, click Register, find comctl32.ocx (in c:\Windows\System32 or System), click OK.

In this forum you can also find a dialog with non-ActiveX progress bar.
#8
I re-registered "comctl32.ocx" - same result. I looked for references to "progress" using search and found two threads which did not seem to talk about a non-ActiveX progress bar.
Thanks, Bob
#9
Thanks for all your help. I'm going to install on a Win2K machine, retest and let the forum know. Did you say that there was another COM component progress bar available? Thanks.
Bob
#10
http://www.quickmacros.com/forum/showthread.php?tid=439


Forum Jump:


Users browsing this thread: 2 Guest(s)