Can't find window centering code on Glmax2d (win32)

Übersicht BlitzMax, BlitzMax NG Beginners-Corner

Neue Antwort erstellen

 

Guamtmsou G.

Betreff: Can't find window centering code on Glmax2d (win32)

BeitragSo, Mai 22, 2011 18:02
Antworten mit Zitat
Benutzer-Profile anzeigen
on d3d9graphics.bmx method Create of TD3D9Graphics it's an easy way to create main Bmax window in a custom position...

Code: [AUSKLAPPEN]
   Method Create:TD3D9Graphics( width,height,depth,hertz,flags )
      Local wstyle

      If depth
         wstyle=WS_VISIBLE|WS_POPUP
      Else
         wstyle=WS_VISIBLE|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX
      EndIf
      
      Local rect[4]

      If Not depth
         Local desktopRect[4]
         GetWindowRect GetDesktopWindow(),desktopRect
            
         rect[0]=desktopRect[2]/2-width/2;   ' **********Change this value********    
         rect[1]=desktopRect[3]/2-height/2;' **********Change this value********


Well.. i can't find the OpenGL version of this thing... i've looked in glgraphics.bmx.. glmax2d.bmx..graphics.bmx... but nothing..

Can anyone help me? Thx in advance

Neue Antwort erstellen


Übersicht BlitzMax, BlitzMax NG Beginners-Corner

Gehe zu:

Powered by phpBB © 2001 - 2006, phpBB Group