Archived

This topic is now archived and is closed to further replies.

encom

Screen saver preview

Recommended Posts

Hi, I have created a GDI screensaver, it works, but not the preview. I use the command line "/p hwnd" i can use the handle register a window, create a window, but i cannot use it !

Share this post


Link to post
Share on other sites
Your post really doesn''t say anything useful... could you post your initialization code (where you parse the command line) and primariliy, is the handle of the window you''re passing to the screesaver a valid one?

Share this post


Link to post
Share on other sites
encom:

First off, I''m going to assume that when you say "/p hwnd" you''re meaning that you''re passing the (numerical) handle to a window, not the string "hwnd".

Next, as I understand it and have used it, the preview window handle that is passed in is a handle to an already existing window, which means that you don''t have to register it, create it or do anything with it. All you need to do is render into the window and it takes care of the rest. Also make sure that you don''t try to destroy the window when your program exits.

If you''re already doing both of these suggestions, try posting the code you''re using dealing with the window. It''s hard to help without knowing exactly what you''re doing. Good luck.



"Back to the code mines... ka-chink... ka-chink..."
Tachyon Digital - Down for the summer, be back in the fall.

Share this post


Link to post
Share on other sites
Hyren,

Hi, now it''s done, the preview works, but if i dont register and create the new HWND, it doesnt work.

Share this post


Link to post
Share on other sites
encom:

Glad you''ve got it working. When you say that when you don''t register and create the window, it doesn''t work, you''re referring to the preview mode there, right? Not the regular mode? I don''t have the code of my most recent screensaver with me right now, otherwise I''d check, but I think that the window handle that is passed in should just be the handle to the small preview window (in the preferences dialog), which means that it''s already created and ready to go.

Oh well, if it works and works well, then good job.



"Back to the code mines... ka-chink... ka-chink..."
Tachyon Digital - Down for the summer, be back in the fall.

Share this post


Link to post
Share on other sites