 |
|
 |
I need to find a code to duplicate an existed window...so....if i have opened one window, how i can create a new instance of this windows??? For example...i open the folder "My Documents", i need open another windows whit the folder (2My Documents" without close the firt window.
Sorry for my English...i need help. mesiasrojo@gmail.com
Reply·Email·View Thread·Permalink·Book
|
|
|
|
 |
|
 |
That's a really nice utility. Do you have an equiv. to the C++ version in C# ?
|
|
|
|
 |
|
 |
C# version would be impossible because you cannot use system wide hooks in C#.
|
|
|
|
 |
|
 |
Hi,
This code and executable worked beautyfully on my machine. Actually I was searching for such utility(if not found planning to write one) but u saved my lot time.
Thanks again,
Hemant Kulkarni
|
|
|
|
 |
|
 |
I'm kidding but you dit it the old school way
|
|
|
|
 |
|
 |
Will there be a version for Windows XP?
Systems AXIS Ltd - Software for Business ...
|
|
|
|
 |
|
 |
I want winXP version too.
oh, yes it should suport diffrent XP styles...
|
|
|
|
 |
|
 |
The instructions for Windows 2000 apply to Windows XP just as well, and worked for me.
|
|
|
|
 |
 | BUG  |  | BigBug | 22:56 29 Mar '01 |
|
 |
I installed it,
and after 60s it crashed all my apps.
After rebbot it relaunched itself at boot and again crashed all my app
before I had time to remove it either from the registry or from the disk.
I use NT4 SP6a.
And I'll never installed it again.
|
|
|
|
 |
|
 |
You have all the source to examine the problem.
Only thing you need to do is investigation...
Keep me up-to-date big bug
|
|
|
|
 |
|
 |
The bug I found is the use of the uninitialized variable named "result" in CCaption::OnNcMouseMove Caption.cpp(272). Well MVS2003 found it but on my system (WinXP Pro SP1) the bug triggered only when moving the mouse over the "Iconize" button of any window.
Hope this helps
|
|
|
|
 |
|
 |
Great utility, it's come in very handy.
I find however that on apps like IE and Outlook Express I need to minimize and then restore the app window before I can see the iconizer button. Could it be that iconizer needs to call updatewindow or something similar in order to ensure the button is visible after app startup?
Thanks again for a great app and code!
|
|
|
|
 |
|
 |
I noticed the problem before. I think IE or Outlook are redrawing the caption bar after I already inserted the iconize button. The problem here is to get a notification of IE or similar program *when* they are updating the caption. I found out that it wasn't at WM_PAINT or
WM_NCPAINT.:(
|
|
|
|
 |
|
 |
I was intrigued by your suggestion to not replace the WndProcs in each app, and instead just use the WH_GETMESSAGE in the SetWindowsHookEx() function so I tried it. In my test I used the iconizer code and only removed those spots where the WndProc was replaced and I did not SetWindowLong etc. All I ever got was the activation message from my own app. I never received any other activation messages. Does anyone have any idea as to why this might be? It would be nice to be able to avoid replacing each app's WndProc but perhaps that's the only way?
|
|
|
|
 |
|
 |
At the beginning of the project I also tried the WH_GETMESSAGE approach, but without any success. Adding TRACE information is indead a good idea, but instead of using TRACE I recommend to use OutputDebugString(...), this will also output trace information in a release version of the DLL. Keep me up-to-date of your findings.
|
|
|
|
 |
|
 |
Can you guys finally post the fixed source code here?
I've tried to implement your solutions but no result.
Any help will be appreciated.
Thanks.
Sol.
|
|
|
|
 |
|
 |
Yes, Benoit is right, I've done it succesfully with WH_CALLWNDPROCRET and WH_GETMESSAGE, just painting, no WndProc! But you have to remember few things:
- The WM_NCLBUTTONUP is not always received for some reason so you have to do workaround (all other NC are received allright. I simply did the main work in WM_NCBUTTONDOWN with Sleep (300, does the trick.
- the initial painting is not timed properly the WM_NCACTIVATE seems not do the trick I figured out the settext clears the caption, Solution? - Draw the button also on WM_SETTEXT! That's it. You can even remove the SendMessage( hWnd, WM_NCPAINT, 0, 0 ); from Activate - it is not needed.
It works perfectly and you don't have to worry about crashing your apps - it is transparent to system!
And from all functions I shrank whole dll to just 4-5 functions and removed completelly the caption.cpp/h because it is not needed anymore. I put some drawing functions from it directly to the main dll.cpp
I will post this as soon as I find some time and figure out how to solve the WM_NCLBUTTONUP problem
Thanks Benoit for suggestion and Bart G for initial code.
|
|
|
|
 |
|
 |
I tried some experimenting on my own and ended up creating more problems than solving; consequently, I stopped experimenting.
Would like to see your solutions!!
Thanks in advance.
William
Fortes in fide et opere!
|
|
|
|
 |
|
 |
I'm just playing with the source (not an authority on this by any means and by commenting out the code that inserts the replacement proc via the SetWindowLong the activation messages for new apps still come through.
I tried the WH_GETMESSAGE but could not get any messages that way. I should qualify by saying that various messages came through but only for the current process/thread. I could never receive messages for other threads/processes.
Here is the hook call, same as for the WH_CALLWNDPROC except using WH_GETMESSAGE:
g_hHook = SetWindowsHookEx( WH_GETMESSAGE, (HOOKPROC)GetMsgCallWndHookProc, g_hModule, 0 );
Then here is the callback:
LRESULT CALLBACK GetMsgCallWndHookProc( int nCode, WPARAM wParam, LPARAM lParam )
{
MSG *pMsg = (MSG *)lParam;
switch (pMsg->message)
{
case WM_COMMAND:
{
OutputDebugString("WM_COMMAND found\n");
Log("WM_COMMAND found\n");
break;
}
case WM_SYSCOMMAND:
{
OutputDebugString("WM_SYSCOMMAND found\n");
Log("WM_SYSCOMMAND found\n");
break;
}
}
Then I would start a bunch of applications, minimize and maximize them etc., and only my own app would be recognized. Wish I knew why.
|
|
|
|
 |
|
 |
You have to put all global hooks into a DLL. Check out msdn.microsoft.com and look up SetWindowsHookEx for more information!
|
|
|
|
 |
|
 |
A fantastic utility. Cheers Bart!
Paul Barrass
paulb@e-creation.co.uk
www.e-creation.co.uk
|
|
|
|
 |
|
 |
A great little utility,
Regardz
Colin Davies
|
|
|
|
 |