-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathDLDialog.cpp
More file actions
executable file
·58 lines (51 loc) · 1.01 KB
/
DLDialog.cpp
File metadata and controls
executable file
·58 lines (51 loc) · 1.01 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#include "DLDialog.h"
#include "resource1.h"
DLDialog::DLDialog(void)
{
}
DLDialog::~DLDialog(void)
{
}
bool DLDialog::create(HINSTANCE hlnstance,LPCTSTR lpTemplate,HWND hWndParent)
{
hWnd=CreateDialog(hlnstance,lpTemplate,hWndParent,(DLGPROC)DlgProc);
if(!hWnd)
{
DWORD abc=GetLastError();
char ha[256];
ZeroMemory(ha,256);
itoa(abc,ha,10);
MessageBox(NULL,ha,"err",0);
return false;
}
return true;
}
bool DLDialog::show()
{
ShowWindow(hWnd, SW_SHOW);
return true;
}
INT_PTR CALLBACK DlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message)
{
case WM_INITDIALOG:
break;
case WM_SIZE:
{
RECT rc;
GetClientRect(hDlg,&rc);
HWND pitem=GetDlgItem(hDlg,IDC_INPUT);
SetWindowPos(pitem,HWND_TOPMOST,0,0,rc.right,rc.bottom,SWP_NOZORDER|SWP_NOMOVE);
}
break;
case WM_COMMAND:
break;
case WM_CLOSE:
break;
case WM_LBUTTONUP:
break;
}
return false;
//return DefWindowProc(hDlg, message, wParam, lParam);
}