|
|
|
|
Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Chris Anderson
|
May 3, 2007 - 11:03 AM
|
I have a dialog box which uses a list box and a Prof UIS push button. When the user selects any item in the list box and presses enter/return key, I need for the default push button to be activated. This isnt happening with Prof UIS push button.
|
|
Chris Anderson
|
May 7, 2007 - 12:31 PM
|
Only the button is getting the default style but not the behavior. When I press the enter or return key it doesnaˆ™t not invoke the handler for the default button. So something is still missing.
|
|
Technical Support
|
May 14, 2007 - 8:33 AM
|
We tried to repeat the reported behavior using the standard and Prof-UIS buttons and in both cases we failed to reproduce this. The button handler is not invoked. Would you provide more details about the problem?
|
|
Chris Anderson
|
May 4, 2007 - 5:27 PM
|
I have sent the sample which shows that DM_SETDEFID isnt working with Prof UIS.
|
|
Technical Support
|
May 7, 2007 - 11:57 AM
|
You can use the following code to make the button default. void MyDialog::OnSelectChange()
{
// ::SendMessage( m_hWnd, DM_SETDEFID, ID_ADD_CHILD, 0L );
m_btnAddChild.SendMessage(
BM_SETSTYLE,
BS_DEFPUSHBUTTON,
TRUE
);
}
|
|
Chris Anderson
|
May 4, 2007 - 12:16 PM
|
Well it works when I fire the DM_SETDEFID message within the focus handler of the list box in the IconEditor sample. But in my application I am using a dialog box present within a CExtControlBar and it doesnt seem to be working in this scenrio.
|
|
Chris Anderson
|
May 3, 2007 - 3:27 PM
|
OK you have set the Default Button property to true for the push button. How can I do it without setting this property to true? My application uses the DM_SETDEFID to set a button as the default button but this doesnt seem to work with the Prof UIS button since it is owner drawn.
|
|
Technical Support
|
May 4, 2007 - 2:56 AM
|
Although this message is not supported by Prof-UIS, it is not a problem to implement it. But it would be very convenient to receive a modified version of the IconEditor sample from you, which demonstrates the problem.
|
|
Technical Support
|
May 3, 2007 - 1:32 PM
|
We cannot confirm this issue. You can make sure of this yourself using the IconEditor sample. When Enter is pressed on the focused list box, the Edit button becomes pressed.
|
|