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
Say I have a class. It is a very large class and belongs to a group of other classes that implement themselves/inherit from themselves, etc...
These classes can be declared a giant header file without much trouble or confusion if documented in an organized way. Now, the usual way of implemeting...
First of all, I would like to thank you for the link to that article. It was an interesting read, and will do me nothing but good in getting things to animate.
With that said, I finally found out that the real problem with my program (and the reason I could never figure out what was wrong with...
Most of the function definition problems I have have a number associated with the stdcall. Before this, the most common number was 16...
I never so much as browsed to the location of the header file, much less opened it. I didn't want to mess with any pre-written code until I was sure I knew...
I have been using the DirectInput libraries recently to get hold of the keyboard. However, I haven't been able to do so much as initialize an instance of the IDirectInput class due to the face that my compiler keeps complaining that the IID_IDirectInput8A GUID definition is not defined in the...
I have had a number of problems recently with certain functions and GUIDs not being defined properly/not being read properly by the compiler. My guess is that eithor a windows library is corrupt, or I need to change a setting in my compiler...
Anyway, the problem is that when I tried using 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.