// and passing CW_USEDEFAULT to MoveWindow() results in resizing the
// window to (0, 0) size which breaks quite a lot of things, e.g. the
// sizer calculation in wxSizer::Fit()
- if ( w == CW_USEDEFAULT )
+ if ( w == (int)CW_USEDEFAULT )
{
// the exact number doesn't matter, the dialog will be resized
// again soon anyhow but it should be big enough to allow
h = 100;
}
- if ( x == CW_USEDEFAULT )
+ if ( x == (int)CW_USEDEFAULT )
{
// well, where should we put it? maybe centre it on screen?
x =
// enabling/disabling the close item from it also automatically
// disables/enables the close title bar button
- if ( !::EnableMenuItem(hmenu, SC_CLOSE,
- MF_BYCOMMAND | (enable ? MF_ENABLED : MF_GRAYED)) )
+ if ( ::EnableMenuItem(hmenu, SC_CLOSE,
+ MF_BYCOMMAND |
+ (enable ? MF_ENABLED : MF_GRAYED)) == -1 )
{
wxLogLastError(_T("EnableMenuItem(SC_CLOSE)"));