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
Solved

CDialogBar class

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Installing Microsoft R server on REDHAT or SUSE Linux 4 147
Host to IP 7 80
Creating Labels and Frequency list style reports in SAS code 9 105
Detect CR LF to each line 12 170
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: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

860 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