I posted from work so I couldn't try it then but I've answered my own question now. GetWindowLongPtr() resulted in 0x14CF0000. I added 0x0200000 (WS_CLIPCHILDREN) to it.
This is the code:
#include "DarkGDK_Window.h"
#include "globstruct.h"
#include <commctrl.h>
DWORD DisplayMode = 1;
DWORD DisplayWidth = 800;
DWORD DisplayHeight = 600;
DWORD DisplayDepth = 32;
char ApplicationTitle[] = "GDK Window Control";
#define UNUSED_VAR(x) {x;}
#define IDC_MAIN_STATUS 103
HWND hStatus;
bool DarkGDKStart ( void )
{
return true;
}
void DarkGDKInit (
DWORD* pdwDisplayType,
DWORD* pdwWidth,
DWORD* pdwHeight,
DWORD* pdwDepth,
HINSTANCE* phInstance,
LPSTR* ppApplicationName,
HWND* ppParentHWND,
DWORD* pdwInExStyle,
DWORD* pdwInStyle
)
{
*pdwDisplayType = DisplayMode;
if (DisplayMode == 1)
{
*pdwWidth = DisplayWidth;
*pdwHeight = DisplayHeight;
}
if (DisplayMode == 3)
{
*pdwDepth = DisplayDepth;
}
*ppApplicationName = ApplicationTitle;
UNUSED_VAR(*ppParentHWND);
UNUSED_VAR(*pdwInExStyle);
UNUSED_VAR(*pdwInStyle);
UNUSED_VAR(*phInstance);
}
int DarkGDKEnd ( void )
{
return 0;
}
void DarkGDK()
{
if (DisplayMode != 1)
{
dbSetDisplayMode(DisplayWidth, DisplayHeight, dbScreenDepth());
}
dbSyncOff ( );
dbSyncRate ( 60 );
dbMakeObjectCube(1, 1.0);
SetWindowLongPtr(g_pGlob->hWnd,GWL_STYLE,0x16CF0000); // <= Need to change this style
hStatus = CreateWindowEx(0, STATUSCLASSNAME, "Yeah!!!",
WS_CHILD | WS_VISIBLE | SBARS_SIZEGRIP, 0, 0, 0, 0,
g_pGlob->hWnd, (HMENU)IDC_MAIN_STATUS, GetModuleHandle(NULL), NULL);
while ( LoopGDK ( ) )
{
dbRotateObject(1,
dbWrapValue(dbObjectAngleX(1)+1.0f),
dbWrapValue(dbObjectAngleY(1)+1.0f),
dbWrapValue(dbObjectAngleZ(1)+1.0f));
dbSync();
}
return;
}
Just replace main.cpp from IanM's demo:
http://forum.thegamecreators.com/?m=forum_view&t=144462&b=22
And add comctl32.lib to the Additional Dependencies on the Linker's Input page.