hey, i have a problem..which you can tell by the title, is that I can't get word wrap to work i'm using an MDI for my program and i'm pretty sure thats whats f*ing me over lol this is my current wordwrap code:
Code:
case ID_OPTIONS_WORDWRAP:
{
//HWND hChild = (HWND)SendMessage(g_hMDIClient, WM_MDIGETACTIVE, 0, 0);
HWND hChild = GetWindow(g_hMDIClient, GW_CHILD);
if (wordwrap == 0)
{
SetWindowLong(hChild, GWL_STYLE, WS_CHILD | WS_VISIBLE | WS_VSCROLL | ES_MULTILINE | ES_AUTOVSCROLL);
SetWindowPos(hChild, HWND_BOTTOM, 0, 0, 320, 240, SWP_NOMOVE | SWP_NOSIZE);
wordwrap = 1;
}
else if (wordwrap == 1)
{
SetWindowLong(hChild, GWL_STYLE, WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL | ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL);
SetWindowPos(hChild, HWND_BOTTOM, 0, 0, 320, 240, SWP_NOMOVE | SWP_NOSIZE);
wordwrap = 0;
}
}
break;
i tried two ways of getting the current child window, they both produce the same results. am i using something wrong? i took some screenshots of what happens: Before | After
i have wordwrap declared as an integer so that i can tell if its on or off. better way to do this? g_hMDIClient is assigned in WndProc as such:
Code:
g_hMDIClient = CreateWindowEx(WS_EX_CLIENTEDGE, "mdiclient", NULL,
WS_CHILD | WS_CLIPCHILDREN | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, hwnd,
(HMENU)IDC_MAIN_MDI, GetModuleHandle(NULL), (LPVOID)&ccs);
thanks in advance