home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / OS2BAS.ZIP / WELCOM.BAS < prev    next >
BASIC Source File  |  1989-09-11  |  2KB  |  47 lines

  1. '--------------------------------------------------
  2. ' WELCOM.BAS -- A Program that has a Standard Icon
  3. '--------------------------------------------------
  4. REM $INCLUDE: 'PMBase.BI'
  5. REM $INCLUDE: 'WinFrame.BI'
  6. REM $INCLUDE: 'WinPoint.BI'
  7.  
  8. DIM aqmsg AS QMSG
  9.  
  10. flFrameFlags& = FCFTITLEBAR     OR FCFSYSMENU OR _
  11.         FCFSIZEBORDER     OR FCFMINMAX  OR _
  12.         FCFSHELLPOSITION OR FCFTASKLIST
  13.  
  14. hab& = WinInitialize(0)
  15. hmq& = WinCreateMsgQueue(hab&, 0)
  16.  
  17. hwndFrame& = WinCreateStdWindow (_
  18.              HWNDDESKTOP,_                     ' Parent window handle
  19.              WSVISIBLE,_                       ' Style of frame window
  20.              MakeLong (VARSEG(flFrameFlags&),_ ' Pointer to control data
  21.                        VARPTR(flFrameFlags&)),_
  22.              0,_                               ' Client window class name
  23.              0,_                               ' Title bar text
  24.              0,_                               ' Style of client window
  25.              0,_                               ' Module handle for resources
  26.              0,_                               ' ID of resources
  27.              0)                                ' Pointer to client window handle
  28.  
  29. bool% = WinSendMsg(hwndFrame&, WMSETICON,_
  30.             WinQuerySysPointer(HWNDDESKTOP, SPTRAPPICON, FALSE),_
  31.             0)
  32.  
  33. WHILE (WinGetMsg(hab&, MakeLong(VARSEG(aqmsg), VARPTR(aqmsg)), 0, 0, 0))
  34.   bool% = WinDispatchMsg(hab&, MakeLong(VARSEG(aqmsg), VARPTR(aqmsg)))
  35. WEND
  36.  
  37. bool% = WinDestroyWindow(hwndFrame&)
  38. bool% = WinDestroyMsgQueue(hmq&)
  39. bool% = WinTerminate(hab&)
  40.  
  41. END
  42.  
  43.  
  44. 'ClientWndProc needed to eliminate unresolved externals from REGBAS.LIB
  45. FUNCTION ClientWndProc&(hwnd&, msg%, mp1&, mp2&)
  46. END FUNCTION
  47.