CDialog/Toolbar/Menu Problem |
Post Reply |
Author | |
JamesC
Newbie Joined: 03 December 2003 Status: Offline Points: 21 |
Post Options
Thanks(0)
Posted: 05 February 2004 at 12:44pm |
I have a CDialog and I attached a toolbar and a menu to the Dialog. Both show up and everything looks good but nothing gets highlighted when I mouse over an item. In regards to the menu, when I click the menu, items do pop up and do respond to mouse clicks. In regards to the toolbar, tooltips do work when I mouse over an item and the toolbar does respond when I click on an item BUT the toolbar item remains highlighted from that point forward? I compared my code to that of the DialogSample and I can't see any difference. Any ideas? This is happening on ALL of my dialogs that contain a menu and/or toolbar. Mainframe works fine though. Problem is just on dialogs.
|
|
JamesC
Newbie Joined: 03 December 2003 Status: Offline Points: 21 |
Post Options
Thanks(0)
|
Also my dialog is resizable and even though both the toolbar and the menu have the flag xtpFlagStretched set they do not draw to the end when I resize the dialog. At first the dialog looks good but if you resize the dialog to anything larger then the created size, you can see the bk color of the dialog.
|
|
JamesC
Newbie Joined: 03 December 2003 Status: Offline Points: 21 |
Post Options
Thanks(0)
|
Ok. I figured out the OnKickIdle part that I seemed to have forgotten which fixed the highlighting issue on some of the dialogs but on others they are still messed up. The resizing issue is still there.
Edited by JamesC |
|
krulle
Newbie Joined: 05 October 2004 Status: Offline Points: 6 |
Post Options
Thanks(0)
|
For solving the sizing issue, overload the OnSize event. Something like this should work: void CMyDlg::OnSize(UINT nType, int cx, int cy) { CDialog::OnSize(nType, cx, cy);RepositionBars (AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0);} Edited by krulle |
|
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 |