how draw correctly a transparent Cursor(*.cur)?

how can i draw correctly a transparent Cursor(*.cur)?
Last edited on
heres my actual code:
1
2
3
4
5
6
7
8
9
10
11
12
13
void DrawHCURSORtoHDC(HDC hdc, HCURSOR hIcon, int PosX=0, int PosY=0)
{
    BITMAP BMInf;
    ICONINFO    csII;
    GetIconInfo(hIcon, &csII);
    GetObject(csII.hbmColor, sizeof(BMInf), &BMInf);
    BitmapDC MemDCExercising(BMInf.bmWidth ,BMInf.bmHeight);
    DrawIcon(MemDCExercising,0,0,hIcon);
    TransparentBlt(hdc, PosX, PosY, BMInf.bmWidth , BMInf.bmHeight, MemDCExercising, 0, 0,BMInf.bmWidth , BMInf.bmHeight,GetPixel(MemDCExercising,0,0) );
    DestroyCursor(hIcon);
    ::DeleteObject(csII.hbmColor);
    ::DeleteObject(csII.hbmMask);
}

heres the print:

http://postimg.org/image/ss3u259bf/

the is the best i can do... but 1 black line isn't showed. if i don't do transparent, i will get a black color background.(i can show you too)
what you can tell me?
Topic archived. No new replies allowed.