Edit control not displaying

I am trying to display an edit control in one of my windows. Here is an excerpt of the window procedure:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
	
LRESULT CALLBACK InfoProc(HWND infoWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{	
	HDC hdc;
	PAINTSTRUCT ps;
	static HWND hShapeType, hBase, hHeight;

switch(msg)
	{
	case WM_CREATE:
		hShapeType = CreateWindow(TEXT("shape type"),NULL,
			WS_CHILD | WS_VISIBLE | WS_BORDER | ES_LEFT |
			ES_AUTOHSCROLL | ES_AUTOVSCROLL,0,0,300,600,
			infoWnd,(HMENU)ID_SHAPETYPE,(HINSTANCE)GetWindowLong(infoWnd,GWL_HINSTANCE),NULL);
		return 0;

Please remember this is an excerpt, don't tell me that I am missing brackets. For some reason the edit control will not display at all. Please take a look at how it is defined and see if I am doing anything incorrectly.

It may also be useful to know that infoWnd is a window that is the child of the top level mainWnd, and hShapeType is intended to be a child of infoWnd.

Thanks in advance...
Last edited on
I got it to work. I had to change the lpClassName argument of CreateWindow to TEXT("EDIT).
Topic archived. No new replies allowed.