Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CallWindowProc and WM_GetMinMaxInfo
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Divers
Thread ID:
01392525
Message ID:
01392677
Vues:
80
Hi Matt,

I just realize that in VFP9 you can retrieve values using combination of SYS(2600) and CTOBIN(). For example you can replace
lnMaxSizeX = loWas.Long2NumFromBuffer(lParam+8) 
* with
lnMaxSizeX = CTOBIN((SYS(2600,lParam+8,4), "RS") 
The BINTOC() can handle conversion in opposite direction
*WITH loWas
*  lcNewMinMax = .Num2Long(lnMinTrackSizeX) + ;
*                .Num2Long(lnMinTrackSizeY) + ;
*                .Num2Long(lnMaxTrackSizeX) + ;
*                .Num2Long(lnMaxTrackSizeY)
*ENDWITH    

lcNewMinMax = BINTOC(lnMinTrackSizeX, "RS") + ;
              BINTOC(lnMinTrackSizeY, "RS") + ;
              BINTOC(lnMaxTrackSizeX, "RS") + ;
              BINTOC(lnMaxTrackSizeY, "RS")
Let me know if it works for you.

>My mistake. I read through your example and understand it much better now and it's working exactly as I'd hoped it would. To explain the "why" a bit - I'm applying constraints on the height and width of the form, based on what edge or corner of the screen the user is resizing. Because the controls inside the form are anchored to resize with the form, I want to keep the user from extending the window (and inner controls) in either dimension beyond a certain aspect ratio. In other words, I want to prevent them from making the screen look really ugly <g>.
>
>This was the last piece I needed to be able to do this. I tried setting Thisform.MaxWidth and ThisForm.MaxHeight inside the the event bound resizing, but that isn't imposed until after the resize is done. This actually interrupts it and sets it during the resize, which is perfect.
>
>Thanks again, Sergey.
>
<snip>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform