Okay, I'm sure this sounds like a beginner question, but when I run into problems it's always something that looks very easy AFTER I know the answer.
According to the debug watch, DataStructure doesn't get initialized.
I've tried using "@pst." in place of "DataStructure." but the debug watch shows the value of the pointer (not the variable) in wMonth, wDay, and wYear.
I don't really care which message is being processed. If anything happens in the calendar window I want to update the GLOBAL MailingDate.
Thank you for looking at this for me.
Stan
Code:
CALLBACK FUNCTION ShowCalendarProc() LOCAL DataStructure AS SYSTEMTIME LOCAL pst AS SYSTEMTIME POINTER CalendarHandle = CBHNDL pst = VARPTR(DataStructure) SELECT CASE AS LONG CBMSG CASE %WM_INITDIALOG ' Initialization handler CASE %WM_NCACTIVATE STATIC hWndSaveFocus AS DWORD IF ISFALSE CBWPARAM THEN ' Save control focus hWndSaveFocus = GetFocus() ELSEIF hWndSaveFocus THEN ' Restore control focus SetFocus(hWndSaveFocus) hWndSaveFocus = 0 END IF CASE %WM_COMMAND ' Process control notifications MonthCal_GetCurSel(CalendarHandle, pst) MailingDate = TRIM$(STR$(DateStructure.wMonth)) & "/" _ & TRIM$(STR$(DateStructure.wDay)) & "/" _ & TRIM$(STR$(DateStructure.wYear)) END SELECT END FUNCTION
I've tried using "@pst." in place of "DataStructure." but the debug watch shows the value of the pointer (not the variable) in wMonth, wDay, and wYear.
I don't really care which message is being processed. If anything happens in the calendar window I want to update the GLOBAL MailingDate.
Thank you for looking at this for me.
Stan
Comment