AutoHotkey Community

It is currently May 27th, 2012, 12:37 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: January 10th, 2010, 2:23 am 
Offline

Joined: December 14th, 2009, 11:00 pm
Posts: 9
Hi,
I created the code below (it's not the whole part of the script)... What it does, it takes a screenshot of a (non-visible) window and projects it in a GUI... What I want to do is this: I want the screenshot projected rotated 90 degrees...

I did some research, and found the Gdip_RotateWorldTransform function inside the Gdip.ahk... I included the Gdip.ahk in my script and tried everything, but I cant get it to rotate with the Gdip_RotateWorldTransform function... I am really desperate now as I really need to get it to work...

Does anyone care to help me out here? I'm offering $15 (can transfer to PayPal/PokerStars) to the person who gets it to rotate...

Code:
; Set up a DC
hdc_frame := DllCall( "GetDC", UInt, LobbyRadarID )
hdc_buffer := DllCall("gdi32.dll\CreateCompatibleDC", UInt,  hdc_frame)
hbm_buffer := DllCall("gdi32.dll\CreateCompatibleBitmap", UInt,hdc_frame, Int,LobbyW, Int,LobbyH)

DllCall( "gdi32.dll\SelectObject", UInt,hdc_buffer, UInt,hbm_buffer)

    ; This line takes the screnshot
    DllCall( "PrintWindow", UInt , LobbyID, UInt , hdc_buffer , UInt , 0 )

    ; This crops the screen if we want to copy a small section of the table
DllCall("gdi32.dll\BitBlt" , UInt,hdc_frame, Int, 0, Int, 0, Int, Lobby1WRadar, Int, 13, UInt,hdc_buffer, Int, Lobby1CropXRadar, Int, Lobby1Y , UInt, 0xCC0020)

;DllCall("RedrawWindow","UInt",LobbyID,"UInt",0,"UInt",0,"UInt", 1|4|64|1024)
DllCall( "gdi32.dll\DeleteObject", "uint", hbm_buffer )
DllCall( "gdi32.dll\ReleaseDC"    , "uint", hdc_frame )
DllCall( "gdi32.dll\DeleteDC"    , "uint", hdc_frame )
DllCall( "gdi32.dll\DeleteDC"    , "uint", hdc_buffer )

_________________
My little AHK project: http://www.tableofinterest.com


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 10th, 2010, 2:34 am 
Offline

Joined: December 14th, 2009, 11:00 pm
Posts: 9
This is the line I tried to place in the code, but it didnt project the image rotated, I tried to put the line everywhere... The image just keeps being projected non-rotated

Code:
DllCall("gdiplus\GdipRotateWorldTransform", "UInt", hdc_buffer, "Float", 90, "Int", 0)

_________________
My little AHK project: http://www.tableofinterest.com


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 10th, 2010, 2:46 am 
Offline

Joined: March 27th, 2009, 10:48 pm
Posts: 71
http://www.autohotkey.com/forum/viewtopic.php?t=32238

Example 10: Gdip.Tutorial.10-Rotate.Flip.or.Mirror.an.image.ahk


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 10th, 2010, 2:51 am 
Offline

Joined: December 14th, 2009, 11:00 pm
Posts: 9
Quote:
http://www.autohotkey.com/forum/viewtopic.php?t=32238

Example 10: Gdip.Tutorial.10-Rotate.Flip.or.Mirror.an.image.ahk


Yeah,
I looked into that code for like 3 hours (tried like 234854 things), but still I cant get it rotate in my code... Im not sure what im doing wrong.

I hope someone can help, im desperate, im offering $15 on paypal...

_________________
My little AHK project: http://www.tableofinterest.com


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 10th, 2010, 5:27 am 
Never mind, I solved it


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: chaosad, jrav and 20 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group