flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution 19 Sep 2008, 05:13
To simulate keystrokes have a look at keybd_event.
But perhaps an easier method is just a simple PostMessage. |
|||
![]() |
|
SPTH 19 Sep 2008, 05:38
Thanks a lot, that has helped.
see the code: Code: invoke keybd_event, VK_MENU, 0x0, 0x0, 0x0 invoke keybd_event, VK_F4, 0x0, 0x0, 0x0 invoke keybd_event, VK_MENU, 0x0, KEYEVENTF_KEYUP, 0x0 invoke keybd_event, VK_F4, 0x0, KEYEVENTF_KEYUP, 0x0 quite easy, and does exactly what i want - great! :) |
|||
![]() |
|
shoorick 19 Sep 2008, 08:11
send WM_CLOSE
|
|||
![]() |
|
SPTH 19 Sep 2008, 12:38
WM_CLOSE minimizes the window, WM_DESTROY is what I would need (also tried that), but the to-be-destroyed window was no child-window -> did not work with WM_DESTROY
[edit]Ignore that post, it's misinformation - sorry +g+[/edit] Last edited by SPTH on 19 Sep 2008, 22:44; edited 1 time in total |
|||
![]() |
|
revolution 19 Sep 2008, 12:47
WM_QUIT is meant to end the task. That is what Windows sends if you click the close button.
[edit]the above is not correct, see the messages below for what really happens.[/edit] Last edited by revolution on 19 Sep 2008, 13:32; edited 1 time in total |
|||
![]() |
|
Tomasz Grysztar 19 Sep 2008, 13:23
revolution wrote: WM_QUIT is meant to end the task. That is what Windows sends if you click the close button. Are you sure? On my system it sends WM_CLOSE. |
|||
![]() |
|
revolution 19 Sep 2008, 13:25
Oh, is that wrong? I always use the WM_QUIT to signal the message loop exit and then call ExitProcess.
|
|||
![]() |
|
Tomasz Grysztar 19 Sep 2008, 13:27
Well, it's OK tu use it for this purpose, as this is exactly what it's for. I just mean that when you press the close button, Windows just sends you a WM_CLOSE message, and to send the further WM_QUIT message in such case is your own choice.
|
|||
![]() |
|
revolution 19 Sep 2008, 13:31
Oh dear, it has been a while since I had to manually write a WndProc that I had completely forgotten that the app calls PostQuitMessage (or just PostMessage with WM_QUIT). Sorry about the misinformation above.
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.