Re: Print Preview - Main window title changed
Scott,
Tried your suggestion and the app name was changed.
CWinApp::m_pszAppName has the value "ActBooks" but the application window
displays "Reporter". Reporter was an old name when the application was
originally started. I've searched the entire solution for references to the
string "Reporter" and the only text was in the resource file shown below:
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 4,0,0,1
PRODUCTVERSION 4,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "FileDescription", "Reporter MFC Application"
VALUE "FileVersion", "4, 0, 0, 1"
VALUE "InternalName", "Reporter"
VALUE "LegalCopyright", "Copyright (C) 1999-2007"
VALUE "OriginalFilename", "Reporter.EXE"
VALUE "ProductName", "Reporter Application"
VALUE "ProductVersion", "4, 0, 0, 1"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
The only other place is the app, view & doc .cpp & .h file names.
Any ideas how the old app name is still getting displayed???
Thanks, Neil
"Scott McPhillips [MVP]" wrote:
"Neil B" <NeilB@discussions.microsoft.com> wrote in message
news:2CCDDD3E-BF1A-4FD3-BA49-0CDDE3648415@microsoft.com...
Tom,
I spoke a little to soon. Although the SetTitle(mytitle) did change the
title it has a glitch in it.
The resulting title has the application name followed by a dash
concatonated
on the left of the title. (ie. MyApp - mytitle). Any way to stop this from
happening???
Thanks, Neil
Add this virtual function override:
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
cs.style = cs.style & ~FWS_ADDTOTITLE; // Turn off MFC cutesy titles
return CFrameWnd::PreCreateWindow(cs);
}