Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / November 2004

Tip: Looking for answers? Try searching our database.

Treeview in MDI app

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bonj - 18 Nov 2004 21:01 GMT
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?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.