get visible mouse cursor height
hey does anybody know how to get the visible part (not the transparent background) of the current used mouse cursor? i know they are all 32x32 and im trying to make my own ToolTip control and place it exactly under the visible mouse cursor..
im using MFC in Visual C++ 6.0
this is what i currently have:
m_ii is a ICONINFO
GetObject(m_ii.hbmColor, sizeof(BITMAP), &bitmap);
height = 0;
for(i = bitmap.bmWidth - 1; i >= 0; i--)
for(j = bitmap.bmHeight - 1; j >= 0; j--)
if(dc.GetPixel(i, j) != RGB(0, 0, 0))
if(height < j)
height = j;
MessageBox("height: " + txt);
what i get on the MessageBox is right until i set the cursor as "Use Default" in Control Panel - Mouse - Pointers (Windows XP)..
it gets invalid (a weird large number) bitmap.bmWidth and bitmap.bmHeight and i also tried painting the cursor and it will just paint a black square when i do that.. other than that it works and paints the cursor too with a black background
also i hope im not mistaking that i think the black color is the transparent color for all mouse cursors right?