Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ActiveX comctl32 progressbar - Calling com controls from QM
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

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

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

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

Copy      Help
function# hDlg message wParam lParam
if(hDlg) goto messages

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

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

;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"
;DIALOG EDITOR: "" 0x2010703 "" ""

sel message
,case WM_INITDIALOG DT_Init(hDlg lParam)
,ComctlLib.ProgressBar pr3._getcontrol(id(3 hDlg))
,ret 1
,case WM_DESTROY DT_DeleteData(hDlg)
,case WM_COMMAND goto messages2
sel wParam
,case IDOK DT_Ok hDlg
,case IDCANCEL DT_Cancel hDlg
ret 1
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
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.
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.
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.
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
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.

Forum Jump:

Users browsing this thread: 1 Guest(s)