Screen saver preview

Started by
4 comments, last by encom 20 years, 9 months ago
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 !
Advertisement
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?
"Literally, it means that Bob is everything you can think of, but not dead; i.e., Bob is a purple-spotted, yellow-striped bumblebee/dragon/pterodactyl hybrid with a voracious addiction to Twix candy bars, but not dead."- kSquared
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.
"Back to the code mines... ka-chink... ka-chink..."Tachyon Digital - Down for the summer, be back in the fall.
Hyren,

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

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.
"Back to the code mines... ka-chink... ka-chink..."Tachyon Digital - Down for the summer, be back in the fall.
thanks hyren

This topic is closed to new replies.

Advertisement