Solved

CDialogBar class

Posted on 1998-11-09
2
276 Views
Last Modified: 2013-11-20
I created a dialog bar and template for it and I can display it just fine, but how do I make it like the traditional tool bar that the user can grab with the mouse and move it to any part of the screen. I also am having difficulty in getting it to disapear using a menu item. my code is similar to this.
CDialogBar * CustomBar = new CDialogBar;
CustomBar->Create(this,....,....,....);
CustomBar->EnableDocking(SW_ALIGN_ANY);
EnableDocking(SW_ALIGN_ANY);

BOOL IS_VISIBLE = (CustomBar->GetStyle() & SW_SHOWNORMAL);
int IS_SHOWING = (IS_VISIBLE) ? SW_HIDE SW_SHOWNORMAL);
CustomBar->ShowWindow(IS_SHOWING);

This fails to work correctly, is there another function that will tell me the visibility state of this dialog bar?
0
Comment
Question by:backdraf
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Author Comment

by:backdraf
ID: 1324407
Edited text of question
0
 
LVL 9

Accepted Solution

by:
Priyesh earned 50 total points
ID: 1324408
void CMainFrame::OnViewToolbar()
{
  if(m_AudioCtrlBar.IsWindowVisible()==FALSE)      
       (m_AudioCtrlBar.GetParentFrame())->ShowControlBar((CControlBar *)&m_AudioCtrlBar,true,false);      
  else
     (m_AudioCtrlBar.GetParentFrame())->ShowControlBar((CControlBar *)&m_AudioCtrlBar,false,false);      
}

Use code like the above instead..
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Separate into files by filename 12 91
sumHeights  challenge 17 80
How to convert MFC::CString to UTF8 wchar_t* 10 388
unix example issues 18 106
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question