No I am doing it all through the CreateWindowEx function my code :
Code:
void Setup_Edit (Window* window, Edit & edit, char const * caption, int x, int y, int width, int height, int ID, DWORD exStyle)
{
edit._style = WS_CHILD | WS_VISIBLE;
edit._caption = caption;
edit._exStyle = exStyle;
edit._x = x; // horizontal position of Button
edit._y = y; // vertical position od Button
edit._width = width; // Button width
edit._height = height; // Button height
edit._hWndParent = window->hWnd; // handle to parent or owner Button
edit._data = 0; // pointer to Button-creation data
edit._ID = ID;
Create_Edit(window, edit);
}
HWND Create_Edit (Window* window, Edit & edit)
{
edit.hwnd = ::CreateWindowEx (
edit._exStyle,
"EDIT",
edit._caption,
edit._style,
edit._x,
edit._y,
edit._width,
edit._height,
edit._hWndParent,
(HMENU) edit._ID,
window->init.application->hInstance,
edit._data);
if (edit.hwnd == 0)
TerminateApplication(window);
return edit.hwnd;
}
. . .
Setup_Edit(m_window, menu->login.UserName, "User Name", ((m_window->init.width / 2) + 3), 200, 150, 50, IDC_LUSERNAME, 0);
Looks like that