| View previous topic :: View next topic |
| Author |
Message |
samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Mon Feb 11, 2008 10:09 pm Post subject: [C++] Calculating the lParam for WM_SYSKEYDOWN |
|
|
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.
_________________
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Mon Feb 11, 2008 10:17 pm Post subject: |
|
|
| Maybe you'd have better luck sending WM_CHAR first off?
|
|
| Back to top |
|
 |
samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Mon Feb 11, 2008 10:18 pm Post subject: |
|
|
What I'm trying to do is send a key combination like
For example, to get to the File menu of notepad.
_________________
|
|
| Back to top |
|
 |
sponge I'm a spammer
Reputation: 1
Joined: 07 Nov 2006 Posts: 6009
|
Posted: Tue Feb 12, 2008 12:42 am Post subject: |
|
|
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 |
|
 |
samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Tue Feb 12, 2008 3:31 pm Post subject: |
|
|
| 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?
_________________
|
|
| Back to top |
|
 |
|