|
Assuming you want the HWND no matter what application the window belongs to -
You could use a global WH_MOUSE hook: About Hooks[^]
|
|
|
|
|
|
You can also try using the WindowFromPoint() and ChildWindowFromPoint() using the POINT structure that the lParam of mouse messages is pointing to.
|
|
|
|
|
thank you all for replies
i think i almost managed to do this by courtesy of your answers...
|
|
|
|
|
Hi,
I want to include a library (dll) in my project. I use Visual C++ 6.0 and the project type is console.
Could someone hook me up with a simple tutorial how I can include a DLL in my console project and if I start my program it should get extracted to the same folder, also I was looking before on the codeproject articles but did not hit any found.
regards,
Steven. W. McGarten
|
|
|
|
|
532523 wrote: also I was looking before on the codeproject articles but did not hit any found.
I suggest you look again, there are tons of articles on CP dealing with dll's.
If you have the *.h header and *.lib files for the dll, then just add them to your project and you can call any of the dll's functions. If not then you will need to call LoadLibrary() to load the dll, then GetProcAddress() to get a pointer to the functions you need. Search again on CP for those functions, you will find many articles.
|
|
|
|
|
So, where you see the tons of articles who explain how to bind the dll into my executable and extract the library on start as byte array to the same folder?
|
|
|
|
|
|
I need to know how to detect when a user attempts to logoff or shutdown the computer, so that my program can perform cleanup, save, or backups before the session ends. Running Visual Studio 6.0 not .NET.
Thanks,
Mark
|
|
|
|
|
Check out the WM_QUERYENDSESSION and WM_ENDSESSION messages
|
|
|
|
|
Hello everyone,
I have a two dimensional array. Currently, I am using the following method to sort,
1. Sort by the first dimension,
2. If the first dimension is equal, then sort by the second dimension.
For example, here is the result of the array I could get,
<result 1="">
[1, 2]
[1, 3]
[1, 6]
[2, 4]
[2, 5]
[2, 7]
I want to change it to,
1. Sort by the second dimension,
2. If the second dimension is equal, then sort by the first dimension.
Here is the result I want to get,
<result 2="">
[1, 2]
[1, 3]
[2, 4]
[2, 5]
[1, 6]
[2, 7]
I am wondering what is the most efficient way to get the new sorting result (result 2) by the sorting result (result 1) in old method?
thanks in advance,
George
|
|
|
|
|
George_George wrote: I am wondering what is the most efficient way to get the new sorting result...
Change your algorithm to look at dimensions in the opposite order.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
But in this way, you do not utilize the given information that the input data is already sorted by 1st column -- 2nd column way. I think if we could utilize the information, we could have better ways. Any ideas?
regards,
George
|
|
|
|
|
I'm building an application that works into a directory tree having few files in each directory and subdirectory. I tried to write a function to delete the entire structure, recursively, but the stack told me that is too much for her.
How can I avoid recursion?
(in VC6)
|
|
|
|
|
Check out SHFileOperation()
|
|
|
|
|
Thanks a lot.
Having little time to solve the problem I redirected the output of the DIR command to a file and read it line by line.
It works!
|
|
|
|
|
|
Thanks a lot.
Having little time to solve the problem I redirected the output of the DIR command to a file and read it line by line.
It works!
|
|
|
|
|
I glad you find it
|
|
|
|
|
Hi,
I am trying to create some kind of a viewer that can view files in different formats like:
Text(ASCII), Text(UNICODE),Bin, Hex, Oct.
the last two require dealing with bits, (3bits --> 1 oct), (4bits-->1 hex), so what is the fastest way to do this? I need to boost performance
Thanks
Mohammad
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
I want to get the status of the web site through coding
like 201 301 etc....
Can anybody help me in this
thanxs in advance
|
|
|
|
|
I can use the CHtmlView class to get the status, unfortunately i dont know exactly how.
|
|
|
|
|
hi all,
Which dll(s) should i copy along with the .exe files for the VC++ 2005 in order to be able to run the software in other machine which doesn't have VS 2005 installed?
as in the VC++ NET 70, i have to copy 'mfc70.dll' and 'MSVCR70.DLL' along with the .exe file.
thanks
cheers
|
|
|
|
|
|
hi,
thanks for the tips, although i get this error message as i put the exe file into the 'dependency walker' in a machine which doesn't have VS 2005 installed
'Error: side-by-side configuration information in "c:\testing.exe" contains error. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem (14001)'
the testing.exe is only a simple MDI application, no other class except the standart MFC classes
what can it be the cause?
thanks
|
|
|
|