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


win32 question for my OpenGL program

Recommended Posts

Thanks for the help I''ve gotten so far in the forums, my program is nearing completion now as it does this: - Opens a fullscreen context and stays behind the task bar so that it can act as a desktop wallpaper and continues to show programs even if they lose focus. - Does checks to see if resolution has changed during runtime, if so it rescales the context to compensate. - Has some cool animations (better to come soon). - Dropshadowing for the active window as long as it''s not the program itself. Ok notice I said the active window, I want to do this with every window that is in front of my program. The code I am using right now looks like this (a snipet from my drawing code): glEnable(GL_BLEND); glBindTexture(GL_TEXTURE_2D,textures[1].texID); hWnd3 = GetForegroundWindow(); if(hWnd3 != hWnd) { GetWindowRect(hWnd3,&rect); glLoadIdentity(); glTranslated(20,40,0); glBegin(GL_QUADS); glTexCoord2d(0,0); glVertex2d(rect.left,rect.bottom); // Bottom Left glTexCoord2d(1,0); glVertex2d(rect.right,rect.bottom); // Bottom Right glTexCoord2d(1,1); glVertex2d(rect.right,; // Top Right glTexCoord2d(0,1); glVertex2d(rect.left,; // Top Left glEnd(); }; Ok so after that how do I grab other windows only on the taskbar (like if I''ve got say Minesweeper and IE in 2 different windows, neither maximized or minimized) to do my spiffy little dropshadow routine. I have tried hWnd2 = GetNextWindow(hWnd3,GW_HWNDNEXT); but it doesn''t seem to do the job, someone told me on the iRC something about EnumWindows but that''s confusing, any help I can get would be appreciated.

Share this post

Link to post
Share on other sites