|
I have thread which has a socket member,and I should using such thread to send data to the others in different windows.But if I simply pass the thread pointer there would something go wrong.So,I want to create the thread in the theApp.So,other dialog would send messages to it and also should get the returned messages from the theApp.
That is my task.
Thanks very much.
|
|
|
|
|
Hi,
I use a global mouse hook(WM_MOUSE_LL) to capture all mouse action.
This lead to my mouse delay and the mouse is not sensitive.
You'll feel very bad when you use move the mouse.
How can i deal it?
Or is there other smart way to capture mouse action?
I must capture all mouse action in my system,Like,
LRESULT CALLBACK MouseProc(int iCode,
WPARAM wParam,
LPARAM lParam
{<br />
process... ... <br />
return CallNextHookEx(m_hMouseHook, iCode, wParam, lParam) ;<br />
}
Thanks!
Avril-Sun
|
|
|
|
|
This link may help you out.
http://www.flounder.com/hooks.htm
I don't know how much effective it will be.
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
|
Hi,
How can i close a running apllication through programming.
I have a application ,i want whenever i run my application MS-Outlook should be clode,if running.
How can i do this.
|
|
|
|
|
Send WM_CLOSE to that program.
|
|
|
|
|
But sir how can i catch the running OutLook.
|
|
|
|
|
|
I elborate the problem:
Whenever i run my Program.exe file .I should check for running OutLook.exe file.If OutLook.exe is running ,close it otherwise nothing.
|
|
|
|
|
You can use of FindWindow (or better use of EnumWindows instead FindWindow) to retrieves a handle to this program if its exist if its exist it return a HWND/CWnd* to this window and then use of SendMessage.
|
|
|
|
|
I am cunfused to passing the parameters.
When i run OutLook if Task Manager it shows OUTLOOK.EXE .So what should i pass in FindWindow(..,..);
|
|
|
|
|
This code is of MSDN about FindWindow
To check if the Microsoft® IntelliType version 1.x software is running, call FindWindow as follows:
FindWindow("MSITPro::EventQueue",NULL);
To check if the IntelliType version 2.0 software is running, call FindWindow as follows:
FindWindow("Type32_Main_Window", NULL);
but better use of EnumWindow instead FindWindow.
|
|
|
|
|
I use EnumWindows.
And if WM_CLOSE doesn't work, try WM_SYSCOMMAND with a wParam = SC_CLOSE, or something like that (explorer windows, like 'My Computer', close like that).
There probably is a better way, there must be, if u can afford to search.
|
|
|
|
|
hai...
for each and every process if its starts running then,the name like"outlook.exe" is getting displayed in task manager.
using "CreateToolhelp32Snapshot" you can able to take a snapshot for the process which are running in task manager.
then using this...you do string compare function with the "outlook.exe"...
if both are matches...
then for closing a process "Terminate process " API is available...
use that ....thats all....
|
|
|
|
|
D.Mani wrote: then for closing a process "Terminate process " API is available...
It's sad that you would even suggest this.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
How can i close a running apllication through programming.
I have a application ,i want whenever i run my application MS-Outlook should be clode,if running.
How can i do this.
|
|
|
|
|
|
Hi Guys,
I would like to ask u brilliant people that i have a problem in creating and adding a menu at runtime. Till now i have created a menu and also loaded in the output but the problem that i am facing is that i am unable to add menu items to it and the functionality of those.
I am using MFC's CMenu class for doing this
Pls Help me!!
Regards,
Pankaj Sachdeva
|
|
|
|
|
How did you try to insert menu? did you use of CMenu::InsertMenu or CMenu::AppendMenu
|
|
|
|
|
Till now i did this sir
CMenu *pMenu = GetMenu();
pMenu->AppendMenu(MF_POPUP,0,"Heading");
but the problem is that i m unable to add menu items or submenu to it and also not able to attch coress functions to it
|
|
|
|
|
|
used insertmenu function too but it works same as appendmenu
|
|
|
|
|
If you run exmaple of MSDN and use of this code
submenu->AppendMenu(MF_POPUP, (UINT) submenu->m_hMenu, "&File");
it creates a popup menu for you did you try it?
|
|
|
|
|
|
I have many ComboBox on my Dialog Box. I want those ComboBox execute same handler on event ON_CBN_SELCHANGE .Is it possible.Pls help me
Thanx in advance
never say die
|
|
|
|