getting global cursor handle across all windows OS versions

Win32 Programming

    Next

  • 1. Scaling an image and getting an HBITMAP
    :Warning.Newbie GDI+ question I am trying to use Gdi+ to load a JPEG, scale it, and retrieve a Gdi HBITMAP handle that I can pass on to some old Gdi code. I got two of the parts working fine. I loaded a a JPEG and retrieved an HBITmap. Like this: Bitmap bitmap(Path) ; HBITMAP hBitmap = 0 ; bitmap.GetHBITMAP(RGB(255,255,255),&hBitmap) ; That was easy I thought. But now I'm having trouble scaling the image. I've tried this: Image image(Path) ; Graphics graphics(&image) ; Bitmap bitmap(cx,cy,&graphics) ; HBITMAP hBitmap = 0 ; bitmap.GetHBITMAP(RGB(255,255,255),&hBitmap) ; I don't think I'm hitting any errors, but when I draw the HBITMAP, I just get a blue rectangle. Can someone please point me in the right direction? Thanks a lot. David Liebtag

getting global cursor handle across all windows OS versions

Postby Mrityunjay Kumar » Tue, 19 Aug 2003 23:07:43 GMT

Hi
I am using the CURSORINFO and GetCursorInfo
to get the info about the global cursor.
now my code crashes in nt4 sp6.
I tried the GetCursor() but it returns the ccalling threads handle !!
Is there a way compatible in all the windows versions to get the global
handle and subsequently cursor image ?

regards
Mahesh




Re: getting global cursor handle across all windows OS versions

Postby Jeff Partch » Tue, 19 Aug 2003 23:15:09 GMT




global

See if the solution in the following kb article works for you...

 http://www.**--****.com/ %3Ben-us%3BQ230495

-- 
Jeff Partch [VC++ MVP]




Return to Win32 Programming

 

Who is online

Users browsing this forum: No registered users and 53 guest