BCX_DATEPICK function
Purpose: BCX_DATEPICK creates a date and time picker control. The date is displayed in long format, which produces output like "Friday, April 19, 1996".
Syntax: hCtl = BCX_DATEPICK(Text$, _ hWndParent, _ hCtlID%, _ Xpos%, _ Ypos%, _ Width%, _ Height% _ [,WinStyle%] _ [,ExWinStyle%]) Parameters:
Return Value:
|
Remarks: The default window Style for a BCX_DATEPICK control also can be changed by using the MODSTYLE function.
Example
GUI"Datepick"GLOBALForm1ASHandleGLOBALDatepickASHandleSUBFORMLOAD Form1=BCX_FORM("Datepicker",0,0,120,15)Datepick=BCX_DATEPICK("", Form1,1002,0,0,120,12, _ WS_CHILD | WS_TABSTOP | WS_VISIBLE | DTS_SHORTDATECENTURYFORMAT)CENTER(Form1)SHOW(Form1)ENDSUBBEGINEVENTSSELECTCASECBMSGCASEWM_NOTIFYDIMRAWlpNMFormat=(LPNMDATETIMEFORMAT)lParamASLPNMDATETIMEFORMATIFlpNMFormat->nmhdr.idFrom=1002THENIFlpNMFormat->nmhdr.code=DTN_DATETIMECHANGETHENDIMRAWlpChange=(LPNMDATETIMECHANGE)lParamASLPNMDATETIMECHANGEDIMtimASSYSTEMTIME SendMessage(Datepick, DTM_GETSYSTEMTIME,0,&tim)BCX_SET_TEXTForm1,"Date is "+TRIM$(STR$(tim.wMonth))+"/"_+TRIM$(STR$(tim.wDay))+"/"_+TRIM$(STR$(tim.wYear))ENDIFENDIFENDSELECTENDEVENTS
For another example of the BCX_DATEPICK function see Demo.bas in the BCX\Gui_Demo\EZ_Gui folder.