window buttons refresh

Blitz3D Forums/Blitz3D Programming/window buttons refresh

Sacha(Posted 2009) [#1]
Hello there - tried to find that by my own but couldnt.

I modify my window propertys with user32 calls to activate the maximize button and the scalability of the window.

This works, but the window frame and buttons arent refreshed (the maximize button is still grey).

I tried to do the following :

hWindow = api_getactivewindow()
api_RedrawWindow(hwindow,0,0,UPDATENOW)

with :
const updatenow =$100

the decl :
api_GetWindow% (hwnd%, wCmd%) : "GetWindow"
api_RedrawWindow% (hwnd%, lprcUpdate%, hrgnUpdate%, fuRedraw%) : "RedrawWindow"

What am I missing ? :3


Sacha(Posted 2009) [#2]
Also, I declared the window with this style :

WindowStyle = WS_VISIBLE + WS_BORDER + WS_MINIMIZEBOX + WS_MAXIMIZEBOX + WS_SIZEBOX + WS_SYSMENU + WS_DLGFRAME


Sacha(Posted 2009) [#3]
Partly Resolved : Since when I manually resized the window, it was correctly redrawn, I did a trick with MoveWindow().

Its not perfect, but it works and is fine with me. :)