leo.zhou
2014-06-16 04:53:11 UTC
Hi guys,
I've been testing shaped window recently on Mac. When I add one button to
the shaped window, it isn't displayed with correct size and position.
Furthermore, the mouse pointer always goes to the top left corner when I
drag the window. I use a white bitmap(100*100 pixels) with rounded corners
as the background, This is my code:
ShapedFrame::ShapedFrame(wxFrame *parent)
: wxFrame(parent, wxID_ANY, wxEmptyString,
wxDefaultPosition, wxSize(100, 100),
0
| wxFRAME_SHAPED
| wxSIMPLE_BORDER
| wxFRAME_NO_TASKBAR
| wxSTAY_ON_TOP
)
{
m_shapeKind = Shape_Star;
m_bmp = wxBitmap(wxT("window.bmp"), wxBITMAP_TYPE_BMP );
SetSize(wxSize(m_bmp.GetWidth(), m_bmp.GetHeight()));
SetWindowShape();
m_Button = new wxButton( this, wxID_ANY, "Click me!", wxPoint(30, 30),
wxSize(30, 15) );
}
Regards,
Leo
I've been testing shaped window recently on Mac. When I add one button to
the shaped window, it isn't displayed with correct size and position.
Furthermore, the mouse pointer always goes to the top left corner when I
drag the window. I use a white bitmap(100*100 pixels) with rounded corners
as the background, This is my code:
ShapedFrame::ShapedFrame(wxFrame *parent)
: wxFrame(parent, wxID_ANY, wxEmptyString,
wxDefaultPosition, wxSize(100, 100),
0
| wxFRAME_SHAPED
| wxSIMPLE_BORDER
| wxFRAME_NO_TASKBAR
| wxSTAY_ON_TOP
)
{
m_shapeKind = Shape_Star;
m_bmp = wxBitmap(wxT("window.bmp"), wxBITMAP_TYPE_BMP );
SetSize(wxSize(m_bmp.GetWidth(), m_bmp.GetHeight()));
SetWindowShape();
m_Button = new wxButton( this, wxID_ANY, "Click me!", wxPoint(30, 30),
wxSize(30, 15) );
}
Regards,
Leo
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users