To be honest, I'm not quite sure how you've managed this! The problem has nothing to do with file handling - it's a linking problem. The compiler cannot find the library containing the file stream classes you're referencing in your code. Whenever you see 'error LNK2001' then you know that the...
Also - your class data members (cFname, cLname, and iIDNumber) should be either protected or private. They should not be directly accessible outside the scope of your class. This is good programming practice, but on a more fundamental level, data hiding is the whole point of C++ classes.
Add...
If you declare a pointer to your class, don't forget to use the 'new' and 'delete' operaters, otherwise referencing a null pointer will cause a runtime error:
MyClass* pMyClass;
pMyClass = new MyClass;
pMyClass->FuncA(x);
delete pMyClass;
A much simple solution is:
MyClass myclass...
I'm not sure if you're asking about which ADO command to use (I assume that's what you're using) or how to handle a Windows message triggered when a button is clicked?
Phil
Windows based graphics (which is what you're talking about) is quite a large leap from console apps. I'd recommend finding a class which does this for you rather than struggle through yourself, otherwise you've got quite a steep learning curve ahead of you.
If you want to learn, find an...
Check that the first three params you are passing are definitely Unicode strings. I've had a similar problem myself where an ANSI string was causing function failure.
Alternatively, try doing the memory allocation/deallocation yourself (as with Win9x) and see what happens. Phil
I'm guessing, but I assume it would cause a memory leak if you don't call EndPaint after each call to BeginPaint, and if your window client area is being updated frequently (as it probably will be) that's going to have quite a big impact on resources. Phil
I'm guessing you want to get a handle to the DC of your dialog's client area, but you haven't said whether you're doing this using the Win32 API or MFC. Phil
Try the Windows API function MsgWaitForMultipleObjectsEx which takes a timeout value as one of it's parameters. I'm not sure whether it's the right thing for Winsock, but I've used it for communicating with Pocket PCs with 100% success. Phil
References to all project resources are contained in the '<name>.rc' file. Open it in Notepad to view the contents (if you double-click it in Visual Studio, it will simply launch the resource editor).
To change the MFC icon, remove the current one and either insert an existing icon or draw your...
Hi Cantalope
My only question is why on earth would you want to do this??? Console apps are specifically designed for quick output of text-only data. If you want to display a bitmap, create a Windows window or MFC window and display it in that. Phil
OnOk is a member of the CDialog and CPropertyPage MFC classes. It's not a global Win32 function and can't just be called without some form of scope resolution (::) unless your class is specifically derived from the two classes just mentioned.
If you create a dialog based application using the...
Without linking your DLL to the MFC runtimes, no you won't be able to use any of the MFC classes (such as CObject, etc). The MFC libraries are an annoying overhead, both in terms of performance and size (especially when you have to ship them with a relatively small application) but I think the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.