AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Help converting SendMessage parm from C to AHK

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
jballi



Joined: 01 Oct 2005
Posts: 349
Location: Texas, USA

PostPosted: Fri Jun 13, 2008 4:10 pm    Post subject: Help converting SendMessage parm from C to AHK Reply with quote

I can read some C but this one has me baffled. Hopefully this is an easy one for the all of the C experts out there.

I'm trying to convert a particular lParam parameter of a SendMessage command from C to AutoHotkey. In C, the parameter is written as follows:
    (LPARAM)&pt

For example:
    SendMessage(m_hWnd, LVM_SETITEMPOSITION32, nItem, (LPARAM)&pt)

I know that &pt is a pointer to a POINT structure but what the heck is the "(LPARAM)" part?

This exact parameter syntax is not unique to a single C program. I found it repeated in hundreds of programs.

Thanks in advance for your help.
Back to top
View user's profile Send private message
Guest






PostPosted: Fri Jun 13, 2008 5:05 pm    Post subject: Reply with quote

(LPARAM) is just keeping the C compiler happy. Just send the &pt.
Back to top
jballi



Joined: 01 Oct 2005
Posts: 349
Location: Texas, USA

PostPosted: Fri Jun 13, 2008 10:46 pm    Post subject: Reply with quote

That's what I was afraid of. Thanks. Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group