Sending a message to a SaveAs common dialog that will change the file path

I am using a the webBrowser control that is creating a MODAL SaveAs Common Dialog when I use ExecWB ( in order to save a file).
I want that the ExecWB message will go without interference.
In order for that I need to update the
new saved file name and path and in some kind of way to order the saveAs message to go smoodly without opening this Modal SaveAs dialog.
Note that I cant change or overload any of the SaveAs common dialog functions cause it is created form inside of the control.
For now I have created a process that Identifies the HWND of the common dialog and I want to send it a message that will tell the dialog that a key was pressed , but I dont know how to do it!
Can someone give me a good advice how to solve my problem and succeed with the saveAs without interference?
ErnAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jhattinghCommented:
In the following code, a window is found by specifying the window title text and then the relevant button is pressed:


//------------ 1st - find the window ------------//

HWND hDlg = ::FindWindowEx(NULL, NULL, m_lpszClass, (LPCTSTR)m_strWindowText);


//------------ 2nd - find and click the control ------------//

if (hDlg)
{
HWND hControl = 0;
hControl = ::GetDlgItem(hDlg, m_nControlID);

if ( ::PostMessage(hDlg, WM_COMMAND, (WPARAM)((BN_CLICKED*0x10000)+m_nControlID), (LPARAM)hControl) )
if ( ! m_bLurk)
return true;
}
ErnAuthor Commented:
thank you for your answer ,but there are
two things that are still missing:

1) the saveas common dialog control - controls are not visible so I dont know there ID's.

2) In you example the DEFAULT path and
file name where chosen.I want to choose
my own path (maybe it can be done by sending key pressed messages).


ErnAuthor Commented:
Adjusted points to 200
OWASP: Avoiding Hacker Tricks

Learn to build secure applications from the mindset of the hacker and avoid being exploited.

ErnAuthor Commented:
test
Avi_cohenCommented:
Try finding a key board Event

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ErnAuthor Commented:
I found it , thanks!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.