Hello
hope anybody can shed any light on the following.
I am trying to create a treeview within an MDI application.
I have initted common controls ex, and all messages are correct, I believe.
What I am evenaully trying to achieve is sort of Query Analyzer-style UI,
with a treeview on the left (with a splitter, but I'll cross that bridge
when I come to it), and space for MDI child windows on the right. The MDI
functionality is working successfully, I have created the MDI client window
and can create MDI child windows. I can also create the treeview control,
and it appears to gain an hWnd, but never shows. Instead, the MDI client
window appears to occupy the entirety of the window, even though its left is
given as 110.
The following is the code:
case WM_CREATE:
{
CLIENTCREATESTRUCT ccs;
RECT rcBounds;
INITCOMMONCONTROLSEX iccx;
iccx.dwSize = sizeof(INITCOMMONCONTROLSEX);
iccx.dwICC = ICC_TREEVIEW_CLASSES;
InitCommonControlsEx(&iccx);
GetClientRect(hWnd, &rcBounds);
hWndTreeView = CreateWindow(WC_TREEVIEW, (LPCTSTR)NULL, WS_CHILD,
0, 0, 100, rcBounds.bottom - rcBounds.top, hWnd, (HMENU)NULL, hAppInst,
NULL);
ShowWindow(hWndTreeView, SW_SHOW);
ccs.hWindowMenu = GetSubMenu(GetMenu(hWnd), 1);
ccs.idFirstChild = IDM_WINDOWCHILD;
hWndMDIClient = CreateWindow( _T("MDICLIENT"), (LPCTSTR) NULL,
WS_CHILD | WS_CLIPCHILDREN | WS_VSCROLL
| WS_HSCROLL,
110, 0, 0, 0, hWnd, (HMENU) NULL,
hAppInst, (LPSTR) &ccs );
ShowWindow(hWndMDIClient, SW_SHOW);
return 0;
}
Any suggestions?
Bonj - 18 Nov 2004 23:03 GMT
I think I have solved this ish acutally. (Which is quite good considering I
am drunk.)
> Hello
> hope anybody can shed any light on the following.
[quoted text clipped - 35 lines]
>
> Any suggestions?