Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[C++] Calculating the lParam for WM_SYSKEYDOWN

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Mon Feb 11, 2008 10:09 pm    Post subject: [C++] Calculating the lParam for WM_SYSKEYDOWN Reply with quote

I've been trying to figure this out for a while, and it's about to drive me insane.

I'm trying to use PostMessage to send WM_SYSKEYDOWN to notepad. I've sent regular messages fine, whatever. However, I can't figure out how to calculate the lParam for WM_SYSKEYDOWN.

[url=http://msdn2.microsoft.com/en-us/library/aa924492.aspx[/url]MSDN[/url ] has this screwed up table, which is confusing the crap out of me. All the Google searches turn up pre-defined lParams, calculated by Spy++ or something..

So could someone please explain to me how you calculate this before I go insane?

I really would prefer not to have that weird ass

Code:

(LOWORD)((HIWORD)0x12903875)


crap, but if that's the only way, then lay it on me.

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Mon Feb 11, 2008 10:17 pm    Post subject: Reply with quote

Maybe you'd have better luck sending WM_CHAR first off?
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Mon Feb 11, 2008 10:18 pm    Post subject: Reply with quote

What I'm trying to do is send a key combination like

Code:

Alt+F


For example, to get to the File menu of notepad.

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
sponge
I'm a spammer
Reputation: 1

Joined: 07 Nov 2006
Posts: 6009

PostPosted: Tue Feb 12, 2008 12:42 am    Post subject: Reply with quote

It's almost exactly like a WM_KEYDOWN message. In fact... theres barely a difference.
Code:
http://msdn2.microsoft.com/en-us/library/ms646286(VS.85).aspx
[URL]BBCode screws up because of the parentheses. This one has something for each bit. 0-31... remember its right to left.
_________________
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Tue Feb 12, 2008 3:31 pm    Post subject: Reply with quote

sponge wrote:
It's almost exactly like a WM_KEYDOWN message. In fact... theres barely a difference.
Code:
http://msdn2.microsoft.com/en-us/library/ms646286(VS.85).aspx
[URL]BBCode screws up because of the parentheses. This one has something for each bit. 0-31... remember its right to left.


But I don't get it.

What I do for a WM_KEYDOWN is

Code:

lParam = (MapVirtualKey(VK_Whatever, 0) << 16) && 0x00FF0000;


I don't understand what it means by the 0-31. Does it mean that I actually have to screw with the different bits in the byte?

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites