   TreeView Control Not Showing
  Posted about this problem a while ago in this post.Basically, I have a program that makes use of a tree view control, and everything runs fine until the application is run on another computer. Sometimes, what will happen is that the tree view control won't even show (see screenshot).I've seen this issue occur in both version 5 and 6 of the Common Control library, and I've looked into a couple fixes and a few other miscellaneous ones (such as the target computer not being up-to-date through Windows Update, or not having the most current .NET installed), but so far nothing has helped. Any ideas/suggestions would be appreciated; I'll try anything! Thanks.Edit: program was written in C++ on MSVC++ 2005 and uses Win32 and OpenGL with hooks and multi-threading.[Edited by - Omega147 on May 30, 2006 2:17:11 AM]
  Is the control created by yourself or are you using a DDX_Control via MFC?If you create it yourself does the Create-call fail? If yes, you can check GetLastError for an idea what might be the cause.Another idea: Are you overriding the WindowProc (or subclass it if you're using Win32 API).   ;Quote:Original post by EndurionIs the control created by yourself or are you using a DDX_Control via MFC?If you create it yourself does the Create-call fail? If yes, you can check GetLastError for an idea what might be the cause.Another idea: Are you overriding the WindowProc (or subclass it if you're using Win32 API).Nope, no MFC for me; application is pure Win32. The create call does not fail; have checked that. And yes, I'm overriding the WindowProc; is there a certain message you think I might not be handling properly? What were your original thoughts on the WindowProc?Edit: made note of my build setup (language, compiler, etc.) above.   ;  There might be some issues when messages are not properly passed on.I just tested your app, and i get the exact issue as you showed in your screenshot. If it helps i can do some debugging for you.Using the Spy i can see that the tree control is obviously there and also correctly sized. I wonder if the adding of the items somehow is borked.Edit: I notice odd behaviour in general (with activating of windows). Did you mess with the NCPaint methods of the toolbars (e.g. trying to make the toolbars look active like MFC does)?   ;Quote:Original post by EndurionUsing the Spy i can see that the tree control is obviously there and also correctly sized. I wonder if the adding of the items somehow is borked.Edit: I notice odd behaviour in general (with activating of windows). Did you mess with the NCPaint methods of the toolbars (e.g. trying to make the toolbars look active like MFC does)?I think I remember checking to make certain that the items were being added properly, but I'll test that again and get back to you.With the activating of windows, I'm not messing with WM_NCPAINT messages (tried to a while back, yet they didn't give me the result I wanted), but I am sending WM_NCACTIVATE messages to my windows to indeed replicate MFC's style of active toolbars. I obviously still don't have that style achieved yet, but that shouldn't be causing me problems (although, I do see how in some remote manner it could be the problem; will tinker with that).For the moment, my assumption is that there's something on the target computer that needs to be registered with the application. The reason I say that is because I've noticed on several computers where this bug with the treeview did occur, after running the application a couple of times (or on the next day), the treeview would show, as if a DLL had been registered or something else of the likes. And, I do indeed have in my embedded manifest an entry which tells the target computer to use version 6 of the common controls instead of 5. But, that new version is just so I can get the XP look-and-feel. The treeview shouldn't have problems displaying if version 6 can't be registered, because it will default to version 5 and the only difference between 6 and 5 is that 6 has the new xp style; nothing else has changed, according to Microsoft.Anyway, those are my only speculations for the moment. Any debugging you could do on the executable would be most appreciated. Thanks.   ;  Omega147,If it helps, you could always use dependency walker to find out the libraries and versions on the two different machines and compare the difference? I ran your application, everything looked fine (except i couldn't save, but oh well).Does this other machine you are running it on have vc 2005?-brad   ;Quote:Original post by GalapaegosIf it helps, you could always use dependency walker to find out the libraries and versions on the two different machines and compare the difference? I ran your application, everything looked fine (except i couldn't save, but oh well).Does this other machine you are running it on have vc 2005?Yes, have used dependency walker many times; no major differences there. The other machine(s) do _not_ have MSVC 2005, as the application has no problems running then. I'm trying to make the executable so that's it distributable to machines that don't have MSVC installed, because that shouldn't be a requirement for anyone to use my program.BTW, what problems were you having with saving?And Endurion, I've uploaded a new version of the program. Changes are listed at the bottom of my other post. I think the image list may have been the culprit (i.e. the icons next to each tree item). Let me know if you still can't see the treeview control.[Edited by - Omega147 on May 30, 2006 7:47:35 PM];  Still won't show up for me (it should be there once you open any map i assume).Can you replicate a mini app with a simple tree control like the one you're using in that app? Just add a few items like you do in the map maker. If it doesn't show up for me as well you can send me the source and i'll take a look (i'm running VS 2003 for now, but have VC 2005 Express installed as well).   ;Quote:Original post by EndurionStill won't show up for me (it should be there once you open any map i assume).Can you replicate a mini app with a simple tree control like the one you're using in that app?Items in the tree control should be viewable at all times, even without a loaded map. And I created a mini app like you suggested. Check your private messages, Endurion, for the download link. Thanks again.[Edited by - Omega147 on June 1, 2006 3:23:08 PM];  Sorry, i was out of town for two days, and just tried your app. The map makers tree does not show up on my private PC as well, but the tree from the sample app works fine.There must be some differences, i'd check any additional styles you're using (i remember hearing about some issue with DeleteAllItems in some cases). Another possible culprit: The window proc. Is there additional handling inside that might result in messages not being passed on?