I'm having an interesting problem implementing a global keyboard hook.
I wrote a dll which is used to set the hook and then an application (Delphi) which loads the dll and processes the results of the hook. This was done this afternoon on my PC at work and after some testing I figured it was working 100%.
I've just tested the same app...
In MFC a double-mouse click event triggers the following sequence of messages
WM_LBUTTONDOWN
WM_LBUTTONUP
WM_LBUTTONDBCLK
WM_LBUTTONUP
So responding to the WM_LBUTTONDBCLK message allows you to detect a double-click. But if I just want to detect a single-click how to I distinguish it?
But just looking at the WM_LBUTTONUP message isn...
In Win32 programming, what is the difference between a window's parent and a window's owner? I thought I had it figured out, then I came across this code:
SetWindowLong(handle, GWL_HWNDPARENT, foo);
This actually sets the window's owner, not the parent - despite the GWL_HWNDPARENT being used. Are the terms parent/owner interchangeable...
We have a few Win32 applications (coded in Delphi 2006) where sometimes the user gets an error message saying "System Error. Code: 8. Not enough storage is available to process this command.".
From the stacktrace it looks like it is always during CreateWnd call
Main ($1edc):
004146cc +070 app.exe SysUtils RaiseLastOSError...
Can't set Ifilter debugging on Vista.
Per instructions at
http://blogs.msdn.com/ifilter/archive/2007/02/06/debugging-ifilters-with-wds-3-0-and-windows-vista.aspx
... I use regedit to set
HKLM\Software\Microsoft\Windows Search\Gathering Manager:Debug Filters
to 1, but when I click OK, I get message results in error "Cannot edit D...
Okay, so I found this class online that "creates" a second desktop which does not run anything (ie, explorer.exe is not called and so forth).
However, this newly created desktop refuses to shutdown and go back to the orignal desktop. I have no idea whats going on. So if someone can try it on their machine, it would be very helpful.
not...
There is a difference in the description on MSDN, however, I do not understand what the text means what the difference is.
The GetClassName function retrieves the name of the class to which the specified window belongs.
The RealGetWindowClass function retrieves a string that specifies the window type.
As an example using windows calc....
One solution that one could suggest is to periodically look for a special 'Screen-saver' desktop, and if it's present then count it as a running screensaver.
But apparently this is not the case for all screensavers as with some the mentioned desktop is always present.
Are there more reliable solutions for this?
...
I have to create a console application which needs certain parameters. If they are missing or wrong I print out an error message.
Now the problem: If someone starts the program from the explorer by double-clicking the console window disappears immediately. (But the application is not entirely useless from the explorer, you could drag fi...
How can I tell if my window is the current active window?
My current guess is to do GetForegroundWindow and compare the HWND with that of my window.
Is there a better method than that?
I'm using Win32 API / MFC.
...
Did Microsoft not provide a managed wrapper around the Animation common control for .NET developers?
...
To clarify, I mean time spent while the system is suspended/hibernated, not the calling thread (GetTickCount() returns the number of milliseconds since system boot).
...
I recently ran into a problem with a COM object that was using a singleton class factory and had members that were pointers to other COM objects implemented in a different dll than the singleton object. These other COM objects were created by the singleton object and that was the only reference to them. Since the singleton object is ne...
I wrote a small sample of code in C# to capture selected text from other applications:
SendKeys.SendWait("^c");
string searchedText = Convert.ToString(Clipboard.GetText());
my problem is its not working if i captured text from the browser Chrome
anyone know why this happen or if there is another way to do the same task
UPDATE
I am doi...
I asked about finding in subdirs with criteria. First answer was use FindFirstFileEx(). It seems the function is no good for this purpose or I'm using it wrong.
So can someone explain how I would go about searching in a folder, and all it's subfolders for files that match (to give some sample criteria) .doc;.txt;*.wri; and are newer ...
There is some Win OS API call or so that would let one obtain text from the screen
not via obtaining a snapshot and then doing OCR on it, but via API
the idea is to get the text that is under the mouse that the user points to and clicks on.
This is how tools like Babylon ( www.babylon.com ) and 1-Click Answers ( http://www.answers.com...
As a follow up to this question ....
Now I found the answer for that quesstion by a comment by user j_random_hacker. Here Widnows follows 8.3 file naming standard means turbo c can only read files with name length of 8 characters and extension of 3 characters. So windows will give another name to any file which is not following 8.3 na...
For some reason the integrated debugger is causing an error as soon as I make reference to a third party vendor's dll class. This same code runs when it is built and ran as a release, stand alone. The two properties for debug and release should be the same as I have not really altered them. I added the lib file to the path for both build...
We've got some old serial code which checks whether a serial port is available simply by opening it and then closing it. Now we are adding network support to the app I want to reuse the function by supplying the ip address as a string.
/**
* So far I have tried:
* A passed in portPath normally looks like:
\\?\acpi#pnp0501#1#1#{GUID} ...
Anyone knows how to get selected text from other application using UI Automation and .Net?
http://msdn.microsoft.com/en-us/library/ms745158.aspx
...