home *** CD-ROM | disk | FTP | other *** search
- /**********************************************
- HTBclock.dll
- TransEra Corporation 1999.
- This is the source for the HTBClock.dll.
-
- ***********************************************/
-
- #include "stdafx.h"
- #include "HTBclock.h"
- #include "lockDlg.h"
- #include "DialogThread.h"
-
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
-
- short g_Xpos;
- short g_Ypos;
- ClockDlg * g_ClockVar;
-
- BEGIN_MESSAGE_MAP(CHTBclockApp, CWinApp)
- //{{AFX_MSG_MAP(CHTBclockApp)
- // 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()
-
- CHTBclockApp::CHTBclockApp()
- {
-
- }
-
- CHTBclockApp theApp;
-
-
- void Clock(short xpos, short ypos)
- {
- g_Xpos = xpos;
- g_Xpos = ypos;
- if (g_ClockVar == NULL) {
- CWinThread * pThread = AfxBeginThread(RUNTIME_CLASS (DialogThread)); // create thread to execute dialog
- }
- }
-
- void Closeclock()
- {
- if (g_ClockVar != NULL)
- {
- g_ClockVar->KillTimer(1); // stop timer from updating dialog
- g_ClockVar->EndDialog(1); // tell dialog to end
- g_ClockVar = NULL; // set pointer to NULL to show no dialog running (dialog is still shutting down)
- }
- }