but if i use RT_GROUP_ICON, i will get what i need. it's confused some RC const's...
but now i can update more my function:
string GetResourceType(DWORD ResourceID)
{
HRSRC rscFind;
rscFind=FindResource(GetModuleHandle(NULL),(LPCTSTR) MAKEINTRESOURCE(ResourceID), "anicur");
if(rscFind!=NULL)
return "ANICUR";
rscFind=FindResource(GetModuleHandle(NULL),(LPCTSTR) MAKEINTRESOURCE(ResourceID), "aniico");
if(rscFind!=NULL)
return "ANIICO";
rscFind=FindResource(GetModuleHandle(NULL), (LPCTSTR) MAKEINTRESOURCE(ResourceID), "bmp");
if(rscFind!=NULL)
return "BMP";
rscFind=FindResource(GetModuleHandle(NULL), (LPCTSTR) MAKEINTRESOURCE(ResourceID), RT_BITMAP);
if(rscFind!=NULL)
return "BMP";
rscFind=FindResource(GetModuleHandle(NULL),(LPCTSTR) MAKEINTRESOURCE(ResourceID), "cur");
if(rscFind!=NULL)
return "CUR";
rscFind=FindResource(GetModuleHandle(NULL), (LPCTSTR) MAKEINTRESOURCE(ResourceID), "ico");
if(rscFind!=NULL)
return "ICO";
rscFind=FindResource(GetModuleHandle(NULL), (LPCTSTR) MAKEINTRESOURCE(ResourceID), RT_GROUP_ICON);
if(rscFind!=NULL)
return "ICO";
rscFind=FindResource(GetModuleHandle(NULL), (LPCTSTR) MAKEINTRESOURCE(ResourceID), RT_ICON);
if(rscFind!=NULL)
return "ICO";
rscFind=FindResource(GetModuleHandle(NULL), (LPCTSTR) MAKEINTRESOURCE(ResourceID), "gif");
if(rscFind!=NULL)
return "GIF";
return "OTHER";
}
how these function works:
if FindResource() returns NULL, means that the resource ID or type are wrong. using these thot, i create these function. now it can be automatic.
thanks for all