|
Okay my bad this function work only if the calling process owns the window. using GetWindowThreadProcessId you can get both thread id and process id. Once you have process id then you can simple compare with your process id to check if window belongs to your application.
-Saurabh
|
|
|
|
|
Im not sure but I think I saw an article on the codeproject it was like spy++.
|
|
|
|
|
I am new to C++. I am trying to PostMessage a left mouse click so I can make a desktop sharing application. So far when I post the message, it does not post to the coordinate I make with MAKELPARAM.
<br />
HWND hWnd = GetDesktopWindow();<br />
LPARAM l = MAKELPARAM(30, 50);<br />
PostMessage(hWnd, WM_LBUTTONDBLCLK, 0, l);
The above succesfully clicks the desktop, but at a point completely differnt than 30, 50, as it clicks my start menu bar. Also, using WM_LBUTTONDOWN as opposed to WM_LBUTTONDBLCLK does not do any clicking. Any ideas?
Thanks!
modified on Monday, April 28, 2008 5:35 AM
|
|
|
|
|
A few tips, take 'em or leave 'em...
1: You may want to learn about the differences between screen/absolute coordinates and client coordinates
2: You may want to learn about which messages use which coordinates (screen or client) and under which circumstances
3: You may want to learn about how a "click" is a mouse-button down event followed by an up event, and that a double-click event is generally sent by controls that receive two consecutive click events, not by the mouse/system proper
Peace!
-=- James Please rate this message - let me know if I helped or not!<hr></hr> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Thanks for the advice. I am aware of the differences between screen coordinates and client coordinates, though I am unsure about number 2. As for number 3, I tried doing a down followed by an up to no avail.
Thanks for the response!
|
|
|
|
|
|
I want to display font of other language(not english) in edit control.
so please tell me how it is possible .
Trioum
|
|
|
|
|
For instance (_UNICODE defined):
TCHAR szABC[]= {0x03B1,0x03B2, 0x03B3, 0x0000};
SetDlgItemText(hDlg, IDC_MY_EDIT, szABC);
to display the first three (lower-case) letters of the Greek alphabet.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
no no not this way.As I want to direct type on the Edit control in another language font.
Trioum
|
|
|
|
|
And you don't want change system locale, do you?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
actually I want to type in the another language in the edit box and then save this value to the data base for further procesing. my clients donot
understand english .they need everything in their own language . even
vlaues in data base in their own language.
Trioum
|
|
|
|
|
What about this [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Oh it seems your post needs to vote 5,I give you.
|
|
|
|
|
Thanks friend.
I don't know why it was voted down, anyway I don't bother about.
Thank you again.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
|
Hello all,
I want to read data from web page into my VC application. This web page is being downloaded in VC application in COleContainer class. Now i want to get text from the this web page to VC application. Is it possible then how could i accomplish it? Please help me. Any help is much more appreciated.
Thanks & Regards,
Hemang
|
|
|
|
|
Assumming the COleContainer implements a IHTMLDocument interface you will then be able to get the HTMLElement of the Body of the webpage. The HTMLElement class has many different methods for you to access the text of the webpage. If you want the HTML use the InnerHTML method, if you want the plain text, use the InnerText. There is also the corresponding OuterHTML and OuterText - depends on what you are looking for.
|
|
|
|
|
|
Hi all.
I m now working on serial comunication using VC++;
but i want to get information about the ports..
that is , the actual port address, which device is connected to it.
whats the connected device instance id and so on.
so that i can use the connected device in my program..
can anyone help me...
how to get information from Device manager and registry
when any device is connected to port..
|
|
|
|
|
You have first to enumerate the different serial ports that are accessible on your PC. For that take a look at this library[^]. After that, you need to communicate with the device in order to know which device is connected. There's no universal way of doing that. The only thing you can do to detect your own device, is establish a very specific protocol (e.g. at startup, you send a specific data to your device and it replies with some identification string).
|
|
|
|
|
thanks for ur reply..
i used ur sample source code...
but during compilation it could not find 'Wbemcli.h' file..
where i can find it?
reply.. plz........
|
|
|
|
|
Member 3220373 wrote:
but during compilation it could not find 'Wbemcli.h' file..
where i can find it?
It's in the ...\Platform SDK\Include folder.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi all ,
Is it possible to disable only certain columns in a Flexgrid.
If yes, please tell me how!
Thanks in advance,
Sunil.
|
|
|
|
|
AFAIK, there is no specific api to disable a particular column in flex grid. so i frequently change the back color of the required cell to achieve this effect.
good luck.
--------------------------------------------
Suggestion to the members:
Please prefix your main thread subject with [SOLVED] if it is solved.
thanks.
chandu.
|
|
|
|
|
try {
byte *p=new byte[-1]
} catch (...) {
}
It reports an unhandled exception. Why the exception couldn't be catched? Any way to catch it?
|
|
|
|