Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ProgressBar Common Controls library from Alexander Grigo
Message
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00648834
Message ID:
00648880
Views:
24
>Hi,
>
>I'm using the progressbar control in the Alexander's Common Controls library.
>
>When I put the progressbar in subclassed form with these properties:
>
>WindowType = 1 (MODAL)
>ShowWindow = 1 (In Top-Level Form)
>
>...the progressbar does not appear. This happens when I add the progressbar to the form both at design time and at run time.
>
>I can access the properties of the control, so it does exist. I'm guessing that it has something to do with the associated _windowhandle class, which is not handling the object's hWnd property correctly.
>
>Can anyone help??
>
>TIA
>MR

Hi Michael,

If you use VFP7 you can just correct the Init method of the _WindowHandle class:
...
	If Type( "ThisForm") = "O"
		.FrameHandle = .GetHWnd( ThisForm, .T.)
		.FormHandle = .GetHWnd( ThisForm)
		If .FormHandle = 0
			.FormHandle = .FrameHandle
		EndIf
	Else
...
change to
...
	If Type( "ThisForm") = "O"
		If Val( _VFP.Version) < 7
			.FrameHandle = .GetHWnd( ThisForm, .T.)
			.FormHandle = .GetHWnd( ThisForm)
		Else
			Declare Integer GetParent In Win32API Integer
			Declare Integer GetWindow In Win32API Integer, Integer

			.FrameHandle = ThisForm.HWnd
			.FormHandle = GetWindow( ThisForm.HWnd, 5)
		EndIf
		If .FormHandle = 0
			.FormHandle = .FrameHandle
		EndIf
	Else
...
this resolves the problem.
But if you use earlier version of VFP you will have to wait a little, I will fix this fault and upload the updated library soon.
Alex
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform