Bug in CommandBars_InitCommandsPopup ... |
Post Reply |
Author | |
Superpippo
Groupie Joined: 02 March 2005 Status: Offline Points: 67 |
Post Options
Thanks(0)
Posted: 02 July 2005 at 12:06am |
I have a problem with CommandBars_InitCommandsPopup event. In my application i build the popup menu at runtime starting from CommandBars_InitCommandsPopup. All works fine but....look at the sample code in attachment. Start the code, from the application window select an item on menu, so you can see the popup menu. Now press and keep pressed the rigth arrow on the keyboard of your pc to navigate in the items of main menu, after few second you get an error and a vb crash! I try to manage it with a static flag to exit from sub if a previous event calling is pendent but doesn't work. Any ideas ? Best regards SuperPippo 2005-07-02_000544_BugInCommandBars_InitCommandsPopup.zip
P.S. I think that a good way to solve the problem is if you give as something like "cancel" option of query_unload event of vb form, setting cancel to true = event chain cancel.
|
|
SuperPippo
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
You can't call DoEvents in InitCommandsPopup just comment it in sample/your application. |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Superpippo
Groupie Joined: 02 March 2005 Status: Offline Points: 67 |
Post Options
Thanks(0)
|
Dear Oleg, naturally i know that without doevents all works fine, but how many code in the world doesn't have doevents? My application is really complex and in my code i need dovents! Why I can't call DoEvents in InitCommandsPopup ? It seems to be an architectural limit of commandbar! It seems as the commandbar popup event is pending when the code is in InitCommandPopup. If this is the case, to have full functionality of InitCommandPopup you must give us a cancel parameter to stop the event chain. Otherwise you have to send the popup message after the initcommandpopup event. Without this InitCommandPopup is workless. Can you modify this ? Thank you.
|
|
SuperPippo
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |