Home > Software engineering >  MFC C2065 under "m_OS" : no identifier of the problem statement?
MFC C2065 under "m_OS" : no identifier of the problem statement?

Time:10-29

//DemoDlg. CPP: implementation file 
.
.
Void CAboutDlg: : OnTimer (UINT_PTR nIDEvent)
{
//TODO: add the message handler code and/or invoke the default
Static int t=0;
Double THR.
THR=thr_num2 [0] [t];
M_OS. AppendPoint (THR);//here appear problem, line 211

t++;

CDialogEx: : OnTimer (nIDEvent);
}


But in front of the same CPP has cited the variable, is not an error, here is the line 81-129
 BOOL CDemoDlg: : OnInitDialog () 
{
CDialogEx: : OnInitDialog ();

//will "about... "Menu item added to the system menu,

//IDM_ABOUTBOX must be in the system command range,
ASSERT ((IDM_ABOUTBOX & amp; 0==IDM_ABOUTBOX xfff0));
ASSERT (IDM_ABOUTBOX & lt; 0 xf000);

CMenu * pSysMenu=GetSystemMenu (FALSE);
If (pSysMenu!=NULL)
{
BOOL bNameValid;
Cstrings strAboutMenu;
BNameValid=strAboutMenu. LoadString (IDS_ABOUTBOX);
ASSERT (bNameValid);
if (! StrAboutMenu. IsEmpty ())
{
PSysMenu - & gt; The AppendMenu (MF_SEPARATOR);
PSysMenu - & gt; AppendMenu (MF_STRING IDM_ABOUTBOX, strAboutMenu);
}
}

//set this dialog ICONS, when the application is the main window is not a dialog, the framework will automatically
//do this
SetIcon (m_hIcon, TRUE);//set the large icon
SetIcon (m_hIcon, FALSE);//set the small icon

//TODO: add additional initialization code in the
CRect rect1;
GetDlgItem (IDC_OSCOPE) - & gt; GetWindowRect (rect1);
The ScreenToClient (rect1);


//create the control
M_OS. Create (WS_VISIBLE | WS_CHILD, rect1, this);

//customize the control
M_OS. SetRange (10.0, 10.0, 1);
M_OS. SetYUnits (" thrust ");
M_OS. SetXUnits (" time ");
M_OS. SetBackgroundColor (RGB (0, 0, 64));
M_OS. SetGridColor (RGB (192, 192, 255));
M_OS. SetPlotColor (RGB (255, 255, 255));


Return TRUE;//unless set focus to the control, return TRUE
}

The variables defined in the header file
 protected: 
HICON m_hIcon;
COScopeCtrl m_OS;

COScopeCtrl classes defined for oneself, also included in the header file
//DemoDlg. H: header file
//
# pragma once
# include "OScopeCtrl. H"


Pray god help!

CodePudding user response:

M_OS variable you are defined in the CDemoDlg class, it is in the CAboutDlg class to use it

CodePudding user response:

reference 1st floor VisualEleven response:
m_OS variable you are defined in the CDemoDlg class, it is in the CAboutDlg class use it

Should be the problem, I changed a try, thank you!

CodePudding user response:

Add a message to choose wrong

CodePudding user response:

Novice small white, I want to 1/f, 20 points and stick to, why always prompt me to points do not tally with the total score, cannot bear,,,
  • Related