Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Bug in  CommandBars_InitCommandsPopup ...
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Bug in CommandBars_InitCommandsPopup ...

 Post Reply Post Reply
Author
Message
Superpippo View Drop Down
Groupie
Groupie


Joined: 02 March 2005
Status: Offline
Points: 67
Post Options Post Options   Thanks (0) Thanks(0)   Quote Superpippo Quote  Post ReplyReply Direct Link To This Post Topic: Bug in CommandBars_InitCommandsPopup ...
    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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 04 July 2005 at 2:32am

You can't call DoEvents in InitCommandsPopup

just comment it in sample/your application.

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Superpippo View Drop Down
Groupie
Groupie


Joined: 02 March 2005
Status: Offline
Points: 67
Post Options Post Options   Thanks (0) Thanks(0)   Quote Superpippo Quote  Post ReplyReply Direct Link To This Post Posted: 04 July 2005 at 2:54am

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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.