Looking for an example of CControlBar 
Author Message
 Looking for an example of CControlBar

Hi all !

Has anyone a very basic example of a CControlBar object ? Everything I found
so far is too complicated to understand right away or it does not use
CControlBar, but CToolBar, CStatusBar or CDialogBar. Maybe someone wrote one
or two lines of code, that might help me understand the basic concept ?

thanks in advance,

sascha



Sat, 25 Oct 2003 18:01:31 GMT  
 Looking for an example of CControlBar
Sascha!

1. Create a dialog template for the dialog bar. Set the style to Child, and
the border to None. Say we call it IDD_DIALOG_BAR.

2. In your frame class h-file, add a member:

 CDialogBar m_dlgBar;

3. In OnCreate of your frame class, add:
 m_dlgBar.Create(this, IDD_DIALOG_BAR, CBRS_TOP  ,IDD_DIALOG_BAR);

(error checking omitted, you should of course add that)

Voila! Now, you'll just have to add handlers for the buttons etc. in your
frame class.

Johan Rosengren
Responsable Informatique
PACTA S.A.


Quote:
> Hi all !

> Has anyone a very basic example of a CControlBar object ? Everything I
found
> so far is too complicated to understand right away or it does not use
> CControlBar, but CToolBar, CStatusBar or CDialogBar. Maybe someone wrote
one
> or two lines of code, that might help me understand the basic concept ?

> thanks in advance,

> sascha



Sat, 25 Oct 2003 20:27:53 GMT  
 Looking for an example of CControlBar

Quote:
>  CDialogBar m_dlgBar;

Thank you so far... but i meant CControlBar ... The concept of any classes
derived from CControlBar seem easy to understand, while I have only problems
with the base class...

regards,

Sascha



Sat, 25 Oct 2003 21:54:36 GMT  
 Looking for an example of CControlBar
Take a look at examples in Docking Windows section of www.codeguru.com.

--
Ajay Kalra [MVP - VC++]

Note: Please post all replies to newsgroup only.


Quote:
> Hi all !

> Has anyone a very basic example of a CControlBar object ? Everything I
found
> so far is too complicated to understand right away or it does not use
> CControlBar, but CToolBar, CStatusBar or CDialogBar. Maybe someone wrote
one
> or two lines of code, that might help me understand the basic concept ?

> thanks in advance,

> sascha



Sat, 25 Oct 2003 22:26:51 GMT  
 Looking for an example of CControlBar
Sascha,

The Altzheimer is acting up again :-) What is it you want to do with the
controlbar, it seems less than useful on itself?

Johan Rosengren
Responsable Informatique
PACTA S.A.


Quote:
> >  CDialogBar m_dlgBar;

> Thank you so far... but i meant CControlBar ... The concept of any classes
> derived from CControlBar seem easy to understand, while I have only
problems
> with the base class...

> regards,

> Sascha



Sun, 26 Oct 2003 12:37:46 GMT  
 Looking for an example of CControlBar
Well I want to have an own class for menubars. The should be dockable (just
like toolbars) and that is not supported with mfc...

regards,

sascha


Quote:
> Sascha,

> The Altzheimer is acting up again :-) What is it you want to do with the
> controlbar, it seems less than useful on itself?

> Johan Rosengren
> Responsable Informatique
> PACTA S.A.



> > >  CDialogBar m_dlgBar;

> > Thank you so far... but i meant CControlBar ... The concept of any
classes
> > derived from CControlBar seem easy to understand, while I have only
> problems
> > with the base class...

> > regards,

> > Sascha



Sun, 26 Oct 2003 17:45:11 GMT  
 Looking for an example of CControlBar
Sascha,

You could, if you wanted to do lots of work yourself :-), rip the code from
a CDialogBar, and make your own class derived from CControlBar (as you have
probably noticed, the CControlBar class is not supposed to be used "on its
own").

But I would probably have derived a class from CDialogBar (which is
possible, even though you'll have to do it by hand), and added my extra
functionality to this class. This way, it will be dockable.

Johan Rosengren
Responsable Informatique
PACTA S.A.


Quote:
> Well I want to have an own class for menubars. The should be dockable
(just
> like toolbars) and that is not supported with mfc...

> regards,

> sascha


> > Sascha,

> > The Altzheimer is acting up again :-) What is it you want to do with the
> > controlbar, it seems less than useful on itself?

> > Johan Rosengren
> > Responsable Informatique
> > PACTA S.A.



> > > >  CDialogBar m_dlgBar;

> > > Thank you so far... but i meant CControlBar ... The concept of any
> classes
> > > derived from CControlBar seem easy to understand, while I have only
> > problems
> > > with the base class...

> > > regards,

> > > Sascha



Sun, 26 Oct 2003 23:22:59 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Examples of Inheriting from CControlBar

2. Proposal: alt.binaries.examples.vb4 , alt.binaries.examples.vcpp , alt.binaries.examples.java

3. I'm looking for an example of using WaitHandle.WaitAny()

4. Looking for an example of loading a treeView with XML data

5. Looking for examples of unsafe image loading

6. Looking for examples for Concurrent TCP Echo Server ?

7. Looking for example on stack

8. Please Help! Looking For Example

9. Looking for simple example of hashing algorithm!!!!

10. : looking for examples

11. Looking for Example Code on Paging Vitural Memory.

12. Looking for programming example in C to access serial port on a unix system

 

 
Powered by phpBB® Forum Software