GentleMen,
I am Using Win32api in C# to get the job doneI am also Creating Threads in this application Actually it is only one thread
Here is the summary:-
Main Programm Thread Executes the programm untill it reaches aplace in the code where it has to click a buton on the internet explorer pageClicking that Opens a dialogbox ASking wheather i want to save open the file or cancel thedialog box.At this click Programm breaks into two 1) Main Programm Thread2) Addtional thread i make to proccess dialog boxes
I have made extra thread because Downloading and browsing on internetTakes time. so internet stuff is dealt with this threadonce it has fetched what i want; it closes internet explorer andMain Application thread Figures out the Information i want and displays it.
Brothers proccessing this dialog box and others that will follow it would bedone by this extra thread.
Now it handles well :-Sort of thing which goes in this thread is like this
ThreadProc(){ 1) string NameOfTheButtonToClick = "Close" // or anything;
KeepLooping { FindtheButtonInTheDialogBox (NameOfTheButtonToClick ); Is fOund if Found Exist Loop }}
FindtheButtonInTheDialogBox(NameOfTheButtonToClick) { Enums All The Child Windows Of the dialogBox That Internet Explorer Dispalys FOr that it passes the EnumChildWindowsProc Address To EnumChildWindows Win32APi Function
}
EnumChildWindowsProc( ){
When it finds the window with the given TExt Found = true I make it click it In DIalog Box
Once the file has been downloaded from INternet Explorer The programm has toDisplay the INformation that i have programmed it to fetch.it does it well
Problem is thisi order to put this FIlename in save dialog box i am using Sendkeys.ANd you know Sendkeys needs the Place to be in focus That brings the limitation to it.that i cant do anything else when it has to happen
using WM_char with SendMessage has the same problem of focusWm_SETTEXT does not work on it while WM_GETTEXT works wellI was thinking if WM_SETTEXT has been disabled or whatin order to do that i wanted to get the wndproc addressand use my wndproc to proccess this dialog box messages
but Getwindowlong is not working and neither setwindowlong
[DllImport("User32", CharSet = CharSet.Auto,SetLastError = true)] unsafe public static extern System.IntPtr GetWindowLong ( System.IntPtr hWnd, System.Int32 nIndex ) ;
i have even tried [DllImport("User32", CharSet = CharSet.Ansi, SetLastError = true)] unsafe public static extern System.IntPtr GetWindowLongA( System.IntPtr hWnd, System.Int32 nIndex
);
System.IntPtr WinProc1 = GetWindowLongA( HwndDlg , GETWINDOWLONG.GWL_WNDPROC ) ;
What is wrong
caution: this is not asp.net app it is simple desktop app dealing with few internet stuff
Asp.net ; i am not that smart
ThankyouRIGHT_THEN