Nov 19, 2014 at 1:16pm Nov 19, 2014 at 1:16pm UTC
when using win32 always check return value (see what each function return on msdn).
See if bitimage
is NULL
, and it it is, use GetLastError
.
Same with SetMenuItemBitmaps
. Compare result with 0 then get last error to see what you do wrong.
Nov 20, 2014 at 12:08am Nov 20, 2014 at 12:08am UTC
resolved:
1 2 3 4 5 6 7 8 9
void bitmap(string filename)
{
HBITMAP bitimage = (HBITMAP)LoadImage( NULL, filename.c_str(), IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);
if (primeiromenu==true )
SetMenuItemBitmaps(GetMenu(WindowMain),menuposition,MF_BYPOSITION ,(HBITMAP)bitimage,(HBITMAP)bitimage);
else
SetMenuItemBitmaps(MenuHandle,menuposition,MF_BYPOSITION ,(HBITMAP)bitimage ,(HBITMAP)bitimage);
}
thanks for all
PS: is there any option for, when create the new thread, the mail notification been selected by defauld?
Last edited on Nov 20, 2014 at 12:11am Nov 20, 2014 at 12:11am UTC