BS_DEFPUSHBUTTON doesn't work inside ProperyPage !?

R

Robert

I have a Combobox and a DefPushButton in a PropertyPage as form (a
main window; not modal dialog)

Pressing RETURN in the Combobox or any Editfield in the form doesn't
issue a WM_COMMAND/OnOK

(When running the dialogtemplate as normal dialog it works.)

I also made a extra invitation by DM_SETDEFID :

self.SendMessage(wc.DM_SETDEFID, 303, 0)

- it still won't work. I'm also not able to catch the return key
(WM_KEYDOWN, WM_CHAR) at all inside the combobox control or the page,
but I can catch all other keys. Playing with DLGC_WANTALLKEYS also
doesn't help to get the VK_RETURN in any case. Whats going with
[RETURN] in a non-modal sub-prop-page form ? What can I do?

Robert

(I use Pythonwin on top of MFC; it should not matter.)
 
J

Jugoslav Dujic

Robert wrote:
| I have a Combobox and a DefPushButton in a PropertyPage as form (a
| main window; not modal dialog)
|
| Pressing RETURN in the Combobox or any Editfield in the form doesn't
| issue a WM_COMMAND/OnOK
|
| (When running the dialogtemplate as normal dialog it works.)
|
| I also made a extra invitation by DM_SETDEFID :
|
| self.SendMessage(wc.DM_SETDEFID, 303, 0)
|
| - it still won't work. I'm also not able to catch the return key
| (WM_KEYDOWN, WM_CHAR) at all inside the combobox control or the page,
| but I can catch all other keys. Playing with DLGC_WANTALLKEYS also
| doesn't help to get the VK_RETURN in any case. Whats going with
| [RETURN] in a non-modal sub-prop-page form ? What can I do?

You have to have SendMessage(PSM_ISDIALOGMESSAGE) or
PropSheet_IsDialogMessage in the main message loop (which is
equivalent of IsDialogMessage for modeless dialogs).

Simpler still, since your property sheet is the main window, is there
any (very special) reason you did not make it modal?

--
Jugoslav
___________
www.geocities.com/jdujic

Please reply to the newsgroup.
You can find my real e-mail on my home page above.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,202
Messages
2,571,057
Members
47,664
Latest member
RoseannBow

Latest Threads

Top