Is is possible to have a minimize button on the window?
Tried setResizeAble(true) but that gives me a maximize button which I do not want and a disabled minimize button.
Minimize button
If you don't want to change the engine source I think you can do something like this...
or if you are not using the software drivers...
// jef
Code: Select all
IrrlichtDevice *device = createDevice( ...
HWND hWnd = FindWindow( "CIrrDeviceWin32", 0 );
// HWND hWnd = GetActiveWindow();
if ( hWnd )
{
LONG style = GetWindowLong( hWnd, GWL_STYLE );
style |= WS_MINIMIZEBOX;
SetWindowLong( hWnd, GWL_STYLE, style );
SendMessage( hWnd, WM_NCPAINT, 1, 0 );
}
Code: Select all
video::IVideoDriver* driver = device->getVideoDriver();
video::SExposedVideoData ed = driver->getExposedVideoData();
HWND hWnd = 0;
switch ( driver->getDriverType())
{
case video::EDT_DIRECT3D8:
hWnd = reinterpret_cast<HWND>( ed.D3D8.HWnd );
break;
case video::EDT_DIRECT3D9:
hWnd = reinterpret_cast<HWND>( ed.D3D9.HWnd );
break;
case video::EDT_OPENGL:
hWnd = reinterpret_cast<HWND>( ed.OpenGLWin32.HWnd );
break;
default:
break;
}
if ( hWnd )
{
LONG style = GetWindowLong( hWnd, GWL_STYLE );
style |= WS_MINIMIZEBOX;
SetWindowLong( hWnd, GWL_STYLE, style );
SendMessage( hWnd, WM_NCPAINT, 1, 0 );
}