home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / MEM.ZIP / MEMINIT.C < prev    next >
C/C++ Source or Header  |  1989-03-03  |  974b  |  41 lines

  1. #define INCL_PM
  2. #include <os2.h>
  3. #include "mem.h"
  4.  
  5. extern HAB     hAB;
  6. extern HMQ     hmqMem;
  7. extern HWND    hwndMem;
  8. extern HWND    hwndMemFrame;
  9. CHAR    szClassName[] = "Memory";
  10. BOOL FAR MemInitApp( VOID )
  11. {
  12.     ULONG ctldata;
  13.     RECTL   rect;
  14.  
  15.      if (!WinRegisterClass( hAB,
  16.                (PCH)szClassName,
  17.                (PFNWP)MemWndProc,
  18.                CS_SYNCPAINT | CS_SIZEREDRAW,
  19.                0))
  20.     return( 0 );
  21.  
  22.     ctldata = FCF_STANDARD &  ~FCF_ACCELTABLE & ~FCF_SHELLPOSITION;
  23.  
  24.     hwndMemFrame = WinCreateStdWindow( HWND_DESKTOP,
  25.                      WS_VISIBLE,
  26.                      &ctldata,
  27.                      (PCH)szClassName,
  28.                      NULL,
  29.                      0L,
  30.                      (HMODULE)NULL,
  31.                      ID_RESOURCE,
  32.                      (HWND FAR *)&hwndMem );
  33.      WinQueryWindowRect( HWND_DESKTOP, (PRECTL)&rect );
  34.     if(!hwndMemFrame)
  35.     return(FALSE);
  36.    
  37. WinSetWindowPos(hwndMemFrame,HWND_TOP,(SHORT)rect.xLeft,(SHORT)rect.yTop 
  38.  - 70,230,70,SWP_SIZE | SWP_MOVE | SWP_ACTIVATE);
  39.     WinShowWindow( hwndMemFrame, TRUE );
  40. return(TRUE);
  41. }