How to retrieve current location in DC

Win32 Programming

    Next

  • 1. How to set PICTURE_TRANSPARENT on IPicture?
    Hi, Is it possible to make IPicture to behave as transparent image if it is constructed from HBITMAP? I use OleCreatePictureIndirect to construct IPicture object from HBITMAP. Bitmap (with palette) are already loaded with other code (I use CxImage library). If I load image (transparent GIF) with OleLoadPicturePath then I get normal transparent IPicture. Is it possible to make it transparent when loaded with OleCreatePictureIndirect? Here is how function looks like: <code> IPicture* __stdcall CxLoadPicture(char *szImg) { ....load image (transparent gif) and make hBmp and hPal... IPicture* pStdPic; PICTDESC pictDesc; memset(&pictDesc, 0, sizeof(pictDesc)); pictDesc.cbSizeofstruct = sizeof(pictDesc); pictDesc.bmp.hpal = hPal; pictDesc.bmp.hbitmap = hBmp; pictDesc.picType = PICTYPE_BITMAP; HRESULT hr; hr = OleCreatePictureIndirect(&pictDesc,IID_IPicture, TRUE, (void**)&pStdPic); return pStdPic; } </code>
  • 2. MapVirtualKey() returns wrong virtual keys
    Hi all, I used MapVirtualKey() to map a scan code into a virtual- key, the problem is when trying to map a "Numpad" scan code, it gives me wrong virtual-keys(from my point of view).. MapVirtualKeyEx() does the same.. For example: when I tried to map 'Numpad 9' scan code (which is 73) into a virtual key(which is 105) it returns 33! So what's the deal here? BTW: When calling ToAscii() it only recognizes the 105 virtual key as '9'. Thanks, Abdo
  • 3. gdi+ startup and shutdown in ActiveX dll
    Hello I am writing a ATL AciveX object that uses gdi+. Where should I put the GdiplusStartup and GdiplusShutdown calls? I have read in other posts that one shouldn't do this on a per functions basis. Thanks
  • 4. How can I set one picture as richedit control's background?
    Hi,everyone! Here is my question: I used one richedit control in my dialog and now I wanna to change it's background to one picture.I can't find the way to do that. Thanks for any help!!
  • 5. Slightly OT: Connecting Windows to Processes
    I'd like to write a quick app to determine the owning process (exe/servcice) for any window on the screen. Can this be done simply with the normal windows enumeration API or do I need something deeper? TIA Norm

Re: How to retrieve current location in DC

Postby John Carson » Fri, 04 Jul 2003 16:58:33 GMT







GetCurrentPositionEx  (The existence of this function can be a little hard
to discover because there is also a GetCurrentPosition function, which is a
DirectDraw function --- this can throw you off the track. Also, MoveToEx
doesn't list GetCurrentPositionEx as a related function.)


-- 
John Carson
1. To reply to email address, remove donald
2. Don't reply to email address (post here instead)



Return to Win32 Programming

 

Who is online

Users browsing this forum: No registered users and 1 guest