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:
01392570
Views:
41
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...
     Function WindowProc(ByVal hw As Long, ByVal uMsg As Long, _
         ByVal wParam As Long, ByVal lParam As Long) As Long
          Dim MinMax As MINMAXINFO

          'Check for request for min/max window sizes.
          If uMsg = WM_GETMINMAXINFO Then
              'Retrieve default MinMax settings
              CopyMemoryToMinMaxInfo MinMax, lParam, Len(MinMax)

              'Specify new minimum size for window.
              MinMax.ptMinTrackSize.x = 200
              MinMax.ptMinTrackSize.y = 200

              'Specify new maximum size for window.
              MinMax.ptMaxTrackSize.x = 500
              MinMax.ptMaxTrackSize.y = 500

              'Copy local structure back.
              CopyMemoryFromMinMaxInfo lParam, MinMax, Len(MinMax)

              WindowProc = DefWindowProc(hw, uMsg, wParam, lParam)
          Else
              WindowProc = CallWindowProc(lpPrevWndProc, hw, uMsg, _
                 wParam, lParam)
          End If
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform