OpenGL screensaver password problem

Im having a problem implementing the standard windows screensaver password. Everything works except if the user types the wrong password and presses OK, the window telling them to retype it doesnt appear and the password window loses focus. Now I think the problem is due to the fact im creating my window like so:

hChild = CreateWindow(
wc.lpszClassName,
“Child1”,
// OpenGL requires WS_CLIPCHILDREN and WS_CLIPSIBLINGS
WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS,
// Window position and size
0, 0,nMaxX,nMaxY,
hWnd,NULL,hInst,NULL);

and I think it needs to be done like so
CreateWindowEx(WS_EX_TOPMOST,“ScrClass”,“SaverWindow”,WS_POPUP|WS_VISIBLE,0,0,cx,cy,NULL,NULL,hInstance,NULL);

but like the comments say above I have to use clipsibblings and clipchildren for OpenGL.

My question is, has anyone managed to write an OpenGL screensaver that uses the standard password functions, works fully and could they send/post the relevant source or tell me where I’m going wrong.

Thanks

[This message has been edited by Adrian (edited 07-02-2000).]

Hi Adrian!

I’m allways using the Sources from Microsoft OpenGL examples and this allways works.

They are using clibsibblings too:


case SS_TYPE_NORMAL:
{
// We set fChildPreview even when we’re running in a normal window,

uStyle = WS_VISIBLE | WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN |
WS_CLIPSIBLINGS;

}

Hope i could help a bit

Guenther

Thanks for the reply, unfortunately when I tried it, it rendered to a seperate window and locked up :stuck_out_tongue:

Since my original post I have managed to get it working by stopping the animation when the password box appears, this isn’t perfect but it will do.

I’ve put it up on my website http://www.dialspace.dial.pipex.com/voodoopeople/mars3d.html

Be warned, it will be a slide show unless you have a PIII or K7 and it requires 128Mb of RAM.

Arguably what I have done isn’t best suited as a screensaver, its too resource hungary. Oh well.