Everytime I create a Tree-view it shows up fine. I can put items in it very easily. When I add a WM_COMMAND message it stops working. No items are visible. What could be wrong?
Everytime I create a Tree-view it shows up fine. I can put items in it very easily. When I add a WM_COMMAND message it stops working. No items are visible. What could be wrong?
Website(s): http://www16.brinkster.com/trifaze/
E-mail: [email protected]
---------------------------------
C++ Environment: MSVC++ 6.0; Dev-C++ 4.0/4.1
DirectX Version: 9.0b
DX SDK: DirectX 8.1 SDK
When something is added it sends a WM_COMMAND. So, when the WM_COMMAND is processed and zero is returned Windows thinks you added it manually. What you need to do is create another switch statement.
If you do not process the msg then you need to return 1 else return 0. I think this will fix the problem you are having.Code://Inside WndProc switch(msg){ //More cases case WM_COMMAND: switch(HIWORD(wParam)){ //This is the notification message //Put cases based on control return 0; } default: return 1; //Finish switches
- Sean
If cities were built like software is built, the first woodpecker to come along would level civilization.
Black Frog Studios
>>When something is added it sends a WM_COMMAND.
My understanding is Treeviews return thru WM_NOTIFY not WM_COMMAND
Hence the TVN_XXXX msg's (TreeView Notify)
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill