I'm having an issue where the MAKEINTRESOURCE macro always seems to return a bad pointer whenever I pass it my MFC resource ID's. The resource ID's are all listed in Resource.h and they match up with what the ID's are set to in the resource properties.
I'm new to MFC so I'm not entirely sure I understand how the resources & their ID's work, but it seems to me that the bad pointers would indicate that my resources aren't being stored in the correct place in memory? This is an old project that I'm trying to add something new to, and I checked anf when I try doing MAKEINTRESOURCE with older resources (that are definitely working, they show up and are functional when I run the application) I also get bad pointers.
What could be causing this?
edit: the project is using the unicode character set as well, if that makes any difference
MAKEINTRESOURCE
encodes an integer inside a pointer. It's not a pointer you can dereference; the only thing you can do with it is pass it to a resource function. – Raymond ChenInclude\WinUser.h:150:#define MAKEINTRESOURCEW(i) ((LPWSTR)((ULONG_PTR)((WORD)(i))))
– i_am_jorf