Home > Software engineering >  Visit SetDlgItemText function about static function
Visit SetDlgItemText function about static function

Time:09-17

Is that the main class in the MFC ADlg inside, I created a static function, ADlg class is the main window, I want to use SetDlgItemText or GetDlgItem in static function, display cannot be static function calls a static member function, so how to call

CodePudding user response:

Can add a parameter passing in static function dialog class pointer XXXFun (CXXXDlg * pDlg,
Deposit or use global variables dialog box class pointer,
If it is based on the dialog box, also can try AfxGetMainWnd

CodePudding user response:

Where such as AfxGetMainWnd written in ADlg class

CodePudding user response:

I created a static function entry without this
  • Related