Click here to Skip to main content
16,008,469 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questiontwo views on single print preview in mfc Pin
RVShetty6-Jul-06 0:16
RVShetty6-Jul-06 0:16 
QuestionRemote Desktop Pin
Sarath C6-Jul-06 0:03
Sarath C6-Jul-06 0:03 
NewsRe: Remote Desktop Pin
KarstenK6-Jul-06 1:02
mveKarstenK6-Jul-06 1:02 
GeneralRe: Remote Desktop Pin
Sarath C6-Jul-06 1:04
Sarath C6-Jul-06 1:04 
QuestionSending keys Pin
Smith#6-Jul-06 0:02
Smith#6-Jul-06 0:02 
AnswerRe: Sending keys Pin
Justin Tay6-Jul-06 0:05
Justin Tay6-Jul-06 0:05 
GeneralRe: Sending keys Pin
Smith#6-Jul-06 0:17
Smith#6-Jul-06 0:17 
GeneralRe: Sending keys [modified] Pin
Justin Tay6-Jul-06 0:46
Justin Tay6-Jul-06 0:46 
Yes it's not possible to specify a window as it's simulating keys at the lowest level. You would have to set the window as the foreground window.

Raymond talks about this. You can also read the comments for more good info.

http://blogs.msdn.com/oldnewthing/archive/2005/05/30/423202.aspx[^]

Using PostMessage with WM_KEYDOWN / WM_KEYUP / WM_SYSKEYDOWN / WM_SYSKEYUP (WM_CHAR is generated by the TranslateMessage function) might work with a number of applications though (there's that problem with key states though). You would have to test with all the applications you wish to send input to if you would like to still continue with this route.

-- modified at 6:49 Thursday 6th July, 2006
GeneralRe: Sending keys Pin
ThatsAlok6-Jul-06 1:22
ThatsAlok6-Jul-06 1:22 
GeneralRe: Sending keys Pin
Smith#6-Jul-06 1:57
Smith#6-Jul-06 1:57 
GeneralRe: Sending keys Pin
ThatsAlok6-Jul-06 2:02
ThatsAlok6-Jul-06 2:02 
AnswerRe: Sending keys Pin
Muhammad Azam6-Jul-06 1:37
Muhammad Azam6-Jul-06 1:37 
GeneralRe: Sending keys Pin
Smith#6-Jul-06 1:58
Smith#6-Jul-06 1:58 
QuestionRe: Sending keys Pin
Smith#6-Jul-06 1:59
Smith#6-Jul-06 1:59 
AnswerRe: Sending keys Pin
Muhammad Azam6-Jul-06 2:27
Muhammad Azam6-Jul-06 2:27 
AnswerRe: Sending keys Pin
Muhammad Azam6-Jul-06 2:41
Muhammad Azam6-Jul-06 2:41 
GeneralRe: Sending keys Pin
Smith#6-Jul-06 3:22
Smith#6-Jul-06 3:22 
AnswerRe: Sending keys Pin
David Crow6-Jul-06 3:31
David Crow6-Jul-06 3:31 
GeneralRe: Sending keys Pin
Smith#6-Jul-06 19:18
Smith#6-Jul-06 19:18 
QuestionWIndows xp Pin
ashish dogra5-Jul-06 23:59
ashish dogra5-Jul-06 23:59 
AnswerRe: WIndows xp [modified] Pin
ashish dogra6-Jul-06 0:19
ashish dogra6-Jul-06 0:19 
GeneralRe: WIndows xp Pin
toxcct6-Jul-06 0:38
toxcct6-Jul-06 0:38 
GeneralRe: WIndows xp Pin
ashish dogra6-Jul-06 0:52
ashish dogra6-Jul-06 0:52 
GeneralRe: WIndows xp Pin
Hamid_RT6-Jul-06 1:03
Hamid_RT6-Jul-06 1:03 
GeneralRe: WIndows xp Pin
ashish dogra6-Jul-06 1:07
ashish dogra6-Jul-06 1:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.