Solved

CDialogBar class

Posted on 1998-11-09
2
268 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
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now