 |
|
 |
didnt get the proper information
|
|
|
|
 |
|
|
 |
|
 |
How can i block messages from other applications to my application. ??
( i would like to know which application have sent the message )
Thanks.
modified on Monday, May 25, 2009 3:49 AM
|
|
|
|
 |
|
 |
Hi
Can u tell me how HWND_BROADCAST works?I want to pass information to all system processes that now i'm writing in standard ENGLIST(U.S) language.It possible then help me.
Md. Mostafijur Rahman
|
|
|
|
 |
|
 |
Hi,
I am facing problem while retreiving the handle of the MSPAINT window which is opened by our application using CreateProcess. Inside SendMessageToProcess() function, EnumWindows() function is called.
SendMessageToProcess(LPPROCESS_INFORMATION lpProcessInformation, UINT Msg, WPARAM wParam, LPARAM lParam)
{
FINDWINDOWHANDLESTRUCT fwhs;
fwhs.ProcessInfo = lpProcessInformation;
fwhs.hWndFound = NULL;
EnumWindows ( EnumWindowCallBack, (LPARAM)&fwhs ) ;
.........
}
Inside EnumWindowCallBack() function, the process id is not matching with the process which we have created through CreateProcess function.
BOOL CALLBACK EnumWindowCallBack(HWND hwnd, LPARAM lParam)
{
FINDWINDOWHANDLESTRUCT * pfwhs = (FINDWINDOWHANDLESTRUCT * )lParam;
DWORD ProcessId;
GetWindowThreadProcessId ( hwnd, &ProcessId );
if ( ProcessId == pfwhs->ProcessInfo->dwProcessId )
{
pfwhs->hWndFound = hwnd;
return false;
}
else
{
// Keep enumerating
return true;
}
}
This code is not working correctly on Japanese OS. why is it happening so? Do i need to set some parameters while creating the process?
Please let me know at earliest.
|
|
|
|
 |
|
 |
Hi,
I have the same problem.
EnumWindows function enumerates only few window handles. No one which I find.
I think this is privilege problem. (I run this from localsystem user context because NT service...)
OS:
XP PRO SP2 PL
If I find the solution I'll let you.
|
|
|
|
 |
|
 |
Hi,
I got the solution. Give sleep of 2-3 secs between createprocess and sending the message.
|
|
|
|
 |
|
 |
I've been looking for a way to do this all weekend. Thanks!
|
|
|
|
 |
|
 |
would you please give me an example how to call this method, what should be the parameter?
SendMessageToProcess(LPPROCESS_INFORMATION lpProcessInformation,
UINT Msg, WPARAM wParam, LPARAM lParam)
|
|
|
|
 |
|
 |
Give me some example of inter process communication using call back function
Umer
|
|
|
|
 |
|
 |
Hi,
I have this problem...I know the handle of the destination application...and the handle is created by CreateProcess...
Now I try to use SendMessage with WM_COPYDATA and I got this error message (error code 183..which means ERROR_ALREADY_EXISTS) What should I do???
Xenia
|
|
|
|
 |
|
 |
Hello
My aim is to send a message of Yes to a messagebox of other application can u help me on it i will be really thankfull to u
Thanx
Ahmer Syed
|
|
|
|
 |
|
 |
if an app is minimized/hide or sits in system tray, can we still find a handle to that app? is FindWindow works if so?
|
|
|
|
 |
|
 |
Yep
|
|
|
|
 |
|
 |
Hi there,
I wanted to ask you if we use the createprocess command for some command line function and if that function requires a prompt for (y/n) confirmation how do we pass in yes or no to that command prompt window. for example the cacls function if i have something where my strcommand looks like
cacls temp \t \g user:W and i make a call to
CreateProcess(NULL, // command is part of input string
strcommand , // (writeable) command string
NULL, // process security
NULL, // thread security
TRUE, // inherit handles flag
0, // flags
NULL, // inherit environment
NULL, // inherit directory
&startup, // STARTUPINFO
&procinfo);
now if i want to type in Y at the confirmation window so that the user doesnt have a choice how do I do that. The application that I am running will call createprocess and give the user a chance to type Y Please let me know thanks
vg
|
|
|
|
 |
|
 |
who->ProcessInfo->dwProcessId=(DWORD)1626472448;
SendMessageToProcess(who->ProcessInfo ,LVM_GETITEMCOUNT,0,0);
I keep getting type errors.
what is the correct way to call SendMessageToProcess?
I just want to send a message to a ListView on another DialogBox. I can find the process id and window handle using Spy++ for now. Also if I want to send a message to a control of another app, can I directly talk to it using its handle?
|
|
|
|
 |
|
 |
How do I actually use this function?
|
|
|
|
 |
|
 |
getguithreadmessage() fails why?
|
|
|
|
 |
|
 |
Hi!
Would it be possible to listen to window events from another process?
For example, my application starts another application that displays
a simple form with a button. When the user presses that button, my
application should be notified about the BN_CLICKED(BUTTONID) event.
Thanks
/// M R
|
|
|
|
 |
|
 |
You should hook the process (look at ::SetWindowsHookEx). Then you get every messages from the process, for what you are looking for. I hope it helps
Mobius
-----------------------------------------------------------
"Eritis sicut deus, scientes bonum et malum"
Faust
|
|
|
|
 |
|
 |
When I use SetForegroundWindow API, but this API didn't general true result.
|
|
|
|
 |
|
 |
Hi,
I want to send VK_? message to another window(process), like "Alt + E" message.
So i do as
SendMessageToProcess(&processInfo, WM_COMMAND, VK_MENU, 0);
SendMessageToProcess(&processInfo, WM_COMMAND, 0x45, 0); //0x45 is VK_E
but it does not work.
Is something wrong with me?
Thanks for any advice.
Bai.
|
|
|
|
 |
|
|
 |
|
 |
Take a look at the WM_CHAR and WM_KEYDOWN/WM_KEYUP messages.
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
 |
|
 |
The problem is that the VK_(whatever) are key codes, not Windows messages. So you have a few options, depending on what you want to do:
1. If, in this example, Alt-E might bring up a menu, you can send a WM_COMMAND message for that item:
SendMessage(hwnd, WM_COMMAND, IDR_SOME_MENU_ITEM, 0);
2. If you have the code for both processes, you can use custom-defined messages to communicate in this way.
3. Although I've never tried it, you can try sending a WM_CHAR, WM_KEYDOWN, and/or WM_KEYUP message.
The early bird may get the worm, but the second mouse gets the cheese.
|
|
|
|
 |