I created a basic stringtable resource in Visual C ++. I am trying to access this resource. However, my program cannot find the resource. Here:
int main(int argc, char* argv[]) { HRSRC hRsrc; hRsrc = FindResource(NULL, MAKEINTRESOURCE(IDS_STRING102), RT_STRING); if (hRsrc == NULL) { printf("Not found\n"); } else { printf("Found\n"); } }
This program cannot find the resource and always returns null.
I created a simple raster resource, and this new program determines that it is just fine. Here:
int main(int argc, char* argv[]) { HRSRC hRsrc; hRsrc = FindResource(NULL, MAKEINTRESOURCE(IDB_BITMAP1), RT_BITMAP); if (hRsrc == NULL) { printf("Not found\n"); } else { printf("Found\n"); } }
This finds the bitmap.
Are stringtable resources handled differently with something?
source share