Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » CExtStatusControlBar text alignment problem Collapse All
Subject Author Date
Chris G. Aug 13, 2009 - 1:16 PM

Hello Prof-UIS,


the only method i found to set the text alignment of a field in a CExtStatusControlBar object is the SetPaneDrawTextFlags() method. But unfortunately it only supports the flags DT_LEFT, DT_RIGHT and DT_CENTER. What about vertical alignment? If i increase the height of the status bar the text gets aligned at the top. Espacially when using CExtZoomScrollBar we have to increase the height to avoid cutting of edges of that control. How can the vertical text alignment be added?


Regards,


Chris

Chris G. Aug 17, 2009 - 7:05 AM

Hello Prof-UIS,


thank you for your help. I didn’t use the flag DT_SINGLELINE. Now it works.


Regards,

Chris

Technical Support Aug 15, 2009 - 10:37 AM

Please find the following line in the CMainFrame::OnCreate() method in the ZoomScrollBar sample application:

 m_wndStatusBar.GetStatusBarCtrl().SetMinHeight( 25 );

Then please comment it:
 //m_wndStatusBar.GetStatusBarCtrl().SetMinHeight( 25 );

And insert the following code after it:
 m_wndStatusBar.GetStatusBarCtrl().SetMinHeight( 45 );
      int nTestPaneIndex = 0;
      m_wndStatusBar.SetPaneDrawTextFlags(
            nTestPaneIndex,
            ( m_wndStatusBar.GetPaneDrawTextFlags( nTestPaneIndex ) & (~(DT_TOP|DT_VCENTER|DT_BOTTOM)) )
                  | DT_BOTTOM | DT_SINGLELINE
            );
Now please compile and run the ZoomScrollBar sample application. The status bar uses enough big height (at least 45 pixels). All the status panes display the middle aligned text. This alignment is used by default. But the first status pane (which is also called as message pane) is bottom aligned:

http://www.prof-uis.com/download/forums/tmp/BottomAlignedTestInStatusPane.PNG