Sign in to follow this  

[C/C++] Win32 api TreeView

This topic is 3574 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

Hi, When I created a treeview using win32 API, when I press the down or up key, the selected item doesn't go up/down. I am developing under Embedded Visual C++ (for smartphone 2003). Please don't reply telling me to use VB or C#.net for smartphone 2003. Does anyone have any idea how to manually detect keypress for the treeview? And how to have the highlighted item to go up and down when user presses the up and down key? Thanks!

Share this post


Link to post
Share on other sites
If the treeview has focus pressing the arrow keys should move the selection without you having to do anything manually. If it doesn't you're doing something wrong. My guess would be that you're not forwarding stuff to DefWindowProc when you should be but who knows.

I suppose it's also possible that the treeview implementation for smartphones is wildly different in this area than it is for normal Windows, but that seems unlikely.

Share this post


Link to post
Share on other sites
i googled and it turns out i shouldn't be using defdlgproc in a dialog's proc...

what else could be a solution to the treeview not getting key input (up/down)?

i tried SetFocus(treeViewHwnd);...but still doesn't work...

:(

Share this post


Link to post
Share on other sites
I have a Tree-View in a dialog box in my (PC) Win32 app, and it responds to keyboard input just fine. I didn't do anything fancy to make it work, it's just a modeless dialog where the parent window's message pump uses IsDialogMessage to send off messages intended for the dialog box.

Share this post


Link to post
Share on other sites

This topic is 3574 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this