SupportBuyTry
BCGSoft: Forums
BCGSoft: Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 BCGControlBar Forums
 BCGControlBar Bugs and Problems
 Button Appearnace Crash and ReplaceButton( -1 ...
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

doodaddy

61 Posts

Posted - 09/03/2001 :  1:09:53 PM  Show Profile  Reply with Quote
I have a CBCGToolbarMenuButton (that has a drop-down menu). I don't want the button to do anything but drop-down this menu. In other words, it shouldn't have a default command if you press the icon part.

So, when I built the button, I set the command ID to -1, which is legal.


CMenu M;
M.LoadMenu( IDM_VIEW_LAYOUT );


int image = CImageHash::GetImageOfCommand( ID_VIEW_LAYOUT );
CBCGToolbarMenuButton B( -1, *M.GetSubMenu( 0 ), image, _T( "Layout" ) );
fileBar.ReplaceButton( ID_VIEW_LAYOUT, B );



It works, but...

When I go to the "Button Appearance..." for this button, there is no default image listed and the choice is greyed out (which is different from another menu button I have with a default command).

WORSE, if I click in the dimmed image edit area, the program crashes!

Am I doing something wrong?




doodaddy

61 Posts

Posted - 09/03/2001 :  1:45:35 PM  Show Profile  Reply with Quote
I have another disadvantage to the CBCGToolbarMenuButton without a default command. (In other words, a toolbar button that brings up a menu but has no default action when clicked on the icon):

By setting the default command ID to -1, I'm not sure how to dim the button if necessary. I'd like to disable the button if none of the menu options below it are available.

Thanks,
Charlie

Go to Top of Page

Support

2571 Posts

Posted - 09/03/2001 :  1:54:15 PM  Show Profile  Visit Support's Homepage  Reply with Quote
Could you, please, send us a sample program that demonstrates these problems and we'll take a look.

Thanks in advance,

Technical Support
BCGSoft Ltd.
Go to Top of Page

doodaddy

61 Posts

Posted - 09/03/2001 :  2:28:00 PM  Show Profile  Reply with Quote
quote:

Could you, please, send us a sample program that demonstrates these problems and we'll take a look.



Sure. I get this behaviour when running BCGIEDemo!


  • Load BCGIEDemo
  • Go into customize mode
  • right click the "Font" button and bring up the menu
  • select Button Appearance...

On my machine, the "default image" radio button is dimmed, and clicking the image edit area (which is dimmed) will crash.

The problem seems to be that the font button is an example of a drop-down menu button without a default command. The command value of -1 confuses it!

Further, I'd like to be able to disable the button, such as "font," in an command update handler if I find out that a font shouldn't be set for some reason.

Thanks,
Charlie



Go to Top of Page

Support

2571 Posts

Posted - 09/03/2001 :  3:01:03 PM  Show Profile  Visit Support's Homepage  Reply with Quote
Thanks. The fix will be available in the next library release.

Best regards,

Technical Support
BCGSoft Ltd.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To:
BCGSoft: Forums © Copyright (c) 1998-2010 BCGSoft Co Ltd Go To Top Of Page
Snitz Forums 2000
Copyright © 1998-2008 BCGSoft CO Ltd. All rights reserved. Terms of Use | Privacy Statement
Microsoft, Visual C++, Visual Studio, Visual Studio.NET, Outlook, Windows and Windows NT are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. All other trademarks are the property of their respective owners.
Design by Web-Master.spb and Creativemind