Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PropertySheet - default buttons

0 views
Skip to first unread message

Dan Miller

unread,
Oct 15, 2008, 2:53:00 PM10/15/08
to
I'm writing my application in raw win32 code, in C.

I have a group of dialog boxes which I previously implemented as stand-
alone dialogs. They worked fine in this form; I have a single Edit control
for user inputs, and a SEND button which is the default button, which sends
whatever they typed, to the target. All well and good.

However, since all of my dialogs were identical (just talking to different
remote targets), I decided to collect them all under a tab control.
Ultimately, I actually used PropertySheet, which was easier to figure out
how to use. I have hidden the OKAY/CANCEL buttons, since all the relevant
controls are on the original dialog(s).

Sadly, now that I've collected all the dialogs into the property sheet, the
"default button" functionality seems to have been disabled. Although the
SEND button is still highlighted as if it's the default button, <Enter>
when pressed just generates a beep on the console. My message-handler
procedure is not receiving any messages of any sort when <Enter> is
pressed.

Why is this occurring (or rather, NOT occurring) ??? Is this just a quirk
of PropertySheets, that the "default button" concept of dialogs is broken?
That would seem unintuitive, given that a property sheet (by definition) is
a collection of dialogs...

Any insights would be very welcome here!


Norman Bullen

unread,
Oct 16, 2008, 1:05:46 AM10/16/08
to
A "normal" property sheet dialog has OK, Apply, and Cancel buttons on
the main dialog and one of them is usually the default button. Perhaps
Microsoft thought it unnecessary to search into child dialogs for a
default button.

You can probably make this work, however, with the DM_SETDEFID message.
See documentation in MSDN.

--
Norm

To reply, change domain to an adult feline.

0 new messages