home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 8 Other
/
08-Other.zip
/
MEM.ZIP
/
MEMINIT.C
< prev
next >
Wrap
C/C++ Source or Header
|
1989-03-03
|
974b
|
41 lines
#define INCL_PM
#include <os2.h>
#include "mem.h"
extern HAB hAB;
extern HMQ hmqMem;
extern HWND hwndMem;
extern HWND hwndMemFrame;
CHAR szClassName[] = "Memory";
BOOL FAR MemInitApp( VOID )
{
ULONG ctldata;
RECTL rect;
if (!WinRegisterClass( hAB,
(PCH)szClassName,
(PFNWP)MemWndProc,
CS_SYNCPAINT | CS_SIZEREDRAW,
0))
return( 0 );
ctldata = FCF_STANDARD & ~FCF_ACCELTABLE & ~FCF_SHELLPOSITION;
hwndMemFrame = WinCreateStdWindow( HWND_DESKTOP,
WS_VISIBLE,
&ctldata,
(PCH)szClassName,
NULL,
0L,
(HMODULE)NULL,
ID_RESOURCE,
(HWND FAR *)&hwndMem );
WinQueryWindowRect( HWND_DESKTOP, (PRECTL)&rect );
if(!hwndMemFrame)
return(FALSE);
WinSetWindowPos(hwndMemFrame,HWND_TOP,(SHORT)rect.xLeft,(SHORT)rect.yTop
- 70,230,70,SWP_SIZE | SWP_MOVE | SWP_ACTIVATE);
WinShowWindow( hwndMemFrame, TRUE );
return(TRUE);
}