X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/47d67540a017101b3e46abe9ef0f55914d8de37e..90186e524e347a3a779c928a44fb7d744b3efcf7:/src/msw/minifram.cpp?ds=sidebyside diff --git a/src/msw/minifram.cpp b/src/msw/minifram.cpp index c64fdf0e7d..282ae2bbdd 100644 --- a/src/msw/minifram.cpp +++ b/src/msw/minifram.cpp @@ -22,6 +22,7 @@ #ifndef WX_PRECOMP #include "wx/setup.h" +#include "wx/event.h" #include "wx/app.h" #include "wx/utils.h" #endif @@ -31,9 +32,11 @@ #include "wx/minifram.h" #include "wx/msw/private.h" +#ifndef __TWIN32__ #ifdef __GNUWIN32__ #include "wx/msw/gnuwin32/extra.h" #endif +#endif #if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxMiniFrame, wxFrame) @@ -88,7 +91,7 @@ wxMiniFrame::~wxMiniFrame(void) #include -#ifndef __WATCOMC__ +#if !defined( __WATCOMC__ ) && !defined( __MWERKS__ ) && !defined(__SALFORDC__) #include #endif @@ -376,12 +379,19 @@ LRESULT WINAPI ibDefWindowProc( HWND hWnd, UINT uiMsg, WPARAM wParam, LPARAM lPa cx = GetSystemMetrics( SM_CXFRAME ) ; cy = GetSystemMetrics( SM_CYFRAME ) ; } + else if (TestWinStyle(hWnd, WS_BORDER )) + { + cx = GetSystemMetrics( SM_CXBORDER ) ; + cy = GetSystemMetrics( SM_CYBORDER ) ; + } else - if (TestWinStyle(hWnd, WS_BORDER )) - { - cx = GetSystemMetrics( SM_CXBORDER ) ; - cy = GetSystemMetrics( SM_CYBORDER ) ; - } + { + // VZ: I don't know what should be here, but the vars must + // be inited! + wxFAIL_MSG("don't know how to initialize cx, cy"); + + cx = cy = 0; + } GetIconRect( hWnd, &rcMenu ) ; GetMinButtonRect( hWnd, &rcMin ) ; @@ -865,7 +875,8 @@ BOOL PASCAL DrawCaption( HDC hDC, HWND hWnd, LPRECT lprc, int cy ; SIZE Size ; - if ((lpsz = (char*)GlobalAllocPtr( GHND, ui + 2 ))) + lpsz = (char*)GlobalAllocPtr( GHND, ui + 2 ); + if (lpsz) { UINT nBkMode ; @@ -1074,7 +1085,8 @@ BOOL PASCAL DoMenu( HWND hWnd ) if (!TestWinStyle(hWnd, WS_SYSMENU)) return FALSE ; - if ((hDC = GetWindowDC( hWnd ))) + hDC = GetWindowDC( hWnd ); + if (hDC) { // Invert the icon //