• Advertisement
Sign in to follow this  

Unity TreeView Control Not Showing

This topic is 4285 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post


Link to post
Share on other sites
Advertisement
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).

Share this post


Link to post
Share on other sites
Quote:
Original post by Endurion
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).
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.

Share this post


Link to post
Share on other sites
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)?

Share this post


Link to post
Share on other sites
Quote:
Original post by Endurion
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)?
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Quote:
Original post by Galapaegos
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?
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]

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
Quote:
Original post by Endurion
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?
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]

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
Quote:
Original post by Endurion
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?
Well, at least now we know it's supposed to be working. :)

Not using any different styles between the two apps. The DeleteAllItems you mentioned, though... I was using that on startup, and it was being called even before there were any items in the tree (whoops!). Not sure if that was the problem, but we'll see. I made that change and uploaded a new version of the MapMaker (check PM again).

With the window proc, I am processing WM_NOTIFY messages with the treeview control, but every case exits out and passes its info on to the default window proc. I don't think my message handling is messed up.

Anyway, let me know if that new upload works. Thanks again!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
  • Advertisement
  • Popular Tags

  • Advertisement
  • Popular Now

  • Similar Content

    • By Innoc uous
      I'm working on a space game, and I suck at art. I would love to get some help from someone who is more skilled than me. Things I need include modular space ship parts and GUI elements. Nothing too fancy, just functional so I can get a prototype put together. This could potentially become a serious project, but for now this is just a hobby project.
       
      In this video, you can see a few things I already completed
      :2018-02-24 20-08-13.flv2018-02-24 20-08-13.flv
    • By Innoc uous
      If you want to incorporate noise into your shaders, the Turbulance Library has you covered. Using code I gathered from this library, I made a cginc file that contains all you need to easily implement noise into your unity shaders. Who knows how this stuff works, but man, does it work well!
       
      https://pastebin.com/LLCUpJut
       
      Here is an example of what you can create using these noise functions.
       
    • By Nio Martinez
      I'll be buying a new laptop as my workstation for building games, Mostly 3D but not hard core. 
       
      I'm stuck at choosing between these 2 specs below. Does this really matter and if so, can some one tell my how and why it matters. 
      Choice1:
      Intel core i5-8250U (8th gen Kabylake refresh)(6 MB Smart Cache, 1.6 GHz Base with Turbo Boost up to 3.4 GHz) 4 cores 8 threads
      RAM 8 GB DDR4 (2400 MHz)
      GPU 2 GB DDR5 Nvidia MX150 256 bit
      SSD: yes
      Choice2:
      Intel core i7-7500U 2.70GHz Base Processor (4M Cache, up to 3.50 GHz Boost) 2 Cores, 4 Threads
      RAM 4 GB DDR4 (1800 MHz)
      GPU 2 GB DDR5 Nvidia GeForce 940MX 256 bit
      SSD: No
       
    • By Manuel Berger
      Hello fellow devs!
      Once again I started working on an 2D adventure game and right now I'm doing the character-movement/animation. I'm not a big math guy and I was happy about my solution, but soon I realized that it's flawed.
      My player has 5 walking-animations, mirrored for the left side: up, upright, right, downright, down. With the atan2 function I get the angle between player and destination. To get an index from 0 to 4, I divide PI by 5 and see how many times it goes into the player-destination angle.

      In Pseudo-Code:
      angle = atan2(destination.x - player.x, destination.y - player.y) //swapped y and x to get mirrored angle around the y axis
      index = (int) (angle / (PI / 5));
      PlayAnimation(index); //0 = up, 1 = up_right, 2 = right, 3 = down_right, 4 = down

      Besides the fact that when angle is equal to PI it produces an index of 5, this works like a charm. Or at least I thought so at first. When I tested it, I realized that the up and down animation is playing more often than the others, which is pretty logical, since they have double the angle.

      What I'm trying to achieve is something like this, but with equal angles, so that up and down has the same range as all other directions.

      I can't get my head around it. Any suggestions? Is the whole approach doomed?

      Thank you in advance for any input!
       
    • By devbyskc
      Hi Everyone,
      Like most here, I'm a newbie but have been dabbling with game development for a few years. I am currently working full-time overseas and learning the craft in my spare time. It's been a long but highly rewarding adventure. Much of my time has been spent working through tutorials. In all of them, as well as my own attempts at development, I used the audio files supplied by the tutorial author, or obtained from one of the numerous sites online. I am working solo, and will be for a while, so I don't want to get too wrapped up with any one skill set. Regarding audio, the files I've found and used are good for what I was doing at the time. However I would now like to try my hand at customizing the audio more. My game engine of choice is Unity and it has an audio mixer built in that I have experimented with following their tutorials. I have obtained a great book called Game Audio Development with Unity 5.x that I am working through. Half way through the book it introduces using FMOD to supplement the Unity Audio Mixer. Later in the book, the author introduces Reaper (a very popular DAW) as an external program to compose and mix music to be integrated with Unity. I did some research on DAWs and quickly became overwhelmed. Much of what I found was geared toward professional sound engineers and sound designers. I am in no way trying or even thinking about getting to that level. All I want to be able to do is take a music file, and tweak it some to get the sound I want for my game. I've played with Audacity as well, but it didn't seem to fit the bill. So that is why I am looking at a better quality DAW. Since being solo, I am also under a budget contraint. So of all the DAW software out there, I am considering Reaper or Presonus Studio One due to their pricing. My question is, is investing the time to learn about using a DAW to tweak a sound file worth it? Are there any solo developers currently using a DAW as part of their overall workflow? If so, which one? I've also come across Fabric which is a Unity plug-in that enhances the built-in audio mixer. Would that be a better alternative?
      I know this is long, and maybe I haven't communicated well in trying to be brief. But any advice from the gurus/vets would be greatly appreciated. I've leaned so much and had a lot of fun in the process. BTW, I am also a senior citizen (I cut my programming teeth back using punch cards and Structured Basic when it first came out). If anyone needs more clarification of what I am trying to accomplish please let me know.  Thanks in advance for any assistance/advice.
  • Advertisement