|
|
...and then what...?
exporting some code in a DLL instead of doing it in the exe don't tell how to do trick...
|
|
|
|
|
It was just a suggestion...
Regards
Programm3r
|
|
|
|
|
I think the following technique should work.
First get the main window of the target:
CWnd* wnd = FindWindow(NULL,"Asdf");
<br />
CPoint pt;<br />
pt.x = 100;
pt.y = 50;<br />
<br />
wnd = wnd->ChildWindowFromPoint (pt);<br />
<br />
wnd->PostMessage (WM_LBUTTONDOWN,0,MAKELPARAM(pt.x,pt.y));<br />
wnd->PostMessage (WM_LBUTTONUP,0,MAKELPARAM(pt.x,pt.y));<br />
<br />
wnd->PostMessage (WM_LBUTTONDOWN,0,MAKELPARAM(pt.x,pt.y));<br />
wnd->PostMessage (WM_LBUTTONUP,0,MAKELPARAM(pt.x,pt.y));<br />
this is this.
|
|
|
|
|
khan++ wrote: For some weird reason, two pairs of the following work
First gets the focus, second does the "click".
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
|
|
|
|
|
I have done this several times and it works very well. I would suggest replacing ChildWindowFromPoint with GetDlgItem and use Spy to get the dialog control id of the child window you need. This way your application will work if someone changes the theme in windows.
John
|
|
|
|
|
Yes, good idea.
Thanks Rage for the info and you for the enhancement.
this is this.
|
|
|
|
|
khan++ wrote: //Now get the child at a particular location on that window.
So does this means the third party app has to be a 'child' or spawned by my app?
If this is not the case, can I still use 'ChildWindowFromPoint' fn?
-- modified at 22:22 Tuesday 29th August, 2006
Jam
|
|
|
|
|
The third party app does not have to be spawned by your app (that will not make a difference anyway). First, your app will find the other application's window (using FindWindow() ), then find its child at that point. That way, you have the child control (could be the button you are looking for) of that third-party app.
And yes, you can use ChildWindowFromPoint() with any app.
this is this.
|
|
|
|
|
Thanks a ton. This helps indeed!
Cheers
Jam
|
|
|
|
|
There are multiple ways you could do this. I'll call your application the "client" and the application you want to control the "server". Does the "server" support automation? If so you may be able to control it using COM. If not you could try using SendMessage to control the application by sending it WM_COMMAND messages.
Steve
|
|
|
|
|
hi..
i have get code for dll..i want to whether it is in UNICODE OR MBCS..how do we know it..?..if it is in unicode i want to set the settings to MBCS..how to do it...?..pls help me..
thanks in before
james
-- modified at 4:11 Tuesday 29th August, 2006
|
|
|
|
|
please check the project settings.
Regards
Velayudhan
|
|
|
|
|
yeah i have checked project setting..i want to know..what all flags has to be set..for MBCS and UNICODE...
|
|
|
|
|
In project setting, take option C/C++
In the category combo box, take the option General
In that, there will be a heading : Preprocessor Definitions
In the text box shown below this option, u can give _UNICODE or UNICODE for unicode settings
and _MBCS for MBCS.
Regards
Velayudhan
|
|
|
|
|
Hello everybody,
i have posted this theme some weeks ago.
But after some long searching and testing: the problems remain.
I can query computers running W2K by NetFileEnum successfully.
But the same code on any computer with XP or the new server 2003 only gives error-message "access denied" (code ERROR_ACCESS_DENIED).
I've seen the remark in the Microsft-docs that i must be administrator to execute this function. But making the current user a admin (on both XP and 2003Server) doesnt change anything.
Any help would be welcome.
Thanks,
Richard
|
|
|
|
|
Richard Ernstberger wrote: But making the current user a admin (on both XP and 2003Server) doesnt change anything.
Have you tried AdjustTokenPrivileges() ?
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Many thanks, this was the key.
I have to set the SE_CHANGE_NOTIFY_NAME - privilege. I used the AdjustTokenPrivileges() - function sometimes ago to get shutdown-privileges for a process, which are not normally set.
But when i start a process, normally the process gets the rights and permissions of the user that started it. And documentation to MSVC says that the SE_CHANGE_NOTIFY_NAME - privilege ist on by default for every user. So i'm quite surprised that i have to set it manually for my process.
However, it works now.
Thanks again,
Richard
|
|
|
|
|
Hi all,
Can anyone tell me what the function: BroadcastSystemMessage() is used for??
I know what it does... but MSDN didn't answer my question..
Thanx in advance
Regards
Programm3r
|
|
|
|
|
|
Programm3r wrote: Can anyone tell me what the function: BroadcastSystemMessage() is used for??
It's used to send (i.e., broadcast) a message to multiple recipients (e.g., all applications). It could be used to poll recipients for permission to carry out a given action. It can be used to, in conjunction with other code, terminate another proccess.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
how can i use tab control in SDI Application to a form view.
in my application i split the window into 3 horizontal views.
in the 3 rd view i want to add tabbed control for showing two views in the 3rd view....
how can i do it?
|
|
|
|
|
Why not just derive the 3rd view from CFormView , and insert a tab control on it?
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
hi guys,
Can anybody help me out in integrating VC++ DLL with Java. I do have only .h,.dll,.lib files for the DLL program and don't have .cpp file. Can i load that dll in Java. If anybody have idea please mail me back.
P S V Subba Reddy
|
|
|
|
|
See Here.
Refers to call methods in a dll from JAVA
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|