Raimbek Rakhimbek
Raimbek Rakhimbek

Reputation: 67

mfc project : How to change the caption message that must be in AFX_IDS_APP_TITLE?

In application created by wizard I have caption that looks like 'MyApplication - no name'.

So how to change the last sentence 'no name'. I read that string must be in resource with AFX_IDS_APP_TITLE id. But changes of them don't make any sense.

I know that I can override the mehtod PreCreateWindow, use SetTitle and so on.

But I wanna especially use the resource with id AFX_IDS_APP_TITLE . Also, I will appreciate for another solution via resources.

enter image description here

Upvotes: 0

Views: 828

Answers (1)

Andrew Komiagin
Andrew Komiagin

Reputation: 6556

Unfortunately, there is no resource-based solution here.

The best approach to get rid of document file name in app title is to override:

BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
    cs.style &= ~(LONG) FWS_ADDTOTITLE;   
    return CFrameWnd::PreCreateWindow(cs);
}

Upvotes: 1

Related Questions