Calling Derived class functions using base class object
Hi AllI have three classclass Store{public:virtual void save();}class RegStore::public Store{public:void save();}class Settings{public:Store *st;}In settings constructor,Settings::Settings(Store...
View Articleis it okay to create an installer that copies CRT libraries to client machines?
Since not all client machines have msvcr80.dll and msvcm80.dll, is it okay from a legal perspective to have an installer copy them to the client machine's installation folder given that they are MS dlls?
View ArticleA breakpoint problem
Hi All,I’m working on a very old console application program that has been built on Visual Studio 2005 C++When I’m running it runs with no problems besides the following:It seems that I can’t put any...
View ArticleVirtual Function in C++
Hello guys, i am little bit confused about Virtual function in C++.in the following program the base class object 'b' only calls base class 'show()' function and derived class object 'd' calls only...
View ArticleHow to use SetCursor function?
I already tried a lot of ways but still cannot change the cursor during run-time. Any ideas?SetCursor function
View ArticleRetrieve credentials using InternetErrorDlg
I have basic authentication and tomcat/SSO enabled web server. First request to the server gives status code as 401(expected.) I prompt user for credentials using InternetErrorDlg function. Now I wish...
View ArticleCode breaks,don't know why
"Unhandled exception at 0x76009617"and it stops right here" while(msge.message != WM_QUIT) { // If there are Window messages then process them. if(PeekMessage( &msge, 0, 0, 0, PM_REMOVE )) {...
View ArticleEnumerating children problem
So I'm trying to find a radio button in a window.I'm using enumerate children function with the following function as processor:LONG style; style = GetWindowLong(hwnd, GWL_STYLE);...
View Articleerror MIDL2003: redefinition when compiling ATL generated idl with windows.h...
As part of a requirement, I had to include sql.h and windows.h in an ATL generated idl. Unfortunately, it keeps on complaining whensql.h is included1>c:\program files (x86)\windows...
View ArticleApplication Verifier(x64) fails with this simple program. Where is the bug?
f I run the following simple program under Application Verifier(x64) I get a heap error Heap block corrupted after being freed. 1971000 - Heap handle for the heap owning the block. 5803ef0 - Heap...
View Articleconsole app error - No such interface supported
I have a VS 2010 C++ application that is developed as a console app. When I build the application and run it on my developmetn PC, the application runs as expected. When I take the EXE and put it on...
View ArticleCMFCToolBar vs CToolbar LoadToolBar Usage Changes
Had older VS2005 MFC GUI project, imported to VS2010, that used CToolBar::LoadToolBar for standard toolbar, then upon program state changes called CToolBar::LoadToolBar to display a non-standard...
View ArticleHOWTO switch off back light of 1 from N monitors ?
As I learned here:http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/d2f6d4be-dcf0-4de2-94ef-5d46c426951aThe backlight of a panel can be switched on/off by sending the >>...
View ArticleWhich message do I get from a checkbox?
So I have a checkbox,and I want to execute some code when it gets checked.Which is the exact message I should look for when it's clicked:BST_CHECKED?
View ArticleEEFileLoadException on unit test(clr) using static lib(clr) and .Net assembly
I have a unit test project using shared MFC dll compiled with /clr. This test is instancing a class "Foo" from a static library (also using shared MFC and /clr) and then calling a method "virtual void...
View ArticleProblem with checking Checkbox
So,I'm enumerating all the childs of a window,and using this as a processor:LONG style; style = GetWindowLong(hwnd, GWL_STYLE); if((style & BS_TYPEMASK) == BS_AUTOCHECKBOX){...
View ArticleCCreateContext logistics
From investigation it appears as long as I create any 2nd views that are derived from CView (or one of it's derivated classes) using the mfc IMPLEMENT_DYNCREATE then I don't have to worry about any...
View ArticleHow to save the text file in the Documents folder
In a CLR project, windows form,I use SaveFileDialog control and richTextBox->LoadFile to save a text file:private: System::Void viewlog_Load(System::Object^ sender, System::EventArgs^ e) {...
View ArticleProject Migration from VC ++ 6.0 to VS 2008
Steps to migrate the code from VC ++ 6.0 to VS 2008? Please let me know. I need to migrate teh VC ++ 6.0 code to VS 2008 professional. I am getting lot of compilation errors. Where can I find the...
View ArticleVS2012: Missing class members in watch/quickwatch when class derived from std...
Quickwatch does not display class members if the class is derived from std::map. I first noticed this issue after upgrading from VS2010 to VS2012.Sample class snippet:class SmblsWthLval : public...
View Article