Win32 desktop resolution?
BlitzMax Forums/MaxGUI Module/Win32 desktop resolution?
| ||
Is there any way to get the current screen resolution when using MaxGUI? GraphicsHeight() and GraphicsWidth() only seem to work when the graphics mode is initialized by BlitzMax. I need a way to auto-center a window based on the current height and width of the screen. If there's no "Max-way" of doing this, there could be a built-in dll call in Windows for this. All suggestions appreciated! |
| ||
mygadget:TGadget = Desktop() Print GadgetWidth(mygadget) ? |
| ||
Ah, thank you. Didn't know about the Desktop() function. Another issue was brought up, though: I have an extended desktop spanning two monitors and the Desktop() function returns the combined width, while I would prefer only the main monitor width. Any solutions here? ;) |
| ||
Use ClientWidth instead of GadgetWidth |
| ||
Thank you! :) |