PreTranslateMessage(MSG* pMsg)
-
Hi, I have a tree control that fills the entire client area of a dialog box. I want to catch the left mouse button being pressed in the tree. The problem is, I can't catch WM_LBUTTONDOWN because the tree fills the whole dialog. So, when the user presses the left mouse button he is not pressing it in the dialog, he is pressing it in the tree. As a result, I am trying to make use of PreTranslateMessage. What I was wondering was how do I detect when the the user has pressed the left mouse button while holding down the shift key in PreTranslateMessage(MSG* pMsg)? Also, is there an easier way to do this? Thanks Mike
-
Hi, I have a tree control that fills the entire client area of a dialog box. I want to catch the left mouse button being pressed in the tree. The problem is, I can't catch WM_LBUTTONDOWN because the tree fills the whole dialog. So, when the user presses the left mouse button he is not pressing it in the dialog, he is pressing it in the tree. As a result, I am trying to make use of PreTranslateMessage. What I was wondering was how do I detect when the the user has pressed the left mouse button while holding down the shift key in PreTranslateMessage(MSG* pMsg)? Also, is there an easier way to do this? Thanks Mike
-
You get an NM_CLICK notification when the user clicks in the tree. As for the keyboard, call GetKeyState(VK_SHIFT) to tell if Shift is pressed.