|
|
1.1.1.2 ! root 1: /*------------------------------------------------ ! 2: WELCOM.C -- A Program that has a Standard Icon ! 3: ------------------------------------------------*/ 1.1 root 4: 1.1.1.2 ! root 5: #define INCL_WIN 1.1 root 6: #include <os2.h> 7: 8: int main (void) 9: { 1.1.1.2 ! root 10: static ULONG flFrameFlags = FCF_TITLEBAR | FCF_SYSMENU | ! 11: FCF_SIZEBORDER | FCF_MINMAX | ! 12: FCF_SHELLPOSITION | FCF_TASKLIST ; ! 13: HAB hab ; ! 14: HMQ hmq ; ! 15: HWND hwndFrame ; ! 16: QMSG qmsg ; 1.1 root 17: 18: hab = WinInitialize (0) ; 19: hmq = WinCreateMsgQueue (hab, 0) ; 20: 21: hwndFrame = WinCreateStdWindow ( 1.1.1.2 ! root 22: HWND_DESKTOP, // Parent window handle ! 23: WS_VISIBLE, // Style of frame window ! 24: &flFrameFlags, // Pointer to control data ! 25: NULL, // Client window class name ! 26: NULL, // Title bar text ! 27: 0L, // Style of client window ! 28: NULL, // Module handle for resources ! 29: 0, // ID of resources ! 30: NULL) ; // Pointer to client window handle ! 31: ! 32: WinSendMsg (hwndFrame, WM_SETICON, ! 33: WinQuerySysPointer (HWND_DESKTOP, SPTR_APPICON, FALSE), ! 34: NULL) ; 1.1 root 35: 36: while (WinGetMsg (hab, &qmsg, NULL, 0, 0)) 37: WinDispatchMsg (hab, &qmsg) ; 38: 39: WinDestroyWindow (hwndFrame) ; 40: WinDestroyMsgQueue (hmq) ; 41: WinTerminate (hab) ; 42: return 0 ; 43: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.