Re: How to pass an IP to VNC Viewer
I'm am stuck on the Authentication Screen. The VNC Authentication dialogue box has two text boxes on it. One for Username & one for Password. The username textbox is disabled.
Evidentally both text boxes have the class of "Edit". Both of their handles change everytime as well.
Only difference I found between the two were their "Style"
When I try to have it SendMessage the password, it enters it into the disabled Username Textbox instead of the Password textbox.
How do I make it use the Password Textbox?
Here is a pic, see how "my password" shows up in the disabled text box.
http://i178.photobucket.com/albums/w...Password-1.jpg
Re: How to pass an IP to VNC Viewer
Fazi any ideas on the password issue where the two textboxes have the same class??
I can't figure out how to make it sendmessage to the password textbox.
Re: How to pass an IP to VNC Viewer
Re: How to pass an IP to VNC Viewer
Quote:
Originally Posted by Fazi
I took a look at the thread, but looks like the guy hasn't started on the array yet. I'm unfamiliar with how to create an array, and how to use it to find all the controls of the window.
Can you please help with the code?
Re: How to pass an IP to VNC Viewer
The link i pointed has two solutions. I havent try the one RobDog specified.
but i can help you to manipulate the positions using the windowRect. first you must undestand the techinique here.
jwetzler:sick: did you undestand really how the text boxes are going to manipulate using its positions?
GetWindowRect API, when given a handle of a window, it gives the following screen cordinates where the controls have been planted on the screen :) 'those are Left, Right, Top and Bottom. OK? So if we want to manipulate the top positions of the text boxes, the one got the lowest value is the top one. the one with the highest value is the bottom one in your case.
ok? did you undestand?
Re: How to pass an IP to VNC Viewer
Quote:
Originally Posted by Fazi
The link i pointed has two solutions. I havent try the one RobDog specified.
but i can help you to manipulate the positions using the windowRect. first you must undestand the techinique here.
jwetzler:sick: did you undestand really how the text boxes are going to manipulate using its positions?
GetWindowRect API, when given a handle of a window, it gives the following screen cordinates where the controls have been planted on the screen :) 'those are Left, Right, Top and Bottom. OK? So if we want to manipulate the top positions of the text boxes, the one got the lowest value is the top one. the one with the highest value is the bottom one in your case.
ok? did you undestand?
Ok, I see what you are saying, this is the first time for me use GetWindowRect API. So this API is going to keep us from having to store the controls in an array.
Re: How to pass an IP to VNC Viewer
wait. i just need to try RobDogs post as well. will find a best solution.
Quote:
You can use the GetWindow API with the GW_HWNDNEXT argument constant or you can use the GetDlgCtrlID to retrieve the window control id number and match it with its known number to be able to identify if its the correct window.
1 Attachment(s)
Re: How to pass an IP to VNC Viewer
Jwetzler,
I have created a sample project that identifies a perticular control which has identical Class names. You can change it to suit to your project.
First you must run the control.exe file inside the project folder, which is a sample login box. then run the project and click the 'Comman1' Button. now you should see your user name and passworld boxes are correctly filled.
Re: How to pass an IP to VNC Viewer
Quote:
Originally Posted by Fazi
Jwetzler,
I have created a sample project that identifies a perticular control which has identical Class names. You can change it to suit to your project.
First you must run the control.exe file inside the project folder, which is a sample login box. then run the project and click the 'Comman1' Button. now you should see your user name and passworld boxes are correctly filled.
Thanks, that is exactly what I'm looking for. This fixed my issue, I was able to adapt it to my code. Fazi you're a genius.
Thanks to everyone else that contributed as well. I'm going to mark this as resolved. When I get more time, I'm going to post an example of my final code incase anyone else ever needs something similar.