Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - blank popup window
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

blank popup window

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


Joined: 25 June 2007
Location: United Kingdom
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote iftekhar Quote  Post ReplyReply Direct Link To This Post Topic: blank popup window
    Posted: 24 February 2010 at 5:05am
Hi,
 
Whenever a popup is displayed with no controls in it a square shaped button like item (I guess the default popup window with no item) pops up. I would expect it to show nothing if there is no item in the popup bar. CAn anybody tell me is there any way to disable this behavior so that no popup is displayed when there is no controls in the popup bar.
 
The image with the most might show the problem.
 
Thanks in advence
 
IAT
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 26 February 2010 at 6:24am
If you create the menu dynamically, then you can simply choose between CXTPControlPopup and CXTPControlButton:
 
Handle ON_XTP_CREATECONTROL...
 
if (icons.count() > 0)
    pControl = new CXTPControlPopup(...);
else
    pControl = new CXTPControlButton(...);
Back to Top
iftekhar View Drop Down
Groupie
Groupie


Joined: 25 June 2007
Location: United Kingdom
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote iftekhar Quote  Post ReplyReply Direct Link To This Post Posted: 26 February 2010 at 7:02am
Hmm...
 
This partially solves the problem. Then I am not creating them dynamically all my menus.
 
Also I get similar window for context menu as well. If there is no item in the context menu then this empyt window pops up again. This can happen on CXTPCommandBars::TrackPopupMenu.
 
Any suggestion for this.
 
Ideally I would like this behavior to be turned off throughout the application.
IAT
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 26 February 2010 at 8:58am
Maybe you would prefer some disabled button added by default to empty popups?  The text can read "no items" or whatever you like.  Or you can convert the popup to a label when no controls are added.
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.031 seconds.