This example uses the WinSubclassWindow call to subclass the frame window procedure, so that frame-sizing restrictions can be implemented.

#define INCL_WINWINDOWMGR
#include <OS2.H>
HAB hab;
PFNWP FrameWndProc, OldpFrame;
HWND hwndFrame;


OldpFrame = WinSubclassWindow(hwndFrame,
                                   (PFNWP)FrameWndProc);


MRESULT EXPENTRY FrameWndProc(hwnd, msg, mp1, mp2)
{
         .
         .
         .
   switch(msg) {

     case . . . :
         .
         .
         .

     default:
        OldpFrame(hwnd, msg, mp1, mp2);
  }

}


[Back] [Next]