?
Solved

HOW TO IMPLEMENT TOOLBAR AND STATUS BAR IN DIALOG BASED APPLICATION

Posted on 2001-06-10
5
Medium Priority
?
207 Views
Last Modified: 2013-11-20
I would like to attach a tool bar,status bar in  my project
 how to do that.i know that in SDI the frame class provides that but
  in DIALOG BASED APPLICATION how would i do that.
0
Comment
Question by:vsulu
[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
5 Comments
 
LVL 9

Accepted Solution

by:
BeyondWu earned 400 total points
ID: 6175863
0
 
LVL 2

Expert Comment

by:MadYugoslav
ID: 6176031
If You like to use ReBar's and self made status bar I can post You code (post Your email).
0
 
LVL 42

Expert Comment

by:sedgwick
ID: 6176791
create your own CToolBar derive class and add this code to OnInitDialog():
//IDR_MY_TOOLBAR-> your resource toolbar ID
//u associate your toolbar with the resource ID

     cMyToolBar.Create(this);
     cMyToolBar.LoadToolBar(IDR_MY_TOOLBAR);
     cMyToolBar.ShowWindow(SW_SHOW);
     cMyToolBar.SetBarStyle(CBRS_ALIGN_TOP | CBRS_BORDER_TOP | CBRS_TOOLTIPS | CBRS_FLYBY);
     RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0);


in your toolbar class add this function:
LRESULT OnIdleUpdateCmdUI(WPARAM wp, LPARAM lp);


LRESULT CMyToolBar::OnIdleUpdateCmdUI(WPARAM wp, LPARAM lp)
{
   if (IsWindowVisible()) {
       CFrameWnd* pParent = (CFrameWnd*)GetParent();
       if(pParent)
           OnUpdateCmdUI(pParent, (BOOL)wp);
   }
   return 0L;
}

this function is passing the UPDATE_COMMAND_UI to the dialog in order to handle the toolbar's buttons
0
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 9484604
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Answered by : BeyondWu

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Roshan Davis
EE Cleanup Volunteer
0

Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

801 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