Click here to Skip to main content
15,891,777 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
The syntax of SendMessage is

C++
LRESULT retVal= SendMessage(G_hWndPrint[PrintDialog], WM_COMMAND, MAKEWPARAM(IDOK,BN_CLICKED),0);


This prints in IE6 but it does not print in IE8 and I get return value as 0 which is success.

Could some one guide how to print in IE8 using SendMessage or PostMessage?

Additional information - (
C++
_hr = m_pTarget->Exec(NULL,OLECMDID_PRINT,OLECMDEXECOPT_PROMPTUSER,NULL,NULL);

. This will display a Print dialog which has to be edited for no. of copies and then dismissed usindg SendMesage.)
Posted
Updated 5-Oct-11 1:52am
v3

1 solution

use Spy++ to check the OK-button. Or try to find the window via EnumWindow and the name (from Spy++)

MS changed a lot in the IE 6, 7, 8 and so on. It is a mess...
 
Share this answer
 
Comments
Richard MacCutchan 5-Oct-11 7:51am    
Stop spamming the forums with these vague comments; they are not solutions.
KarstenK 5-Oct-11 9:24am    
i programmed some years an addon for the IE _SO_ i know that i had to code for every version of the IE some hacks.

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