Ok, took me a while but managed to convert all the code to pure C... I now can compile but down to two warnings... This has to do with the ID of the child window
Code:
HWND CreateButton(const HWND hParent,const HINSTANCE hInst,DWORD dwStyle,
const RECT& rc,const int id,const ustring& caption)
{
dwStyle|=WS_CHILD|WS_VISIBLE;
return CreateWindowEx(0,
_T("button"),
caption.c_str(),
dwStyle,
rc.left,
rc.top,
rc.right,
rc.bottom,
hParent,
reinterpret_cast<HMENU>(static_cast<INT_PTR>(id)),
hInst,
0);
}
What you see above is a C++ style, converting into C ...
... gives a warning
Code:
warning C4312: 'type cast' : conversion from 'int' to 'HMENU' of greater size
Ignoring this warning disables the minimize/restore/close buttons on the window... Any ideas on how to convert this properly?