How to open a windowed graphics mode invisibly

BlitzMax Forums/BlitzMax Programming/How to open a windowed graphics mode invisibly

I'd like to do it invisible so I can do some funky hardware tests without a box popping up...

You can't / shouldn't.

Why not? Couldn't you just comment out the ShowWindow line in glgraphics.win32.c and call ShowWindow on the hwnd provided by the context when you're done?

I'll take your word for it lads. I'll just let max fall back to opengl, and if its software, close the window and enable SDL.

I believe MaxGUI allows you to open a window that is hidden.

> I believe MaxGUI allows you to open a window that is hidden.

It does. It's just simply ORing the WS_VISIBLE style with the rest of the style flags if you want a window visible on creation. I honestly don't think having a window open during its creation looks professional, as seeing a load of stuff pop up on a slower PC is less than fun. Sometimes looks like it's become self aware and that it wants to murder the end user... or not.

In any case, I re-state my question: why not?

It's possible with Max but it does not work on every system. I do it with igLoader. I run the process with a hidden window, embed it and then show it again. Voila.