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 Tech Support » How do I change the caption text of a dynamic control bar after initialization? Collapse All
Subject Author Date
Chun Pong Lau Jul 17, 2008 - 6:04 AM

Dear support team,

How do I change the caption text of a dynamic control bar after initialization by program?

Thanks a lot,
Chun Pong

Chun Pong Lau Jul 17, 2008 - 7:12 AM

I’ve solved this one myself.

    CWnd *pWnd = AfxGetMainWnd();
    pWnd->SetWindowText(sNewCaption);
    pWnd->SendMessage( WM_NCPAINT );
    pWnd->Invalidate(1);
    pWnd->UpdateWindow();

Technical Support Jul 17, 2008 - 1:14 PM

Please also note the following: the CExtControlBar::OnGetBarCaptionText() virtual method in invoked by Prof-UIS framework for querying different bar captions: single bar caption, floating mini frame caption, tabbed group caption, tab item caption. Default implementation of this method returns control bar’s window text in case of any caption. But you can provide control bar with different captions via overriding the the CExtControlBar::OnGetBarCaptionText() virtual method.