Guidance
指路人
g.yi.org
software / rapidq / Examples / Date & Time / Calendar from COMCTL32.DLL / Calendar from COMCTL32.DLL.bas

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
'From:   "b_j0"  Tue May 6, 2003  6:18 am
'Subject:  Re: Use Calendar (from COMCTL32.DLL) in RapidQ ?

'Here's some code that Wasaywasay/Achilles (?) posted a long time ago.
'I at least fixed it and got it to run in GUI mode. I don't have the
'time to do any more work on it. By the way, UpdateWindow probably
'isn't needed. It works on my OS (Windows 98 SE). Looks like the
'author of BCX didn't deal too much with the SysMonthCal32 class
'either.


'-- Window styles
     CONST WS_CAPTION = &HC00000
     CONST WS_CHILD = &H40000000
     CONST WS_VISIBLE = &H10000000
     CONST WS_BORDER = &H800000
     CONST WS_SYSMENU = &H80000
     CONST WS_THICKFRAME = &H40000
     CONST WS_SIZEBOX = WS_THICKFRAME
     CONST WS_CLIPCHILDREN = &H2000000
     CONST WS_MINIMIZEBOX = &H20000
     CONST WS_MAXIMIZEBOX = &H10000
     CONST WS_EX_DLGMODALFRAME = 1
     CONST WS_EX_NOPARENTNOTIFY = 4
     CONST WS_EX_TOPMOST = 8
     CONST WS_EX_ACCEPTFILES = &H10
     CONST WS_EX_TRANSPARENT = &H20
     CONST WS_EX_MDICHILD = &H40
     CONST WS_EX_TOOLWINDOW = &H80
     CONST WS_EX_WINDOWEDGE = &H100
     CONST WS_EX_CLIENTEDGE = &H200
     CONST WS_EX_CONTEXTHELP = &H400
     CONST WS_EX_RIGHT = &H1000
     CONST WS_EX_LEFT = 0
     CONST WS_EX_RTLREADING = &H2000
     CONST WS_EX_LTRREADING = 0
     CONST WS_EX_LEFTSCROLLBAR = &H4000
     CONST WS_EX_RIGHTSCROLLBAR = 0
     CONST WS_CLIPSIBLINGS=&H4000000
     CONST WS_EX_CONTROLPARENT = &H10000
     CONST WS_EX_STATICEDGE = &H20000
     CONST WS_EX_APPWINDOW = &H40000
     CONST WM_DESTROY = 2

     TYPE INITC
      dwSize AS INTEGER
      dwICC AS INTEGER
     END TYPE
     DIM icex AS INITC

     CONST ICC_DATE_CLASSES=&H100
     ICEx.dwSize = 8
     ICEx.dwICC = ICC_DATE_CLASSES
     DECLARE FUNCTION InitCommonControlsEx LIB "COMCTL32" _
      ALIAS "InitCommonControlsEx" _
      (ICEx AS INITC) AS WORD

     DECLARE FUNCTION CreateWindowEx LIB "USER32" ALIAS "CreateWindowExA" _
      (ExStyle&, ClassName$, WindowName$, Style&, X&, Y&, _
      Width&, Height&, WndParent&, hMenu&, hInstance&, Param&) AS LONG

     DECLARE FUNCTION UpdateWindow LIB "USER32" ALIAS "UpdateWindow" _
      (hWnd AS LONG) AS LONG


     DIM Form AS QFORM
     DIM Handle AS LONG
     DIM Calendar1 AS LONG
     Handle=Form.Handle
     CC=InitCommonControlsEx(ICEx)

     Calendar1 = CreateWindowEx(WS_EX_TOOLWINDOW, "SysMonthCal32", _
      0, WS_CHILD OR WS_VISIBLE OR WS_CLIPCHILDREN OR WS_BORDER OR _
      WS_CLIPSIBLINGS, 0, 0, 200, 200, Handle, 0, 0, 0)

     UpdateWindow(Handle)

     Form.SHOWMODAL
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Tue 2024-12-10  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2003-05-06 07:15:17