-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmdialog.cpp
43 lines (37 loc) · 863 Bytes
/
tmdialog.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
TMDIALOG.CPP
Copyright (c) 1994 Shawn Halpenny
All rights reserved.
Source code module for TModelessDialog class.
*/
#ifndef __WOLF_H
#include <wolf.h>
#endif
//done
TModelessDialog::TModelessDialog(PTWindowObject pParent, int nID) : TDialog(pParent, nID)
{
lpfnDlgProc = NULL;
WndClass.cbWndExtra = DLGWINDOWEXTRA;
SetFlags(WB_SYSTEMCLASS | WB_KBHANDLER, TRUE);
} //TModelessDialog::TModelessDialog
//done
BOOL TModelessDialog::Create()
{
Register();
if (!hWindow)
{
SetGlobalWindowObject(this);
hWindow = CreateDialog(pApplication->hInstance, MAKEINTRESOURCE(nID), pParent->hWindow, TDialog::DlgProc);
return hWindow != NULL;
}
return FALSE;
} //TModelessDialog::Create
//done
void TModelessDialog::Destroy(int nStatus)
{
if (CanClose())
{
DestroyWindow(hWindow);
this->nStatus = nStatus;
}
} //TModelessDialog::Destroy