Home > Software engineering >  How to update the display a static text control binding cstrings variable
How to update the display a static text control binding cstrings variable

Time:02-27

My code as follows, to run the program did not show, could you tell me how to modify the
 void CMyDialog: : OnTimer (UINT_PTR nIDEvent) 
{
//TODO: add the message handler code and/or invoke the default
CDialog: : OnTimer (nIDEvent);

The switch (nIDEvent)
{
Case IDT_TIMER_MEMORY:
{
The static char szMemoryUsage [20].
: : GlobalMemoryStatus (& amp; M_ms);
Sprintf_s (szMemoryUsage, memory usage: % u % %, m_ms. DwMemoryLoad);
MyDialog. M_DlgTab2. M_csMemoryStatus=szMemoryUsage;
The UpdateData (FALSE);
}
break;
}
}

CodePudding user response:

The static text control LTEXT, associated m_csMemoryStatus
Instead of
Not allowed to enter the EDITTEXT, associated CEdit variable
?

CodePudding user response:

reference 1/f, zhao teacher reply:
to a static text control LTEXT, associated m_csMemoryStatus
Instead of
Not allowed to enter the EDITTEXT, associated CEdit variable
?
object cannot directly using cstrings, cstrings m_csMemoryStatus associated with the Static Text controls, my m_csMemoryStatus=szMemoryUsage then the UpdateData (FALSE);

CodePudding user response:

Static text as if can't use the updatedata refresh, use the setwindowtext

CodePudding user response:

What is MyDialog? Is a dialog box? If be the call below should be MyDialog. The UpdateData (FALSE);

CodePudding user response:

reference 4 floor zgl7903 response:
MyDialog is what? Is a dialog box? If be the call below should be MyDialog. The UpdateData (FALSE); .
MyDialog m_DlgTab2. The UpdateData (FALSE); Ok, I ask if I'm here to m_csMemoryStatus=szMemoryUsage; The UpdateData (FALSE); Without object, why can also be successful it will generate temporary objects
  • Related