// Use an ownerdraw button to produce a static bitmap, since there's
// no ownerdraw static.
// TODO: perhaps this should be a static item, with style SS_BITMAP.
- HWND static_item =
- CreateWindowEx(0, "BUTTON", "", BS_OWNERDRAW | WS_TABSTOP | WS_CHILD,
- 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId,
- wxGetInstance(), NULL);
- m_hWnd = (WXHWND) static_item;
+ m_hWnd = (WXHWND)CreateWindow
+ (
+ "BUTTON",
+ "",
+ BS_OWNERDRAW | WS_TABSTOP | WS_CHILD | WS_VISIBLE,
+ 0, 0, 0, 0,
+ (HWND)parent->GetHWND(),
+ (HMENU)m_windowId,
+ wxGetInstance(),
+ NULL
+ );
// Subclass again for purposes of dialog editing mode
- SubclassWin((WXHWND) static_item);
+ SubclassWin(m_hWnd);
+
+ SetFont(* GetParent()->GetFont());
+
SetSize(x, y, width, height);
return TRUE;
}
if (y == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE))
y1 = currentY;
+ AdjustForParentClientOrigin(x1, y1, sizeFlags);
+
int actualWidth = width;
int actualHeight = height;
HDC hDC = lpDIS->hDC;
HDC memDC = ::CreateCompatibleDC(hDC);
- HBITMAP old = ::SelectObject(memDC, (HBITMAP) bitmap->GetHBITMAP());
+ HBITMAP old = (HBITMAP) ::SelectObject(memDC, (HBITMAP) bitmap->GetHBITMAP());
if (!old)
return FALSE;