Click here to Skip to main content
15,895,798 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have a project in MFC which is integrated with a billing application.We have two seperate MFC window:
1)One for Billing App. and other for
2)the project.

Initially we log in with the project window.then we start transaction with the project window.after transaction we need to click a button on Billing Application,but the focus is still on the project window.How can we set the focus/KeyPressEvent to the Billing App?

Thanks,
ksh
Posted
Comments
Jochen Arndt 6-Sep-12 7:37am    
Is the billing app also build by you so that can add some code to it?
aksiit001 6-Sep-12 7:40am    
No,It is just another MFC window,thats it.We do not have any code for that to add/modify.
Jochen Arndt 6-Sep-12 7:50am    
Sorry, then I don't have a solution. But may be others can help you.
aksiit001 6-Sep-12 7:52am    
Thnks for ur attention.Others Please respond.

1 solution

Given the fact that I understand that you don't have the code of the Billing window...

I would find the window you want to activate (http://msdn.microsoft.com/en-us/library/windows/desktop/ms633499(v=vs.85).aspx[^]) and then use the returned HWND to call ShowWindow and show it again in the state you want: http://msdn.microsoft.com/en-us/library/windows/desktop/ms633499(v=vs.85).aspx[^].

Hope this helps.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900