CreateWindow edit not editable

I need to make my create window (type edit) editable. It is shown from a childwindow ChildWndProc. I do not know what I am missing. Any ideas?

1
2
3
4
5
6
7
8
9
10
11
12
LRESULT CALLBACK ChildWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) {
switch(message) {

		   case WM_CREATE: {

hwnd_ed_1 = CreateWindowEx(WS_EX_CLIENTEDGE, "edit", "100",
					WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER | ES_LEFT | ES_NUMBER,
					50, 90, 60, 30,	// x, y, w, h
					hwnd, (HMENU)(100),
					(HINSTANCE) GetWindowLong (hwnd, GWL_HINSTANCE), NULL);
				char szInput[MAX_PATH];
				szString = GetWindowText(GetDlgItem(hwnd, 100), szInput, MAX_PATH);


UPDATE: solved!
1
2
3
4
5
6
7
8
9
hwnd2 = CreateWindowEx(
          WS_EX_CLIENTEDGE,
          g_szClassName2,
          "The title of my childwindow",
			WS_CHILD | WS_VISIBLE | WS_CAPTION
          | WS_SYSMENU | WS_THICKFRAME
          | WS_MINIMIZEBOX | WS_MAXIMIZEBOX,
          CW_USEDEFAULT, CW_USEDEFAULT, 1100, 800,
          hwnd, NULL, hInstance, NULL);


must be

1
2
3
4
5
6
7
8
9
hwnd2 = CreateWindowEx(
          WS_EX_CLIENTEDGE,
          g_szClassName2,
          "The title of my childwindow",
			WS_POPUP | WS_VISIBLE | WS_CAPTION
          | WS_SYSMENU | WS_THICKFRAME
          | WS_MINIMIZEBOX | WS_MAXIMIZEBOX,
          CW_USEDEFAULT, CW_USEDEFAULT, 1100, 800,
          hwnd, NULL, hInstance, NULL);
Last edited on
Topic archived. No new replies allowed.