problems in resizable window
BlitzMax Forums/MiniB3D Module/problems in resizable window
| ||
Hi! Dunno if this is the right forum's section to post that, but I thinks that the thrd points concern minib3D.... anyway.. I've changed WS_VISIBLE|WS_CAPTION|WS_SYSMENU in WS_VISIBLE|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_MAXIMIZEBOX in glGraphics module to get a resizable window with minimize/maximize button: works! but it bring some problems ( I.e. I open the window with "Graphics3D 800,600" ) 1) When I maximize the window, (for example getting a 1024x768 window), the area between 800 and 1024, as the area between 600 and 768, getting 'messed'. obviously because it showing an area where I draw anything. ![]() 2) So... I want draw something in that area: I've already a system that allow me to change the 'viewport' size without affect the usability of program (moving the elements in function of two variable, screenX and screenY).. but I need to know exactly the size of the resized window: how? 3) last but not last: When i resize the window vertically I get something strange: Seems that it pick as origin y-coordinate,the bottom value (e.g 600 ), and not the top value (0) ... that make the top area hide, and get strange offsets in mouse's coordinates. Sorry.. I'mb bad in english .. so i hope that image explain more: ![]() that not happens in horizontal resize, and never happens in simply Max2D aps: Only with Minib3D (+Max2D) If I have the confirmation that with MaxGUI minib3D+max2D works good, and without "3)" problem.. I could buy it .. but at the moment I want try that way... I've tried also wxMax but i can't get what I want :( |
| ||
could you post some code (a working reduced sample) which shows the problem ? |
| ||
right! well, first of all open (& backup): [blitzMaxFolder]\mod\brl.mod\glgraphics.mod\glgraphics.win32.c on line 293, change hwnd_style=WS_CAPTION|WS_SYSMENU; in hwnd_style=WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_SIZEBOX; then Ctrl+D in IDE ... now.. try that short code: Import "includes\minib3D.bmx" 'SetGraphicsDriver(GLMax2DDriver()) 'Graphics(640, 480, 0, 60, GRAPHICS_BACKBUFFER | GRAPHICS_DEPTHBUFFER | GRAPHICS_ACCUMBUFFER) Graphics3D 800, 600, 0 Global camera:tCamera = CreateCamera() PositionEntity camera,0,0,-20 CameraClsColor camera,255,255,255 Global cube:tEntity = CreateCube() EntityColor cube,255,0,0 While Not KeyHit(KEY_ESCAPE ) TurnEntity cube,1,1,1 RenderWorld TGlobal.BeginMax2D SetColor Rnd(255),Rnd(255),Rnd(255) For Local i:Int = 0 To 10 DrawRect 30+i*60, 200, 50, 50 Next For Local y:Int = 0 To GraphicsHeight() Step 10 DrawText y,50,y Next Flip TGlobal.EndMax2D Wend (minib3D.bmx is the simonh 045 version) it will open a resizable window: Try to reduce the height of window... the top area gets hide to show the bottom area: I want the opposite XD |
| ||
Try this: |