Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - How to change app title from Backstage
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to change app title from Backstage

 Post Reply Post Reply
olebed View Drop Down
Admin Group
Admin Group

Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Topic: How to change app title from Backstage
    Posted: 04 February 2018 at 1:38pm

There was question from customer, I think solution will be useful for other.

Problem was in that calling CDocument::SetTitle() from Backstage Pages don't have immediate results in titleBar of application.

Title belongs to Frame of application. CDocument::SetTitle call updating frames only of visible Views. CDocument belong to View which is invisible when shown Ribbon's Backstage. So title can't be updated by calling CDocument::SetTitle() when Backstage visible.

Workaround is that you need to pass pointer to your RibbonBar to BackstagePage and make next calls
::DefWindowProc(m_pRibbonBar->GetSite()->GetSafeHwnd(), WM_SETTEXT, XTPToWPARAM(0), XTPToLPARAM((LPCTSTR)strTitle));
 Oleksandr Lebed
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

This page was generated in 0.094 seconds.