Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CallWindowProc and WM_GetMinMaxInfo
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01392525
Message ID:
01392585
Views:
87
This message has been marked as the solution to the initial question of the thread.
Matt,

Try
lnMinTrackSizeX = loWas.Long2NumFromBuffer(lParam+24) 
lnMinTrackSizeY = loWas.Long2NumFromBuffer(lParam+28) 
lnMaxTrackSizeX = loWas.Long2NumFromBuffer(lParam+32) 
lnMaxTrackSizeY = loWas.Long2NumFromBuffer(lParam+36) 
...

lnMinTrackSizeX = 200
lnMinTrackSizeY = 200

lnMaxTrackSizeX = 500
lnMaxTrackSizeY = 500

WITH loWas
	lcNewMinMax = 	.Num2Long(lnMinTrackSizeX) + ;
			.Num2Long(lnMinTrackSizeY) + ;
			.Num2Long(lnMaxTrackSizeX) + ;
			.Num2Long(lnMaxTrackSizeY)
ENDWITH 					

* Copy values back to lParam at offset 24
= SYS(2600, lParam+24, 16, lcNewMinMax)

* For testing, retrieve again to verify that they're set correctly
lnMinTrackSizeX = loWas.Long2NumFromBuffer(lParam+24) 
lnMinTrackSizeY = loWas.Long2NumFromBuffer(lParam+28) 
lnMaxTrackSizeX = loWas.Long2NumFromBuffer(lParam+32) 
lnMaxTrackSizeY = loWas.Long2NumFromBuffer(lParam+36) 
>You, my friend, are a wizard. <g> Thank you! That worked like a charm. I should've caught the event bound parameters problem, but I just haven't have to deal with Structures and Pointers enough to be 100% comfortable with them yet.
>
>So if I can trouble you for one more thing, the MS documentation says that you can change the value in the struct, thereby setting the window's min or max size, which is my goal for this. I've got VB reference code below, but I'm more than a little unclear on how to translate it to VFP...
>
<snip>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform