PostMesssage Virtual key code
-
I’m trying to send data to console window using PostMessage with WM_KEYDOWN. The third and fourth param for postmessage are WPARAM wParam, // virtual-key code LPARAM lParam // key data i.e. PostMessage( hwndDOS, WM_KEYDOWN, ‘K’, 0X10250001 ); Any idea how to translate my array (ascii data such as abcd, <> fg etc ) to third and fourth parameter? Thanks
-
I’m trying to send data to console window using PostMessage with WM_KEYDOWN. The third and fourth param for postmessage are WPARAM wParam, // virtual-key code LPARAM lParam // key data i.e. PostMessage( hwndDOS, WM_KEYDOWN, ‘K’, 0X10250001 ); Any idea how to translate my array (ascii data such as abcd, <> fg etc ) to third and fourth parameter? Thanks
Try this, haven't try it myselft but try you:
::SendMessage(hWnd,WM_KEYDOWN, VK_K, 0);
You have to vrite the virtual key (VK_K) not only K, the compiler doesn't recognize K. I'm not sure it will work in console window! A CONSOLE IS NOT A DOS APP!! REMEMBER THAT BUDDY!! ------------------------------ ©0d3 ©®4©k3® - That's me! :) ------------------------------
-
Try this, haven't try it myselft but try you:
::SendMessage(hWnd,WM_KEYDOWN, VK_K, 0);
You have to vrite the virtual key (VK_K) not only K, the compiler doesn't recognize K. I'm not sure it will work in console window! A CONSOLE IS NOT A DOS APP!! REMEMBER THAT BUDDY!! ------------------------------ ©0d3 ©®4©k3® - That's me! :) ------------------------------
I am not sure whether WM_KEYDOWN will work for a console app. You might have to do something else like redirecting STDIN or whatever. Nish Sonork ID 100.9786 voidmain www.busterboy.org If you don't find me on CP, I'll be at Bob's HungOut
-
I am not sure whether WM_KEYDOWN will work for a console app. You might have to do something else like redirecting STDIN or whatever. Nish Sonork ID 100.9786 voidmain www.busterboy.org If you don't find me on CP, I'll be at Bob's HungOut
As I said in the message! :) I've never do console apps because it's useless time for me doing console apps! ;) ------------------------------ ©0d3 ©®4©k3® - That's me! :) ------------------------------
-
As I said in the message! :) I've never do console apps because it's useless time for me doing console apps! ;) ------------------------------ ©0d3 ©®4©k3® - That's me! :) ------------------------------
It works with DOS window for AlphaNumerics. But any idea how to translate $ and & to VK_Key?
-
I’m trying to send data to console window using PostMessage with WM_KEYDOWN. The third and fourth param for postmessage are WPARAM wParam, // virtual-key code LPARAM lParam // key data i.e. PostMessage( hwndDOS, WM_KEYDOWN, ‘K’, 0X10250001 ); Any idea how to translate my array (ascii data such as abcd, <> fg etc ) to third and fourth parameter? Thanks
this thread ...and, yes, it will work for a console window. (Mind, the code needs a bit of cleanup :))