Is it dependent on XP? Would it not be portable to 98, 2000, etc? I mean, some people have notebooks, and they work very very nicely but would NOT be able to swallow windows XP... notebooks have not reached the 199.00 price point yet and won't for a good while. And the very very lightweight small ones? for a long long time.
't would be oh so nice.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think what the main problem is that TaskSwitchXP relies on system calls that are only in the NT Kernel (< NT4, 2000, XP, and 2003), as opposed to the 9x (95, 98, ME), so it won't work on older systems.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well ... I don't remember the API call but PrintWindow is only a simple way to capture a window's preview ... I've done this a while ago ... capture screen for a Virtual Desktop on Windows 2K, to prevent flickering (previewing the entire desktop) I cached the window's previews of the windows that had changed ... well it's not the subject now. I think it was a message to send to the window WM_PRINTWINDOW or something like that.
Correct me If I'm wrong, BUT, even without PrintWindow, with a HWND you can get the coords of a window, you can then copy the region in between the window coords.
Well I've not done any programming for 1 year now but I think something like this should do it:
windowBitmap do have the preview of the window ... Well you have to get the WindowHeight/Width
Hope that helps ... XP don't have a thing that 2000 doesn't have, it's just they want us to believe taht ...
look at media player 8 which only do things in XP, you get the beta leaked from microsoft and oops, it works ... more ... you use a soft to let believe you have XP even if it's 2000 and it works ...
For PrintWindow it's a shortcut, not a "XP only" functionality
Have a nice day :D
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Didn't know that PrintWindow wasn't similar to WM_PRINT ... according to the link you sent, you don't capture what is drawn in WM_PAINT. :S No good ...
Well I'm sorry, I believed what MSDN said in PrintWindow MSDN page ... Well ...
Have you tested if PrintWindow captures WM_PAINTed things ? I myself haven't ...
Cause all the controls and other things will be captured by WM_PRINT I guess, no ?
But if we can grab everything that is not WM_PAINT'ed in other OSes than XP it's still better than nothing ... I think pretty much everyone with W98 or W2000 prefers this compared to nothing. And I think it's not to time consumming to do it (I'm guessing, I haven't looked the source code, don't take it the bad way, TaskSwitchXP is great as it is, eh). But as I'm using 2000 for it's less memory consuming, and more stable (it's only my opinion, here again), i'd like to have a TaskSwitchXP counterpart in W2000.
So a little summary:
1) If PrintWindow captures what has been painted in WM_PAINT message, Microsoft MSDN is lying (well, taht wouldn't be the first wrong thing in MSDN)
2) Have you verified PrintWindow captures what WM_PRINT can't ?
3) Even if it's worst than PrintWindow, is a WM_PRINT version of TaskSwitchXP for (W95+) planned to be released ? (here, I suppose that the mod isn't too long to be done, if it's long, well I understand, you don't want to do it, if you don't use XP, but can you tell me, this way, in 3 years when I have a little time, I can do it and post it to you :-D )
4) Thanks for answering my previous mail ... I wasn't aware of what you've spotted with the article.
I know I ask too much things (well 4 questions isn't too much, isn't it ? ) ;-) LOL, but I really want this in W2k ... and if i can have it without reinstalling a compiler, and doing the mod myself, it will be great ...
My only hope is now that PrintWindow has the same limitation than WM_PRINT ... LOL
Waiting your answer avidly :D
Have a nice day !!!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, if i have a little time during the holidays, I'll do some testing ... you're forcing me to install a compiler ... you know that, eh ? LOL ...
If I come to something that works, I post it to you ...
yosoyhector ;-)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It's yosoyhector again ... ;) but this time it's not to bother ... LOL
I'm trying to have a preview of all windows (but not custom WM_PAINT fancies like in the article you pointed) in w2000 and previous.
After a first try and a little thinking (I only got a black preview :S ) I've come to a conclusion, which is:
We can't retrieve the Bitmap if we are not in the process' memory space. So I decided to do a little system-wide hook to map a dll i've written in all processes spaces and then tried to recover Preview ... now, I'm still stuck, and I've no more time to test (01h20 here ;-) ) ... I'm currently doing the preview thing in the dll but not in the hook function.
I think it's the root of the problem cause if I'm not mistaken, only the hook function is injected in the process meomry space ... so it explains that even with a system-wide hook, I have still no luck.
As I said, i have no more time to test (already taken me more or less 4h with compiler install and all :S) so ... as I have no clear idea as to how I can solve the problem, I guess that you can only get the preview of A WINDOW YOU CREATED (the process in which you send WM_PRINT is the same as the one receiving the result).
So, MSDN is telling lies as always ;-) WM_PRINT isn't the same as PrintWindow at all !!!
Well I've surely done this with bitblt when I did it (I cheated, lol ) ... :S ... I don't remember taht it was only my window I needed to preview ... well, never mind ...
I've tried SPrintwindow ... no luck ... it doesn't work on my w2k ...
Well I think PrintWindow is the good solution and it will stay XP+, ... doing it in w2000 and previous is far more difficult than I though (without cheating :-P) ... snif
Well ... have a happy new year all ... :D
Sorry again to have bothered !!!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is it dependent on XP? Would it not be portable to 98, 2000, etc? I mean, some people have notebooks, and they work very very nicely but would NOT be able to swallow windows XP... notebooks have not reached the 199.00 price point yet and won't for a good while. And the very very lightweight small ones? for a long long time.
't would be oh so nice.
The matter is to emulate the PrintWindow function in those OSs.
I do not know if this could be done some way...
I think what the main problem is that TaskSwitchXP relies on system calls that are only in the NT Kernel (< NT4, 2000, XP, and 2003), as opposed to the 9x (95, 98, ME), so it won't work on older systems.
Yes, PrintWindow APIs included only in Windows XP and Windows Server 2003! This is impossible to emulate it...
Maybe I will make a "TaskSwitchXP Lite" package with Windows 9x/NT/2000 support (without window preview feature!). Look for updates!
Well ... I don't remember the API call but PrintWindow is only a simple way to capture a window's preview ... I've done this a while ago ... capture screen for a Virtual Desktop on Windows 2K, to prevent flickering (previewing the entire desktop) I cached the window's previews of the windows that had changed ... well it's not the subject now. I think it was a message to send to the window WM_PRINTWINDOW or something like that.
Correct me If I'm wrong, BUT, even without PrintWindow, with a HWND you can get the coords of a window, you can then copy the region in between the window coords.
Well I've not done any programming for 1 year now but I think something like this should do it:
HDC WinDC=GetDC(hwndWindow);
MemDC=CreateCompatibleDC(WinDC);
HBITMAP windowBitmap=CreateCompatibleBitmap(WinDC, WindowWidth, WindowHeight);
SelObj=SelectObject(MemDC,windowBitmap);
BitBlt(MemDC,0,0,WindowWidth,WindowHeight, WinDC, 0, 0,SRCCOPY);
SelectObject(MemDC,SelObj);
DeleteDC(MemDC);
ReleaseDC(GetDesktopWindow, WinDC);
windowBitmap do have the preview of the window ... Well you have to get the WindowHeight/Width
Hope that helps ... XP don't have a thing that 2000 doesn't have, it's just they want us to believe taht ...
look at media player 8 which only do things in XP, you get the beta leaked from microsoft and oops, it works ... more ... you use a soft to let believe you have XP even if it's 2000 and it works ...
For PrintWindow it's a shortcut, not a "XP only" functionality
Have a nice day :D
:)
BitBlt works only with top level windows! Please try before posting...
lost oem numbers can not load xp with out oem
PrintWindow isn't similar to WM_PRINT message.
Article at http://www.fengyuan.com/article/wmprint.html describes this...
Didn't know that PrintWindow wasn't similar to WM_PRINT ... according to the link you sent, you don't capture what is drawn in WM_PAINT. :S No good ...
Well I'm sorry, I believed what MSDN said in PrintWindow MSDN page ... Well ...
Have you tested if PrintWindow captures WM_PAINTed things ? I myself haven't ...
Cause all the controls and other things will be captured by WM_PRINT I guess, no ?
But if we can grab everything that is not WM_PAINT'ed in other OSes than XP it's still better than nothing ... I think pretty much everyone with W98 or W2000 prefers this compared to nothing. And I think it's not to time consumming to do it (I'm guessing, I haven't looked the source code, don't take it the bad way, TaskSwitchXP is great as it is, eh). But as I'm using 2000 for it's less memory consuming, and more stable (it's only my opinion, here again), i'd like to have a TaskSwitchXP counterpart in W2000.
So a little summary:
1) If PrintWindow captures what has been painted in WM_PAINT message, Microsoft MSDN is lying (well, taht wouldn't be the first wrong thing in MSDN)
2) Have you verified PrintWindow captures what WM_PRINT can't ?
3) Even if it's worst than PrintWindow, is a WM_PRINT version of TaskSwitchXP for (W95+) planned to be released ? (here, I suppose that the mod isn't too long to be done, if it's long, well I understand, you don't want to do it, if you don't use XP, but can you tell me, this way, in 3 years when I have a little time, I can do it and post it to you :-D )
4) Thanks for answering my previous mail ... I wasn't aware of what you've spotted with the article.
I know I ask too much things (well 4 questions isn't too much, isn't it ? ) ;-) LOL, but I really want this in W2k ... and if i can have it without reinstalling a compiler, and doing the mod myself, it will be great ...
My only hope is now that PrintWindow has the same limitation than WM_PRINT ... LOL
Waiting your answer avidly :D
Have a nice day !!!
So WM_PRINT captures only standard controls...
Code from article works very unstable!!! It's vain for TSXP! :(
For more information about PrintWindow API look at Expire SPrintWindow (+documentation): http://expire.free.fr/board/index.php?showtopic=109 (download link: http://expire.free.fr/board/index.php?act=Attach&type=post&id=913\). At present I cann't test it on my Win2000, it crashes...
I'll make TSXp lite package (without previews) after v1.1 final!
Nice night!!!
Regards, Alexander Avdonin.
Well, if i have a little time during the holidays, I'll do some testing ... you're forcing me to install a compiler ... you know that, eh ? LOL ...
If I come to something that works, I post it to you ...
yosoyhector ;-)
It's yosoyhector again ... ;) but this time it's not to bother ... LOL
I'm trying to have a preview of all windows (but not custom WM_PAINT fancies like in the article you pointed) in w2000 and previous.
After a first try and a little thinking (I only got a black preview :S ) I've come to a conclusion, which is:
We can't retrieve the Bitmap if we are not in the process' memory space. So I decided to do a little system-wide hook to map a dll i've written in all processes spaces and then tried to recover Preview ... now, I'm still stuck, and I've no more time to test (01h20 here ;-) ) ... I'm currently doing the preview thing in the dll but not in the hook function.
I think it's the root of the problem cause if I'm not mistaken, only the hook function is injected in the process meomry space ... so it explains that even with a system-wide hook, I have still no luck.
As I said, i have no more time to test (already taken me more or less 4h with compiler install and all :S) so ... as I have no clear idea as to how I can solve the problem, I guess that you can only get the preview of A WINDOW YOU CREATED (the process in which you send WM_PRINT is the same as the one receiving the result).
So, MSDN is telling lies as always ;-) WM_PRINT isn't the same as PrintWindow at all !!!
Well I've surely done this with bitblt when I did it (I cheated, lol ) ... :S ... I don't remember taht it was only my window I needed to preview ... well, never mind ...
I've tried SPrintwindow ... no luck ... it doesn't work on my w2k ...
Well I think PrintWindow is the good solution and it will stay XP+, ... doing it in w2000 and previous is far more difficult than I though (without cheating :-P) ... snif
Well ... have a happy new year all ... :D
Sorry again to have bothered !!!