home *** CD-ROM | disk | FTP | other *** search
- /**********************************************
- HTBCALENDAR.DLL
-
- htbcalendar.cpp
-
- TransEra Corporation 1999.
- This is the source for the HTBCalendar Dll.
- ***********************************************/
- #include "stdafx.h"
- #include "HTBCalendar.h"
- #include "ButtonControl.h"
- #include "YMSelector.h"
-
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
-
- BEGIN_MESSAGE_MAP(CHTBCalendarApp, CWinApp)
- //{{AFX_MSG_MAP(CHTBCalendarApp)
- // NOTE - the ClassWizard will add and remove mapping macros here.
- // DO NOT EDIT what you see in these blocks of generated code!
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
-
- CHTBCalendarApp::CHTBCalendarApp() {
- }
-
- CHTBCalendarApp theApp;
-
-
- /////////////////////////////////////////////////////////////////////////////
- /*
- Function: Calendar
-
- Description: displays calendar
-
- Return type: void
- Argument: char * sMonthRet
-
- Notes: this function will call the YMSelector class.
- This class will allow the user to select a date
- and the click an ok button. This will return a
- char string to HTBasic.
-
- */
- void Calendar(char * sMonthRet) {
-
- CString sMonth;
- ButtonControl Dlg; // Make Handle to Dialog Box.
- Dlg.DoModal(); // Do it!
- sMonth.Format("%s %d, %d", // Format CString Month, Day, Year.
- Dlg.m_ButtonControl.GetMonthString(), // Get String containing Month.
- Dlg.m_ButtonControl.GetDate(), // Get int representation of the Day.
- Dlg.m_ButtonControl.GetYear()); // Get int representation of Year.
-
- strcpy(sMonthRet, sMonth); // Copy data to return string.
-
- }