All pastes #113172 Raw Edit

Someone

public text v1 · immutable
·published 2006-08-03 12:17 UTC
rendered paste body
case WM_CREATE:
			{
				MessageBox(hwnd, "WM_CREATE passed", "INFO", MB_OK);
				GetClientRect(hwnd, &rect);

				WNDCLASS wc;
				memset(&wc, 0, sizeof(WNDCLASS));
				wc.hbrBackground       = (HBRUSH)COLOR_WINDOW+1;
				wc.hIcon               = NULL;
				wc.lpfnWndProc         = ChildProc;
				wc.lpszClassName       = "SubClass";
   				RegisterClass(&wc);

				hChild = CreateWindowEx(
					WS_EX_CLIENTEDGE,
					wc.lpszClassName,
					0,
					WS_CHILD | WS_VISIBLE,
					10, 20, 30, 30, //x y xW yW
					hwnd,
					NULL,
					GetModuleHandle(0),
					0
				);
				if (!hChild)
				{
					char buffer[100];
					sprintf(buffer, "Fatal errorcode: %d\r\n", GetLastError());
					MessageBox(hwnd, buffer, "FATAL ERROR", MB_OK|MB_ICONERROR);
				}
			}
			break;