We have implemented several windows messages to allow users to interact with the calendar. You may also view the header file which contains all the windows messages.
Available Messages
WM_USER=0x0400
// Checks all the calendar databases
UM_CHECK_DATABASES = 0x0400+101
// Display the calendar. You can also specify the month to display by setting the WPARAM
parameter.
// (0) default month , (1) January - (12) December, (13) Monthly
UM_SHOW_CALENDAR = 0x0400+10
WPARAM = Month (0-13)
LPARAM = Year(>1900)
// Displays the find window for the calendar
UM_FIND_OCCASIONS = 0x0400+11
// Updates all the opened windows of IDEAL Calendar
UM_UPDATE_WINDOWS = 0x0400+12
// Displays the weekly events window
UM_VIEW_WEEKLY_EVENTS = 0x0400+13
Example Code
The code below calls one of the windows messages available. To send the messages
sucessfully, IDEAL Calendar must be running.
| CWnd* pWnd; // Find the calendar window // Be sure to include the space at the end of the IDEAL Calendar // string. pWnd = FindWindow(NULL, "IDEAL Calendar "); //Check to see if the window was found. This should not be a problem if //IDEAL Calendar is open. if (pWnd) { // PostMessage or SendMessage will work fine // Sets the month displayed to March (pWnd)->SendMessage(UM_SHOW_CALENDAR, 3); } |
The code is not doing very much. To get the window handle, you must
find the window. This is done by calling the FindWindow function and supplying
"IDEAL Calendar " as the Note: Be sure to include a space at the end of the IDEAL Calenar find string. If the window is found successfully, the show calendar message will be invoked and |
See Also
(Visual
C++) Message Sample