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
|
WNDCLASS wc;
wc.style = CS_HREDRAW | CS_VREDRAW;
wc.lpfnWndProc = WindowProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = G_hInstance;
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hbrBackground = (HBRUSH)COLOR_BACKGROUND + 1;
wc.lpszMenuName = NULL;
wc.lpszClassName = G_AppName;
//Register the ChildWindow
if (!RegisterClass(&wc))
{
int result = MessageBox(NULL, TEXT("Could not register the ChildWindow_New"), TEXT("Error"), MB_OK | MB_ICONERROR);
if (result == IDOK)
{
PostQuitMessage(0);
}
}
//Create the Child window
HWND_CHILD_New = CreateWindow(TEXT("Test"),
TEXT("TEST"),
WS_VISIBLE | WS_CHILD | WS_BORDER | WS_OVERLAPPEDWINDOW,
50, 50,
500, 500,
hwnd,
(HMENU)ID_CHILD_NEW,
G_hInstance,
NULL);
//Create the Editbox
HWND_BUTTON_Add = CreateWindow(TEXT("EDIT"),
TEXT("Bitte neuen Befehl eingeben"),
WS_VISIBLE | WS_CHILD | WS_BORDER,
150, 150,
300, 20,
HWND_CHILD_New,
(HMENU)ID_BTN_ADD,
G_hInstance,
NULL);
|