注册 登录
编程论坛 VC++/MFC

为什么找不到CWinApp成员变量m_pszAppName的定义

pizibaidu 发布于 2013-11-25 10:41, 538 次点击
这是CWinApp的结构函数,我发现很多地方m_pszAppName都是直接拿来用的,
但是为什么找不到m_pszAppName的定义呢,
我包含搜索SRC目录,也找不到其定义,

CWinApp::CWinApp(LPCTSTR lpszAppName)
{
    if (lpszAppName != NULL)
        m_pszAppName = _tcsdup(lpszAppName);
    else
        m_pszAppName = NULL;
3 回复
#2
yuccn2013-11-25 11:01
会不会是基类中的一个public 成员?
#3
miller01132013-11-25 14:04
class CWinApp : public CWinThread
{
    DECLARE_DYNAMIC(CWinApp)
public:

// Constructor
    explicit CWinApp(LPCTSTR lpszAppName = NULL);     // app name defaults to EXE name

// Attributes
    // Startup args (do not change)

    // This module's hInstance.
    HINSTANCE m_hInstance;

    // Pointer to the command-line.
    LPTSTR m_lpCmdLine;

    // Initial state of the application's window; normally,
    // this is an argument to ShowWindow().
    int m_nCmdShow;

    // Running args (can be changed in InitInstance)

    // Human-redable name of the application. Normally set in
    // constructor or retreived from AFX_IDS_APP_TITLE.
    LPCTSTR m_pszAppName;、、---------------------------------就在这里定义的
#4
pizibaidu2013-11-25 17:23
原来我只在MFC下搜的,所以搜不到,应该在include下搜,在afxwin.h里定义的
1