I'm having problems using child windows inside child windows. Thre creation works, but the window doesn't respond to any interaction. What I'm trying to do is a main window which has several child windows (like files, kinda) which have 1 text edit child window each. If I create the text edit as a normal window, or as a child to the main window it works fine, but when I create it as a child to a child window it doesn't work at all. Is this not even possible to do?
Code:
//Sets the text window styles
Style = WS_BORDER | WS_CAPTION | WS_SIZEBOX | WS_SYSMENU | WS_VISIBLE;
Style |= WS_MINIMIZEBOX | WS_MAXIMIZEBOX;
Style |= WS_CHILD | WS_CLIPSIBLINGS;
//Sets the starting location
StartWidth = 300;
StartHeight = 200;
StartX = 10;
StartY = 10;
//Creates the text window
TempWindow = CreateWindowEx(0, TextWindowClassName, "Unnamed", Style,
StartX, StartY, StartWidth, StartHeight,
MainWindow, NULL, GetModuleHandle(NULL), NULL);
//Aborts on creation failure
if(TempWindow == NULL)
{
Magos::Error.SetMessage("Unable to create text window!");
return FALSE;
}
//Sets the text edit styles
Style = ES_MULTILINE | ES_WANTRETURN | ES_LEFT | WS_VISIBLE;
Style |= WS_CHILD | WS_HSCROLL | WS_VSCROLL | ES_AUTOHSCROLL | ES_AUTOVSCROLL;
//Creates the text edit
TempTextWindow.TextEdit = CreateWindowEx(0, "EDIT", "Testing...", Style, 0, 0,
StartWidth, StartHeight, TempWindow,
reinterpret_cast<HMENU>(TextEditId),
GetModuleHandle(NULL), NULL);