Got generic wxListCtrl, wxTreeCtrl working under Windows, wxNotebook almost;
some doc corrections; Win16 dialog crash cured git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1255 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -20,7 +20,6 @@
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
#include "wx/tab.h"
|
||||
#include "test.h"
|
||||
|
||||
// If 1, use a dialog. Otherwise use a frame.
|
||||
@@ -44,10 +43,9 @@ bool MyApp::OnInit(void)
|
||||
#else
|
||||
frame = new MyFrame((wxFrame*) NULL, -1, (char *) "Notebook", wxPoint(-1, -1), wxSize(365, 390), wxDEFAULT_FRAME_STYLE);
|
||||
|
||||
// Problem with Motif whereby it doesn't size properly unless
|
||||
// you set the size again (to a different size than before,
|
||||
// since SetSize is optimized)
|
||||
#ifdef __WXMOTIF__
|
||||
// Problem with generic wxNotebook implementation whereby it doesn't size properly unless
|
||||
// you set the size again (to a different size than before, since SetSize is optimized)
|
||||
#if defined(__WXMOTIF__) || defined(__WIN16__)
|
||||
frame->SetSize(-1, -1, 370, 390);
|
||||
#endif
|
||||
|
||||
|
BIN
samples/treectrl/bitmaps/file1.bmp
Normal file
BIN
samples/treectrl/bitmaps/file1.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 246 B |
BIN
samples/treectrl/bitmaps/folder1.bmp
Normal file
BIN
samples/treectrl/bitmaps/folder1.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 246 B |
@@ -83,7 +83,6 @@ END_EVENT_TABLE()
|
||||
|
||||
IMPLEMENT_APP(MyApp)
|
||||
|
||||
// `Main program' equivalent, creating windows and returning main app frame
|
||||
bool MyApp::OnInit()
|
||||
{
|
||||
// Create the main frame window
|
||||
@@ -278,8 +277,15 @@ MyTreeCtrl::MyTreeCtrl(wxWindow *parent, const wxWindowID id,
|
||||
m_imageListNormal = new wxImageList(16, 16, TRUE);
|
||||
|
||||
// should correspond to TreeCtrlIcon_xxx enum
|
||||
#if defined(__WXMSW__) && defined(__WIN16__)
|
||||
// This is required in 16-bit Windows mode only because we can't load a specific (16x16)
|
||||
// icon image, so it comes out blank (using the empty 32x32 icon).
|
||||
m_imageListNormal->Add(wxBitmap("bitmap1", wxBITMAP_TYPE_BMP_RESOURCE));
|
||||
m_imageListNormal->Add(wxBitmap("bitmap2", wxBITMAP_TYPE_BMP_RESOURCE));
|
||||
#else
|
||||
m_imageListNormal->Add(wxICON(icon1));
|
||||
m_imageListNormal->Add(wxICON(icon2));
|
||||
#endif
|
||||
|
||||
SetImageList(m_imageListNormal);
|
||||
|
||||
|
@@ -5,3 +5,6 @@ aaaa ICON "mondrian.ico"
|
||||
icon1 ICON "bitmaps\\file1.ico"
|
||||
icon2 ICON "bitmaps\\folder1.ico"
|
||||
|
||||
bitmap1 BITMAP "bitmaps\\file1.bmp"
|
||||
bitmap2 BITMAP "bitmaps\\folder1.bmp"
|
||||
|
||||
|
Reference in New Issue
Block a user