02 2025 档案
摘要:转自 AfxGetMainWnd()为什么返回NULL 通常认为AfxGetMainWnd()会返回主窗口的指针。实际上有“前提条件”的。即返回当前调用AfxGetMainWnd()的线程的主窗口指针。 所以如果在程序的主线程中调用AfxGetMainWnd(),则返回程序(主线程)的主窗口指针。
阅读全文
摘要:CString strValue(_T("")); GetPrivateProfileString("保存路径", "本地", "0", strValue.GetBuffer(256), 256, iniPath); strValue.ReleaseBuffer(256); m_LocalPath
阅读全文