PDA

View Full Version : always on the top?



08-05-2003, 09:46 AM
Dear everybody

I wanna know how I can set the openGL window always on the top.
Is there some solution?
Please let me know that.

Thanks

kehziah
08-05-2003, 10:18 PM
SetWindowPos(hwnd, HWND_TOPMOST, x, y, cx, cy, flags);

No offense, but you should be able to find these kind of answers by yourself. The MSDN is here (http://msdn.microsoft.com) .

08-05-2003, 11:49 PM
wanna

want *TO*, FFS, not "wanna".

08-06-2003, 12:31 PM
Thank you for your help. But I did know that.
My program doesn't use MFC, but is just command mode (has void main(void)) I'm so sorry I didn't know the name because I'm a beginner as a programmer.
Anyway do you understand me?
Could you tell me the solution? Thank you

al_bob
08-06-2003, 01:22 PM
You must create a window somewhere, no? Thus you should have an HWND to that window. You can then use SetWindowPos() on it.

08-06-2003, 08:53 PM
Hi~ Do you know the function WinExec()?
By this function, I call other program on my GUI environment.
There is void main(void) on the source code of other program. Could you understand?
The main function is following...

main()
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB);
glutInitWindowSize(pixel_width, pixel_height);
glutCreateWindow("sub-program");
init();
glutDisplayFunc(display);
glutIdleFunc(display);
glutMainLoop();


As my thought, I should change this main function to set openGL window alway on top.
Is it correct?
Please help me. T.T