-
Recent Posts
Recent Comments
Mike T. on Code snippet Using WMI via… Drew Canitz on minimal ATL window eskici on file transfer over synchronous… Rose on Purify reported error entry po… duongnguyenvan on file transfer over synchronous… Archives
- August 2018
- March 2018
- May 2017
- July 2012
- May 2012
- April 2012
- March 2012
- January 2012
- October 2011
- September 2011
- July 2011
- June 2011
- May 2011
- April 2011
- October 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- July 2009
- June 2009
- May 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
- April 2006
- March 2006
- February 2006
- January 2006
- December 2005
- November 2005
Categories
Meta
Category Archives: MFC
IE7 compatibility issue
An application used wininet.dll works properly on system with IE6 installed, but failed to allocate 800MB memory on system with IE7 installed. The address space is fragmented by the following 2 DLLs 3d930000 3da01000 WININET C:\WINDOWS\system32\WININET.dll 3dfd0000 3e015000 iertutil C:\WINDOWS\system32\iertutil.dll … Continue reading
Posted in CPP, MFC
Leave a comment
minimal MFC window
#define _WIN32_WINNT 0x0501 #include <afxwin.h> struct CMainFrame : public CFrameWnd { CMainFrame() { Create(NULL, “Onega’s mini MFC Application”); } void CMainFrame::OnPaint() { CRect rect; GetClientRect (&rect); CPaintDC dc(this); CString msg = “Compile command: cl minimfc.cpp /link /subsystem:windows”; dc.DrawText(msg, &rect, DT_SINGLELINE … Continue reading
Posted in CPP, GUI, MFC, Uncategorized
Leave a comment
ATL, MFC and scoped_any
I am glad to found Achieve More Reliable Resource Management with Our Custom C++ Classes, but when using it in a unit test project, I got weird compile error. The error points to line 238 of scoped_any.h DECLARE_SMART_ANY_TYPEDEFS(scoped) and according … Continue reading
Posted in MFC
Leave a comment
Reusing CWinApp derived MFC class in Console application
Once I have to integrate a MFC GUI application into a console application. The MFC has a global "theApp" object, but I also want to change something before its ctor was called, so I moved "theApp" from global to local … Continue reading
Posted in MFC
Leave a comment
Code snippet Using WMI via C++/CLI
#include "stdafx.h"#using < system.management.dll>using namespace System;using namespace System::Management; int main(array<System::String ^> ^args){ Console::WriteLine(L"Query processor count via CLI by Onega"); ConnectionOptions^ options = gcnew ConnectionOptions(); //options->Password = L""; //options->Username = L""; //options->Authority = "NTLMDomain:" ; options->Impersonation = ImpersonationLevel::Impersonate; ManagementScope^ scope … Continue reading
VC++ 9.0 Express edition web setup
It depends on proxy settings of IE, but does not understand pac (proxy automatic configuration file) settings.
Posted in MFC
Leave a comment
LoadIcon() failed in Ctor of CDialog derived class
Once I encountered an application that raise runtime error in Ctor of a CDialog derived class at the following line: m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); After revisiting the program, I found that there is a global variable of this dialog class, this … Continue reading
Posted in MFC
Leave a comment