How to display caption on floating dialogbars 
Author Message
 How to display caption on floating dialogbars

By default,a floating dialogbar dosen't have caption. How
to display it? I've tried SetWindowText(), but failed.


Fri, 30 Sep 2005 17:14:06 GMT  
 How to display caption on floating dialogbars
SetWindowText works for a CToolBar. It shows up only when the toolbar is
floating. I suspect same should be true for CDialogBar as both are derived
from CControlBar. When/where are you setting it? If you are calling
SetWindowText when the dialogbar is already floating, you may want to dock
and undock before you notice the change.

--
Ajay Kalra [MVP - VC++]


Quote:
> By default,a floating dialogbar dosen't have caption. How
> to display it? I've tried SetWindowText(), but failed.



Fri, 30 Sep 2005 22:38:00 GMT  
 How to display caption on floating dialogbars
I override the dialogbar's CalcDynamicLayout() and it's
like:

    if((dwMode & LM_VERTDOCK)||(dwMode & LM_HORZDOCK))
    {
        size.cx= ...;
        size.cy= ...;

        if(IsFloating())
        {
            CString caption = "Control Panel";
            this->SetWindowText(caption);
        }
        ...
    }
But it didn't work.

Quote:
>-----Original Message-----
>SetWindowText works for a CToolBar. It shows up only when
the toolbar is
>floating. I suspect same should be true for CDialogBar as
both are derived
>from CControlBar. When/where are you setting it? If you
are calling
>SetWindowText when the dialogbar is already floating, you
may want to dock
>and undock before you notice the change.

>--
>Ajay Kalra [MVP - VC++]



>> By default,a floating dialogbar dosen't have caption.
How
>> to display it? I've tried SetWindowText(), but failed.

>.



Sat, 01 Oct 2005 02:46:04 GMT  
 How to display caption on floating dialogbars
I think the problem is that if you change the caption while the toolbar is
floating, it does not reflect it immediately. IIRC, you would need to dock
and undock it in order to see it. This was asked couple of months ago and I
posted the reply to it after testing it in a dummy project. You may want to
search it on Google in this newsgroup.

--
Ajay Kalra [MVP - VC++]


Quote:
> I override the dialogbar's CalcDynamicLayout() and it's
> like:

>     if((dwMode & LM_VERTDOCK)||(dwMode & LM_HORZDOCK))
>     {
>         size.cx= ...;
> size.cy= ...;

> if(IsFloating())
> {
>     CString caption = "Control Panel";
>     this->SetWindowText(caption);
> }
>         ...
>     }
> But it didn't work.

> >-----Original Message-----
> >SetWindowText works for a CToolBar. It shows up only when
> the toolbar is
> >floating. I suspect same should be true for CDialogBar as
> both are derived
> >from CControlBar. When/where are you setting it? If you
> are calling
> >SetWindowText when the dialogbar is already floating, you
> may want to dock
> >and undock before you notice the change.

> >--
> >Ajay Kalra [MVP - VC++]



> >> By default,a floating dialogbar dosen't have caption.
> How
> >> to display it? I've tried SetWindowText(), but failed.

> >.



Sun, 02 Oct 2005 03:14:19 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Floating dialogbars

2. MDI and Floating Dialogbars

3. Changing Floating Toolbar Caption Runtime...

4. DataColumn Caption Displaying in DataGrid

5. Display Bitmap: TreeView and ListView in frame with splitter and no caption

6. Short caption displays on menu

7. displaying negative floating-point zeroes

8. Display an array of float

9. Displaying an float on an edit box

10. conversion of floating point for display

11. Debugger and precision of float number display

12. problem when the display of float number

 

 
Powered by phpBB® Forum Software