Click to See Complete Forum and Search --> : Modeless Dialog Messages


Gamble
April 7th, 1999, 10:30 PM
Can anyone help me with this?

In the program I'm currently working on, I have a tree control placed in a modeless dialog box. Problem is, whenever focus is on the tree control and the enter or escape key is pressed the dialog is hidden. I'm not sure which message is being sent to the dialog, so I can't trap it.

Incidentally, is there a way to track which messages are being sent?

Karl
April 8th, 1999, 03:13 AM
* To track messages, use Spy++ (DevStudio: in "Tools" menu).
* Override OnOk (return key) ans OnCancel (Esc. key) to trap what you want. You may also overrride PreTranslateMessage and catch the message WM_KEYDOWN with the key value you want (wParam of MSG structure == VK_ENTER for example).

HTH.

K.

Ash to ash and clay to clay, if the enemy doesn't get you, your own folk may.