I understand.
It would be nice to have that Spy++ tool, but I'm not using Visual Studio. I'm using Codewarrior. Is there some other tool I could use to find if it is a registered message, and show the name under which it is registered?
My program doesn't have any application-specific messages to dispatch. It has to be a default windows message...
I made a giant switch statement containing every windows message in existance. Unfortunately, neither 0xC109 nor 0xC10C register under any of the messages I placed. Heck, 15 didn't...
I'm using PeekMessage in my message queue, but try to filter any messages not needed. For example, I tell my program to ignore any key-down messages because I handle input differently.
Recently, however, I've been getting messages reguardless of my not interacting with the program at all. The...
I use the string class to edit strings. I never edit anything using the LPTSTR. However, many of the functions I use require LPTSTR as arguments.
So...
How SHOULD I approach the conversion from a string class to a LPTSTR, since I shouldn't use c_str()?
It didn't work. All allocating memory did was fill the string with nonsense (something like "A<*knz") and make GetCurrentDirectory refuse to place anything in it at all.
So if I changed it to, say, this
LPTSTR tempStr = new char[30];
DWORD temp = 0;
GetCurrentDirectory(temp, tempStr);
then memory wouldn't overflow, and it might solve the problem. I'll try it.
Sort of...
My program is completely object oriented, with thousands of lines of code, and dozens of classes. However, I tried to narrow it down as simply as possible. I can't give you the files it tries to open, but I can at least show you the code and what it's trying to do.
What you're...
I am working with strings (using them as path names for loading files), and I have the following, really basic line of code:
string temp = "";
That's it. No tricks here.
However, when I execute this in the debug environment, the compiler sets the variable equal to...well...a directory path...
I am using a compiler that does not provide a means to associate an icon with my application. Is there a way around this?
(preferably a free way. I've seen a lot of purchasable applications whose job is to associate icons with programs...)
Apparently there were two sites for the same function. One for .net code, and one for normal C++ WinAPI code. I saw "C++" and thought it was the one I wanted. Then I found the other site with the code I REALLY wanted. Temporarily confusing...but I worked it all out.
Is there an API call that will return the path to the directory the application is located at?
MSDN says GetCurrentDirectory should work, but when I tried using the example code for it, my compiler spit back errors at me saying the "#using <mscorlib.dll>" was an undefined preprocessor...
I am unfarmiliar with MFC. However, I DO know how to use the MS WinAPI, which is what the MFC are based on, to do exactly what you want. If it's a stand-alone application, you might think about trying WinAPI code. I show how to do this below...
You'd want to start by creating a new bitmap of...
I have a class:
class Object
{
public:
LPTSTR getName();
private:
LPTSTR lpstr_ObjectName;
};
LPTSTR Object::getName()
{
return lpstr_ObjectName;
}
I have another class:
class SomeOtherClass : Object
{
public:
void...
Does anyone know how to store the code behind the functions for a class in a DLL? I know how to store them in an LIB, and I know how to store regular functions in a DLL, but I can't figure out how to write the functionality for a class in a DLL and load THAT in.
Thanks
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.