|
|
|
|
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 |
|
Krustys Donuts
|
Aug 31, 2005 - 11:37 PM
|
If I try to display an & character as part of a CExtButton caption, prof-uis crashes. Seems like you intended this based on the ASSERT: ASSERT( sBtn.Find( _T(’&’) ) < 0 ); //from ProfUIS242md.dll!CExtPaintManagerXP::PaintPushButton
Why would this be? So we can’t display &s?
Also, if I use a single & to generate a shortcut for a button, unexpected behavior results. For example, if I have a button caption "&Hello" and then press the "h" key, I would normally expect the "Hello" button to be pressed automatically. In CExtButton, the button gets the focus but isn’t pressed. Is there an easy way to automatically press the button?
Thanks.
|
|
Technical Support
|
Sep 2, 2005 - 8:19 AM
|
Thank you for this remark. The quick shortcut activation works for standard buttons, check boxes and radio buttons because they are windows of the "BUTTON" window class and appropriate button style. The CExtButton class subclasses the button common control and changes its style to the owner-draw button type. We had to do this because it is not possible to redraw the button common control correctly using any other technique. But the dialog’s window procedure does not allow any owner draw button control to be clicked or checked because the owner draw button control is treated as something unknown with custom behavior and meaning. We added support for quick shortcut activation to the CExtButton , CExtColorButton , CExtCheckBox and CExtRadioButton classes. Besides, push buttons with the drop-down arrow now feature configurable behavior with quick shortcut activation: they can treat pressing a shortcut either as clicking the main button area or clicking the drop-down arrow with further displaying the pop-up menu. If you need the updated code for these buttons right now, then please drop us an e-mail at support@prof-uis.com.
|
|
Krustys Donuts
|
Sep 2, 2005 - 11:27 AM
|
Thanks. But what about the && crash bug?
|
|
Technical Support
|
Sep 2, 2005 - 1:05 PM
|
This "unwanted" assertion bug should not appear in your application compiled with any version of Prof-UIS if the push button’s text contains only one ampersand character.
|
|
Krustys Donuts
|
Sep 2, 2005 - 1:59 PM
|
If I want my button caption to say "Hello & Goodbye" then in the editor I have to say "Hello && Goodbye". Doing this causes assertions.
|
|
Technical Support
|
Sep 4, 2005 - 9:07 AM
|
Yes, you are right, the assertion occurs because the paint manager assumes that it is incorrect to use more than one ampersand in the button text. We have never come across the ampersand as the shortcut key. Typically more than one ampersand is this case is a type. This assertion is not critical and we can exclude it from the source code.
|
|