![]() ![]() The data you get back from GetBitmapBits has to be alligned to a mulitple of 2 bytes per row of the image. So 1 byte of the image defines 8 pixels (as 1 byte is 8 bits). Therefore 1 bit defines 1 pixel in the mask. i would like to know why (im serious)Ĭan you please tell me exactly what do padBits and bytesToIgnore do exactly?īasically the mask is a 1-bit image. Make cursor visable in virtualmachine code#Hey can you please explain me how does your code work? you said it is more efficient than mine. I think i did it myself though, i tested a lot of cursors and everything seems to work right Thanks a lot :D but it seems to have some problems with the black and white cursors. I'm not 100% on the black and white cursor one - I'm currently ignoring the XOR part of the icon. Int padBits = (bitmap.bmBitsPixel * bitmap.bmWidth) % 16 GetBitmapBits(m_ii.hbmMask, bitmap.bmWidthBytes * bitmap.bmHeight, bitmapBits) other than that it works and paints the cursor too with a black backgroundĪlso i hope im not mistaking that i think the black color is the transparent color for all mouse cursors right? 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. ![]() What i get on the MessageBox is right until i set the cursor as "Use Default" in Control Panel - Mouse - Pointers (Windows XP). Unsigned char * index1 = bitmapBits + (height * bitmap.bmWidthBytes) Unsigned char * index = bitmapBits + (height * bitmap.bmWidthBytes) įor ( height = (bitmap.bmHeight/2) - 1 height > = 0 -height ) Int padBits = (bitmap.bmBitsPixel * bitmap.bmWidth) % 32 įor ( height = bitmap. GetBitmapBits(m_ii.hbmMask, bitmap.bmWidthBytes * bitmap.bmHeight, bitmapBits) Unsigned char* bitmapBits = new unsigned char GetObject(m_ii.hbmMask, sizeof(BITMAP), &bitmap) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |