Create an Edit box using CreateWindow
Posted on 2003-03-23
I am trying to create an edit box on a window using the CreateWindow function and the class "Edit". However, the edit box being created is different in looks than edit boxes I create using Dialog Boxes resources. It has no border! I have looked for styles I can put when creating edit boxes but found no style for border, am I missing something? I have had the same problem for buttons, but then only the font was different, and I used a WM_SETFONT message to fix it. Now, the font is wrong too, but I can fix it with a similar message. However, I can't seem to get the border right, please help!
Here is the CreateWindow code:
m_hEditBox = CreateWindow("Edit", "", WS_VISIBLE | WS_CHILD, 5, 5, 100, 100, m_hPlayWindow, NULL, (HINSTANCE)GetWindowLong(m_hPlayWindow, GWL_HINSTANCE), NULL);