visual studio 2010 - How to change the title/caption of MFC SDI documentless application -


i can't find working solution change title of mfc sdi application. don't use document/view. need change title according internal state of applicaiton.

i've tried cmainframe::setwindowtext main app module in initinstance - no luck.

i've tried change cmainframe::m_strtitle member variable , call onupdateframetitle(true) after - still no luck.

inside ontimer procedure - calling afxgetmainwnd()->setwindowtext(_t("title ontimer")); - not work either.

what missing? should common , simple task, shouldn't it?

edit: i'm sorry, seems setwindowtext working, need compile app. that's fault.

overwrite cmainframe::precreatewindow. clear style fws_addtotitle

cs.style &= ~(long)fws_addtotitle;           

now should possible window caption in way like.

the default window caption taken string resource id afx_ids_app_title.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -