Top "Mfc" questions

This tag should be used for questions concerning Microsoft Foundation Class Library (MFC), a C++ framework for Windows desktop GUI application programming.

Cannot convert parameter 1 from 'const wchar_t *' to 'LPCTSTR' in MFC / C++ project

I get a compilation error on the line: MessageBox(e.getAllExceptionStr().c_str(), _T("Error initializing the sound player")); Error 4 …

c++ string mfc tchar lpcwstr
Is there any way to check if pointer is dangling?

I have a code where I use a pointer to access some datablock. In some rare cases, a few members …

c++ pointers mfc dangling-pointer
VC++ 10 MFC: What is the correct way to do localization

I am a .NET guy who is having to do some work on an MFC app. The app is a …

mfc localization visual-c++-2010 resource-file string-table
C++ MFC how to compare LPCTSTR in a if statement?

I have the following code: LPCTSTR strPermission = Method(); if (strPermission == L"0") { return true; } else { return false; } While debugging I can …

c++ string mfc compare lpcstr
Get Index of Item Text in MFC CListCtrl

I've got a CString with a Text that also is an Item Text of my CListCtrl. For example: CString m_…

c++ mfc clistctrl
windows.h and MFC

Why can't I include windows.h in afx(MFC) projects?

c++ mfc afx
Migrating a big project in MFC from Visual C++ 6.0 to Visual Studio 2005

I am maintaining a big project (~250k loc, not counting code generated from idl) in Visual C++ 6.0, that uses Visibroker (…

c++ visual-c++ visual-studio-2005 mfc corba
Warning C26454: Arithmetic overflow: '-' operation produces a negative unsigned result at compile time (io.5)

Code analysis: ON_NOTIFY(TCN_SELCHANGE, IDC_TAB_HISTORY_TYPE, &CAssignHistoryDlg::OnTcnSelchangeTabHistoryType) Warning C26454: Arithmetic overflow: '-' operation produces …

c++ mfc visual-studio-2017 code-analysis treecontrol
Convert a modeless dialog to modal at runtime

I have a dialog (CDialog derived class) that can be used in two different ways (edition mode and programming mode). …

mfc modal-dialog cdialog
embed DLL in MFC C++ EXE?

Is it possible to embed an external CLI/C++ DLL into a MFC EXE as a embedded resource or something …

c++ mfc external command-line-interface loadlibrary