
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.
> >.