forked from epsylon3/odbgscript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDialogs.cpp
More file actions
34 lines (32 loc) · 791 Bytes
/
Dialogs.cpp
File metadata and controls
34 lines (32 loc) · 791 Bytes
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
INT_PTR CALLBACK InputDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
wchar_t* buffer;
switch(uMsg)
{
case WM_INITDIALOG:
SetDlgItemTextW(hwndDlg, IDC_TITLE, (LPCWSTR) lParam);
SetWindowPos(hwndDlg,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
ollylang->hwndinput=hwndDlg;
return TRUE;
case WM_SHOWWINDOW:
SetFocus(GetDlgItem(hwndDlg, IDC_INPUT));
return TRUE;
case WM_COMMAND:
switch (LOWORD(wParam))
{
case IDOK:
buffer=new wchar_t[256];
if(GetDlgItemText(hwndDlg, IDC_INPUT, buffer, 256))
{
ollylang->hwndinput=0;
EndDialog(hwndDlg, (INT_PTR)buffer);
return TRUE;
}
case IDCANCEL:
ollylang->hwndinput=0;
EndDialog(hwndDlg, 0);
return TRUE;
}
}
return FALSE;
}