From c0ed460c2e7802793d591c84f3cfdbff159c5549 Mon Sep 17 00:00:00 2001
From: Julian Smart <julian@anthemion.co.uk>
Date: Tue, 8 Dec 1998 23:26:18 +0000
Subject: [PATCH] Sorry folks, a lot of changes to remedy GetFont, GetBrush
 etc.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1137 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 distrib/msw/wx_html.rsp       |  21 +++---
 docs/latex/wx/dc.tex          |   8 +--
 docs/latex/wx/grid.tex        |  70 +++++++++----------
 docs/latex/wx/window.tex      |   8 +--
 docs/motif/todo.txt           |   3 +-
 docs/word/odbc.doc            | Bin 233472 -> 238080 bytes
 include/wx/generic/gridg.h    | 125 +++++++++++++++++-----------------
 include/wx/motif/bitmap.h     |   1 -
 include/wx/motif/brush.h      |   1 -
 include/wx/motif/colour.h     |   1 -
 include/wx/motif/cursor.h     |   1 -
 include/wx/motif/dc.h         |   8 +--
 include/wx/motif/font.h       |   1 -
 include/wx/motif/icon.h       |   1 -
 include/wx/motif/notebook.h   |   1 +
 include/wx/motif/palette.h    |   1 -
 include/wx/motif/pen.h        |   1 -
 include/wx/motif/window.h     |   8 +--
 include/wx/msw/bitmap.h       |   1 -
 include/wx/msw/brush.h        |   1 -
 include/wx/msw/control.h      |   8 +--
 include/wx/msw/cursor.h       |   1 -
 include/wx/msw/dc.h           |   8 +--
 include/wx/msw/font.h         |   1 -
 include/wx/msw/icon.h         |   1 -
 include/wx/msw/palette.h      |   1 -
 include/wx/msw/pen.h          |   1 -
 include/wx/msw/window.h       |  14 ++--
 include/wx/stubs/bitmap.h     |   1 -
 include/wx/stubs/brush.h      |   1 -
 include/wx/stubs/colour.h     |   2 +
 include/wx/stubs/cursor.h     |   1 -
 include/wx/stubs/dc.h         |   8 +--
 include/wx/stubs/font.h       |   1 -
 include/wx/stubs/icon.h       |   1 -
 include/wx/stubs/palette.h    |   1 -
 include/wx/stubs/pen.h        |   1 -
 include/wx/stubs/region.h     |   1 +
 include/wx/stubs/timer.h      |  12 ++--
 include/wx/stubs/window.h     |  35 ++++++++--
 samples/grid/test.cpp         |   8 +--
 samples/layout/layout.cpp     |   8 +--
 samples/printing/printing.cpp |   2 +-
 src/common/layout.cpp         |  18 ++---
 src/common/resource.cpp       |   4 +-
 src/common/tbarsmpl.cpp       |   4 +-
 src/common/utilscmn.cpp       |   4 +-
 src/generic/gridg.cpp         | 112 +++++++++++++++---------------
 src/generic/laywin.cpp        |   4 +-
 src/generic/listctrl.cpp      |  22 +++---
 src/generic/panelg.cpp        |   4 +-
 src/generic/sashwin.cpp       |   4 +-
 src/generic/statusbr.cpp      |   6 +-
 src/generic/tabg.cpp          |   4 +-
 src/motif/app.cpp             |   2 +-
 src/motif/button.cpp          |   2 +-
 src/motif/dc.cpp              |   4 +-
 src/motif/dcclient.cpp        |   6 +-
 src/motif/dcmemory.cpp        |  12 ++--
 src/motif/frame.cpp           |  10 +--
 src/motif/notebook.cpp        |  18 +++++
 src/motif/scrolbar.cpp        |   2 +-
 src/motif/toolbar.cpp         |   2 +-
 src/motif/utils.cpp           |   2 +-
 src/motif/window.cpp          |  40 +++++------
 src/msw/app.cpp               |   2 +-
 src/msw/bitmap.cpp            |   4 +-
 src/msw/bmpbuttn.cpp          |   2 +-
 src/msw/button.cpp            |   6 +-
 src/msw/checkbox.cpp          |   4 +-
 src/msw/choice.cpp            |   6 +-
 src/msw/combobox.cpp          |   2 +-
 src/msw/frame.cpp             |  10 +--
 src/msw/gauge95.cpp           |   2 +-
 src/msw/gaugemsw.cpp          |   2 +-
 src/msw/imaglist.cpp          |   2 +-
 src/msw/listbox.cpp           |  12 ++--
 src/msw/mdi.cpp               |   2 +-
 src/msw/nativdlg.cpp          |   2 +-
 src/msw/radiobox.cpp          |  14 ++--
 src/msw/radiobut.cpp          |   4 +-
 src/msw/scrolbar.cpp          |   2 +-
 src/msw/slider95.cpp          |  23 +++----
 src/msw/slidrmsw.cpp          |  22 +++---
 src/msw/statbmp.cpp           |   2 +-
 src/msw/statbox.cpp           |   6 +-
 src/msw/stattext.cpp          |   8 +--
 src/msw/tbarmsw.cpp           |   2 +-
 src/msw/textctrl.cpp          |   6 +-
 src/msw/window.cpp            |  52 +++++++-------
 src/stubs/app.cpp             |   2 +-
 src/stubs/bmpbuttn.cpp        |   4 +-
 src/stubs/data.cpp            |   4 ++
 src/stubs/dc.cpp              |   4 +-
 src/stubs/dcclient.cpp        |   1 +
 src/stubs/frame.cpp           |   8 +--
 src/stubs/scrolbar.cpp        |   2 +-
 src/stubs/stattext.cpp        |   6 +-
 src/stubs/window.cpp          |  35 ++++------
 utils/ogl/src/basic.cpp       |  14 ++--
 utils/ogl/src/basic2.cpp      |  32 ++++-----
 utils/ogl/src/composit.cpp    |  12 ++--
 utils/ogl/src/divided.cpp     |   6 +-
 utils/ogl/src/drawn.cpp       |  14 ++--
 utils/ogl/src/lines.cpp       |  48 ++++++-------
 utils/ogl/src/ogldiag.cpp     |   4 +-
 106 files changed, 535 insertions(+), 526 deletions(-)

diff --git a/distrib/msw/wx_html.rsp b/distrib/msw/wx_html.rsp
index 8324d3a231..0fd2444d4f 100644
--- a/distrib/msw/wx_html.rsp
+++ b/distrib/msw/wx_html.rsp
@@ -9,30 +9,27 @@ docs/html/faq/*.htm
 docs/html/faq/*.gif
 docs/html/techref/*.htm
 docs/html/techref/*.gif
-docs/html/prologio/*.htm
-docs/html/prologio/*.gif
+
 docs/html/dialoged/*.htm
 docs/html/dialoged/*.gif
-docs/html/wxbuild/*.htm
-docs/html/wxbuild/*.gif
-docs/html/wxtab/*.htm
-docs/html/wxtab/*.gif
-docs/html/wxchart/*.htm
-docs/html/wxchart/*.gif
+
 docs/html/wxtree/*.htm
 docs/html/wxtree/*.gif
+
 docs/html/wxgraph/*.htm
 docs/html/wxgraph/*.gif
-docs/html/wxgrid/*.htm
-docs/html/wxgrid/*.gif
+
 docs/html/wxhelp/*.htm
 docs/html/wxhelp/*.gif
-docs/html/wxhelp2/*.htm
-docs/html/wxhelp2/*.gif
+
 docs/html/wxprop/*.htm
 docs/html/wxprop/*.gif
+
 docs/html/winstall/*.htm
 docs/html/winstall/*.gif
+
 docs/html/tex2rtf/*.htm
 docs/html/tex2rtf/*.gif
 
+docs/html/odbc/*.htm
+
diff --git a/docs/latex/wx/dc.tex b/docs/latex/wx/dc.tex
index e2fb6a9f9a..eddddcd335 100644
--- a/docs/latex/wx/dc.tex
+++ b/docs/latex/wx/dc.tex
@@ -329,13 +329,13 @@ and using a style:
 
 \membersection{wxDC::GetBackground}\label{wxdcgetbackground}
 
-\func{wxBrush *}{GetBackground}{\void}
+\func{wxBrush\&}{GetBackground}{\void}
 
 Gets the brush used for painting the background (see \helpref{wxDC::SetBackground}{wxdcsetbackground}).
 
 \membersection{wxDC::GetBrush}\label{wxdcgetbrush}
 
-\func{wxBrush *}{GetBrush}{\void}
+\func{wxBrush\&}{GetBrush}{\void}
 
 Gets the current brush (see \helpref{wxDC::SetBrush}{wxdcsetbrush}).
 
@@ -359,7 +359,7 @@ Gets the rectangle surrounding the current clipping region.
 
 \membersection{wxDC::GetFont}\label{wxdcgetfont}
 
-\func{wxFont *}{GetFont}{\void}
+\func{wxFont\&}{GetFont}{\void}
 
 Gets the current font (see \helpref{wxDC::SetFont}{wxdcsetfont}).
 
@@ -384,7 +384,7 @@ See \helpref{wxDC::SetOptimization}{wxsetoptimization} for details.
 
 \membersection{wxDC::GetPen}\label{wxdcgetpen}
 
-\func{wxPen *}{GetPen}{\void}
+\func{wxPen\&}{GetPen}{\void}
 
 Gets the current pen (see \helpref{wxDC::SetPen}{wxdcsetpen}).
 
diff --git a/docs/latex/wx/grid.tex b/docs/latex/wx/grid.tex
index 7893892a05..39e4a04a1b 100644
--- a/docs/latex/wx/grid.tex
+++ b/docs/latex/wx/grid.tex
@@ -112,7 +112,7 @@ See also \helpref{wxGrid::BeginBatch}{wxgridbeginbatch}, \helpref{wxGrid::GetBat
 
 \membersection{wxGrid::GetBatchCount}\label{wxgridgetbatchcount}
 
-\func{void}{GetBatchCount}{\void}
+\constfunc{int}{GetBatchCount}{\void}
 
 Return the level of batch nesting. This is initially zero, and will be incremented
 every time BeginBatch is called, and decremented when EndBatch is called. When the
@@ -123,7 +123,7 @@ See also \helpref{wxGrid::BeginBatch}{wxgridbeginbatch}, \helpref{wxGrid::EndBat
 
 \membersection{wxGrid::GetCell}\label{wxgridgetcell}
 
-\func{wxGridCell *}{GetCell}{\param{int}{ row}, \param{int}{ col}}
+\constfunc{wxGridCell *}{GetCell}{\param{int}{ row}, \param{int}{ col}}
 
 Returns the grid cell object associated with this position.
 
@@ -131,95 +131,95 @@ wxGenericGrid implementation only.
 
 \membersection{wxGrid::GetCellAlignment}\label{wxgridgetcellalignment}
 
-\func{int}{GetCellAlignment}{\param{int}{ row}, \param{int}{ col}}
+\constfunc{int}{GetCellAlignment}{\param{int}{ row}, \param{int}{ col}}
 
-\func{int}{GetCellAlignment}{\void}
+\constfunc{int}{GetCellAlignment}{\void}
 
 Sets the text alignment for the cell at the given position, or the global alignment value.
 The return value is wxLEFT, wxRIGHT or wxCENTRE.
 
 \membersection{wxGrid::GetCellBackgroundColour}\label{wxgridgetcellbackgroundcolour}
 
-\func{wxColour\&}{GetCellBackgroundColour}{\param{int}{ row}, \param{int}{ col}}
+\constfunc{wxColour\&}{GetCellBackgroundColour}{\param{int}{ row}, \param{int}{ col}}
 
-\func{wxColour\&}{GetCellBackgroundColour}{\void}
+\constfunc{wxColour\&}{GetCellBackgroundColour}{\void}
 
 Gets the background colour for the cell at the given position, or the global background colour.
 
 \membersection{wxGrid::GetCells}\label{wxgridgetcells}
 
-\func{wxGridCell ***}{GetCells}{\void}
+\constfunc{wxGridCell ***}{GetCells}{\void}
 
 Returns the array of grid cell object associated with this wxGrid.
 
 \membersection{wxGrid::GetCellTextColour}\label{wxgridgetcelltextcolour}
 
-\func{wxColour\&}{GetCellTextColour}{\param{int}{ row}, \param{int}{ col}}
+\constfunc{wxColour\&}{GetCellTextColour}{\param{int}{ row}, \param{int}{ col}}
 
-\func{wxColour\&}{GetCellTextColour}{\void}
+\constfunc{wxColour\&}{GetCellTextColour}{\void}
 
 Gets the text colour for the cell at the given position, or the global text colour.
 
 \membersection{wxGrid::GetCellTextFont}\label{wxgridgetcelltextfont}
 
-\func{wxFont *}{GetCellTextFont}{\param{int}{ row}, \param{int}{ col}}
+\constfunc{const wxFont\&}{GetCellTextFont}{\param{int}{ row}, \param{int}{ col}}
 
-\func{wxFont *}{GetCellTextFont}{\void}
+\constfunc{wxFont\&}{GetCellTextFont}{\void}
 
 Gets the text font for the cell at the given position, or the global text font.
 
 \membersection{wxGrid::GetCellValue}\label{wxgridgetcellvalue}
 
-\func{wxString\&}{GetCellValue}{\param{int}{ row}, \param{int}{ col}}
+\constfunc{wxString\&}{GetCellValue}{\param{int}{ row}, \param{int}{ col}}
 
 Returns the cell value at the given position.
 
 \membersection{wxGrid::GetCols}\label{wxgridgetcols}
 
-\func{int}{GetCols}{\void}
+\constfunc{int}{GetCols}{\void}
 
 Returns the number of columns in the grid.
 
 \membersection{wxGrid::GetColumnWidth}\label{wxgridcolumnwidth}
 
-\func{int}{GetColumnWidth}{\param{int}{ col}}
+\constfunc{int}{GetColumnWidth}{\param{int}{ col}}
 
 Gets the width in pixels for column {\it col}.
 
 \membersection{wxGrid::GetCurrentRect}\label{wxgridgetcurrentrect}
 
-\func{wxRectangle *}{GetCurrentRect}{\void}
+\constfunc{wxRectangle *}{GetCurrentRect}{\void}
 
 Returns a pointer to the rectangle enclosing the currently selected cell.
 Do not delete this pointer.
 
 \membersection{wxGrid::GetCursorColumn}\label{wxgridgetcursorcolumn}
 
-\func{int}{GetCursorColumn}{\void}
+\constfunc{int}{GetCursorColumn}{\void}
 
 Returns the column position of the currently selected cell.
 
 \membersection{wxGrid::GetCursorRow}\label{wxgridgetcursorrow}
 
-\func{int}{GetCursorRow}{\void}
+\constfunc{int}{GetCursorRow}{\void}
 
 Returns the row position of the currently selected cell.
 
 \membersection{wxGrid::GetEditable}\label{wxgridgeteditable}
 
-\func{bool}{GetEditable}{\void}
+\constfunc{bool}{GetEditable}{\void}
 
 Returns TRUE if the grid cells can be edited.
 
 \membersection{wxGrid::GetHorizScrollBar}\label{wxgridgethorizscrollbar}
 
-\func{wxScrollBar *}{GetHorizScrollBar}{\void}
+\constfunc{wxScrollBar *}{GetHorizScrollBar}{\void}
 
 Returns a pointer to the horizontal scrollbar.
 
 \membersection{wxGrid::GetLabelAlignment}\label{wxgridgetlabelalignment}
 
-\func{int}{GetLabelAlignment}{\param{int}{ orientation}}
+\constfunc{int}{GetLabelAlignment}{\param{int}{ orientation}}
 
 Gets the row or column label alignment. {\it orientation} should
 be wxHORIZONTAL to specify column label, wxVERTICAL to specify row label.\rtfsp
@@ -227,32 +227,32 @@ be wxHORIZONTAL to specify column label, wxVERTICAL to specify row label.\rtfsp
 
 \membersection{wxGrid::GetLabelBackgroundColour}\label{wxgridgetlabelbackgroundcolour}
 
-\func{wxColour\&}{GetLabelBackgroundColour}{\void}
+\constfunc{wxColour\&}{GetLabelBackgroundColour}{\void}
 
 Gets a row and column label text colour.
 
 \membersection{wxGrid::GetLabelSize}\label{wxgridgetlabelsize}
 
-\func{int}{GetLabelSize}{\param{int}{ orientation}}
+\constfunc{int}{GetLabelSize}{\param{int}{ orientation}}
 
 Gets the row label height, or column label width, in pixels. {\it orientation} should
 be wxHORIZONTAL to specify column label, wxVERTICAL to specify row label.
 
 \membersection{wxGrid::GetLabelTextColour}\label{wxgridgetlabeltextcolour}
 
-\func{wxColour\&}{GetLabelTextColour}{\void}
+\constfunc{wxColour\&}{GetLabelTextColour}{\void}
 
 Gets a row and column label text colour.
 
 \membersection{wxGrid::GetLabelTextFont}\label{wxgridgetlabeltextfont}
 
-\func{wxFont *}{GetLabelTextFont}{\void}
+\constfunc{wxFont\&}{GetLabelTextFont}{\void}
 
 Gets the font to be used for the row and column labels.
 
 \membersection{wxGrid::GetLabelValue}\label{wxgridgetlabelvalue}
 
-\func{wxString\&}{GetLabelValue}{\param{int}{ orientation}, \param{int}{ pos}}
+\constfunc{wxString\&}{GetLabelValue}{\param{int}{ orientation}, \param{int}{ pos}}
 
 Gets a row or column label value. {\it orientation} should
 be wxHORIZONTAL to specify column label, wxVERTICAL to specify row label.\rtfsp
@@ -260,37 +260,37 @@ be wxHORIZONTAL to specify column label, wxVERTICAL to specify row label.\rtfsp
 
 \membersection{wxGrid::GetRowHeight}\label{wxgridgetrowheight}
 
-\func{int}{GetRowHeight}{\param{int}{ row}}
+\constfunc{int}{GetRowHeight}{\param{int}{ row}}
 
 Gets the height in pixels for row {\it row}.
 
 \membersection{wxGrid::GetRows}\label{wxgridgetrows}
 
-\func{int}{GetRows}{\void}
+\constfunc{int}{GetRows}{\void}
 
 Returns the number of rows in the grid.
 
 \membersection{wxGrid::GetScrollPosX}\label{wxgridgetscrollposx}
 
-\func{int}{GetScrollPosX}{\void}
+\constfunc{int}{GetScrollPosX}{\void}
 
 Returns the column scroll position.
 
 \membersection{wxGrid::GetScrollPosY}\label{wxgridgetscrollposy}
 
-\func{int}{GetScrollPosY}{\void}
+\constfunc{int}{GetScrollPosY}{\void}
 
 Returns the row scroll position.
 
 \membersection{wxGrid::GetTextItem}\label{wxgridgettextitem}
 
-\func{wxText *}{GetTextItem}{\void}
+\constfunc{wxText *}{GetTextItem}{\void}
 
 Returns a pointer to the text item used for entering text into a cell.
 
 \membersection{wxGrid::GetVertScrollBar}\label{wxgridgetvertscrollbar}
 
-\func{wxScrollBar *}{GetVertScrollBar}{\void}
+\constfunc{wxScrollBar *}{GetVertScrollBar}{\void}
 
 Returns a pointer to the vertical scrollbar.
 
@@ -417,9 +417,9 @@ Sets the text colour for the cell at the given position, or for the whole grid.
 
 \membersection{wxGrid::SetCellTextFont}\label{wxgridsetcelltextfont}
 
-\func{void}{SetCellTextFont}{\param{wxFont *}{font}, \param{int}{ row}, \param{int}{ col}}
+\func{void}{SetCellTextFont}{\param{const wxFont\&}{ font}, \param{int}{ row}, \param{int}{ col}}
 
-\func{void}{SetCellTextFont}{\param{wxFont *}{font}}
+\func{void}{SetCellTextFont}{\param{const wxFont\&}{ font}}
 
 Sets the text font for the cell at the given position, or for the whole grid.
 
@@ -437,7 +437,7 @@ Sets the width in pixels for column {\it col}.
 
 \membersection{wxGrid::SetDividerPen}\label{wxgridsetdividerpen}
 
-\func{void}{SetDividerPen}{\param{wxPen *}{pen}}
+\func{void}{SetDividerPen}{\param{const wxPen\&}{ pen}}
 
 Specifies the pen to be used for drawing the divisions between cells. The default
 is a light grey. If NULL is specified, the divisions will not be drawn.
@@ -488,7 +488,7 @@ Sets a row and column label text colour.
 
 \membersection{wxGrid::SetLabelTextFont}\label{wxgridsetlabeltextfont}
 
-\func{void}{SetLabelTextFont}{\param{wxFont *}{font}}
+\func{void}{SetLabelTextFont}{\param{const wxFont\&}{ font}}
 
 Sets the font to be used for the row and column labels.
 
diff --git a/docs/latex/wx/window.tex b/docs/latex/wx/window.tex
index 65a3197659..b5ef3bc1e0 100644
--- a/docs/latex/wx/window.tex
+++ b/docs/latex/wx/window.tex
@@ -379,9 +379,9 @@ Returns the average character width for this window.
 
 \membersection{wxWindow::GetChildren}
 
-\func{wxList*}{GetChildren}{\void}
+\func{wxList\&}{GetChildren}{\void}
 
-Returns a pointer to the list of the window's children.
+Returns a reference to the list of the window's children.
 
 \membersection{wxWindow::GetClientSize}\label{wxwindowgetclientsize}
 
@@ -427,9 +427,9 @@ own event handler.
 
 \membersection{wxWindow::GetFont}\label{wxwindowgetfont}
 
-\constfunc{wxFont*}{GetFont}{\void}
+\constfunc{wxFont\&}{GetFont}{\void}
 
-Returns a pointer to the font for this window.
+Returns a reference to the font for this window.
 
 \wxheading{See also}
 
diff --git a/docs/motif/todo.txt b/docs/motif/todo.txt
index f75d67775b..ee35bec834 100644
--- a/docs/motif/todo.txt
+++ b/docs/motif/todo.txt
@@ -35,7 +35,8 @@ High Priority
   painting a tiled bitmap, then a slight flicker might be seen unless
   X can be persuaded not to repaint the window background by default.
 
-- Finish wxNotebook.
+- wxNotebook bug: why doesn't the notebook sample appear until the
+  user resizes the window again? But it's OK for MDI. Strange.
 
 - wxSpinButton
 
diff --git a/docs/word/odbc.doc b/docs/word/odbc.doc
index 670795d3af60718c49c1985896b6864ddbc0d02b..7f60405dd2fa03ce26d8a5f726a55f97e51e5bb0 100644
GIT binary patch
delta 17820
zcmc(n3!F{W-~ZQI=VEAP$heG4OhVFN<Pt)PgeFOnq8cJbg<R5wj#1=RuFXnRQcZr5
z+;ZfWiIChvH<vLaCYMQ!GzRm0)@SW~<_zQcKmX_TJkReO-}hc??X}nCyT0qY*4}5f
zQFEe4ZHS(d5WiIl`za;Fc7#pza(;fkN!*OccaSZR?;*kKCwV@W(^N4TF+D;xl^3Sp
zt=<VV^x6W7IyS+nXK{WtuCC=5VyF_r&G)YcLLA2Vb;X4k8zDs7(#V7O036Nd%44Il
zLez{BqI)$VHh6@nT2qK4Qgjr*))NBdihVemPx!F~;;{)ryo&}bsc(;osJJ@PCpHu!
z2kC*vLZl%+2<c7r4--9QiaTBM)IwC23!Ez>L@VSlO)wviX=m8cTxmXU*0#q5XrB4F
zN4G0B)pqR-G}(0BeBA4<Jeqp$mf|KB)EODwg5sP8y76D@v7ynfZtZdU9B;MSZd;9(
z%*WJ`g!Z|0ovI^5SEQe-JN=}$V~cIb7Kx}^@@$Mubtq}wtsAzSs<u`Zu0e=<ZV{p#
z&ZnE}Oe4mR_AmF#H(!_a^;;8U1#gpj^=}K#pCBKtDsR#9GkNf?yz{5CPoFrJacoxx
zaN_$D>E8q2p9tE+=l1ZCJ<PO+$v6lRqaso~{j>F5^JR=~HD9hRQLIr!O6v~sLNr;v
zK;|f2YPIaAy&Gjh;Ii|%c;TNSKUXGSE8o=@yH~;vR2fJNq_j{{_L|`nVm@Sn5A!H>
zkvyp{tdw_nXa6mPZnRi_7-2i`j7Mj#l5vqq#f0buc?y!c1iAlNDIe3Fmdbba$yKsU
z+A^sk8^J^xLvDwpE;o4=$u_!EP%f-y3tMrW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)qri
z!q{}Xq0glZ9~#+n;DpgbQ)JS>$H@!8lT8|0&rNXDtul7@-eP+`Q?can8<8`GKi}y|
zue(vu{1b2o*{$8XCphBxeSkY~rejfw0Q3J0uvS`*#K`IF9X}N^Kktzln2DD$3-(;a
zmpKvxRx)OdTjq%OEcw|oN4X#~b-T$=U*?D?VaDz}V4qcgx#P$i<EkuO;V4;)Z&_N_
zWJJaBqn20+`q9Bd$^G5!W^t09EAdwB3P)AfrI6$GH-D}oQ|j6Ol6^m$N@e~~#8Gn-
z@nDxn#<AvcGVb_4uRNS-rrJywELu@ke;1kDO1iR~uS=37`v*eyc)%Ox2Rl46P=IAk
zJ+sue58fdDsXfmV4|KkblqWybJ~#OEz{=+k7qw@#n!V*HWyLgiM25^}ofmp|R$!&R
z<tS$zpQp+_#unF@GL@m6flMu6)oJdiSD@-4T9<X_Ek`};#5`3zq(;8ou%enfYN$=t
zq?HbSrD1)((zgjWn-H_}bW2w`ikmIeE>x67SsCwl_L_N!Va+eCa+EcbYgk{da#She
Pt9kFxeQlK^G~j;#DLu%_

diff --git a/include/wx/generic/gridg.h b/include/wx/generic/gridg.h
index 4fa80a339b..b7bd11f4be 100644
--- a/include/wx/generic/gridg.h
+++ b/include/wx/generic/gridg.h
@@ -72,8 +72,8 @@ class WXDLLEXPORT wxGenericGrid: public wxPanel
      short defaultWidth = wxGRID_DEFAULT_CELL_WIDTH, short defaultHeight = wxGRID_DEFAULT_CELL_HEIGHT);
   void PaintGrid(wxDC& dc);
   void ClearGrid(void);
-  virtual wxGridCell *GetCell(int row, int col);
-  inline wxGridCell ***GetCells(void) { return m_gridCells; }
+  virtual wxGridCell *GetCell(int row, int col) const;
+  inline wxGridCell ***GetCells(void) const { return m_gridCells; }
   bool InsertCols(int pos = 0, int n = 1, bool updateLabels = TRUE);
   bool InsertRows(int pos = 0, int n = 1, bool updateLabels = TRUE);
   bool AppendCols(int n = 1, bool updateLabels = TRUE);
@@ -83,66 +83,66 @@ class WXDLLEXPORT wxGenericGrid: public wxPanel
 
   // Cell accessors
   void SetCellValue(const wxString& val, int row, int col);
-  wxString& GetCellValue(int row, int col);
+  wxString& GetCellValue(int row, int col) const;
   void SetCellAlignment(int flag, int row, int col);
   void SetCellAlignment(int flag);
-  int GetCellAlignment(int row, int col);
-  int GetCellAlignment(void);
+  int GetCellAlignment(int row, int col) const;
+  int GetCellAlignment(void) const;
   void SetCellTextColour(const wxColour& val, int row, int col);
   void SetCellTextColour(const wxColour& col);
-  wxColour& GetCellTextColour(int row, int col);
-  inline wxColour& GetCellTextColour(void) { return m_cellTextColour; }
+  wxColour& GetCellTextColour(int row, int col) const;
+  inline wxColour& GetCellTextColour(void) const { return (wxColour&) m_cellTextColour; }
   void SetCellBackgroundColour(const wxColour& col);
   void SetCellBackgroundColour(const wxColour& colour, int row, int col);
-  inline wxColour& GetCellBackgroundColour(void) { return m_cellBackgroundColour; }
-  wxColour& GetCellBackgroundColour(int row, int col);
-  inline wxFont *GetCellTextFont(void) { return m_cellTextFont; }
-  wxFont *GetCellTextFont(int row, int col);
-  void SetCellTextFont(wxFont *fnt);
-  void SetCellTextFont(wxFont *fnt, int row, int col);
-  wxBitmap *GetCellBitmap(int row, int col);
+  inline wxColour& GetCellBackgroundColour(void) const { return (wxColour&) m_cellBackgroundColour; }
+  wxColour& GetCellBackgroundColour(int row, int col) const;
+  inline wxFont& GetCellTextFont(void) const { return (wxFont&) m_cellTextFont; }
+  wxFont& GetCellTextFont(int row, int col) const;
+  void SetCellTextFont(const wxFont& fnt);
+  void SetCellTextFont(const wxFont& fnt, int row, int col);
+  wxBitmap *GetCellBitmap(int row, int col) const;
   void SetCellBitmap(wxBitmap *bitmap, int row, int col);
 
   // Size accessors
   void SetColumnWidth(int col, int width);
-  int GetColumnWidth(int col);
+  int GetColumnWidth(int col) const;
   void SetRowHeight(int row, int height);
-  int GetRowHeight(int row);
+  int GetRowHeight(int row) const;
 
   // Label accessors
   void SetLabelSize(int orientation, int sz);
-  int GetLabelSize(int orientation);
+  int GetLabelSize(int orientation) const;
   void SetLabelAlignment(int orientation, int alignment);
-  int GetLabelAlignment(int orientation);
-  wxGridCell *GetLabelCell(int orientation, int pos);
+  int GetLabelAlignment(int orientation) const;
+  wxGridCell *GetLabelCell(int orientation, int pos) const;
   void SetLabelValue(int orientation, const wxString& val, int pos);
-  wxString& GetLabelValue(int orientation, int pos);
+  wxString& GetLabelValue(int orientation, int pos) const;
   void SetLabelTextColour(const wxColour& colour);
   void SetLabelBackgroundColour(const wxColour& colour);
-  inline wxColour& GetLabelTextColour(void) { return m_labelTextColour; }
-  inline wxColour& GetLabelBackgroundColour(void) { return m_labelBackgroundColour; }
-  inline wxFont *GetLabelTextFont(void) { return m_labelTextFont; }
-  inline void SetLabelTextFont(wxFont *fnt) { m_labelTextFont = fnt; }
+  inline wxColour& GetLabelTextColour(void) const { return (wxColour&) m_labelTextColour; }
+  inline wxColour& GetLabelBackgroundColour(void) { return (wxColour&) m_labelBackgroundColour; }
+  inline wxFont& GetLabelTextFont(void) { return (wxFont&) m_labelTextFont; }
+  inline void SetLabelTextFont(const wxFont& fnt) { m_labelTextFont = fnt; }
 
   // Miscellaneous accessors
-  inline int GetCursorRow(void) { return m_wCursorRow; }
-  inline int GetCursorColumn(void) { return m_wCursorColumn; }
+  inline int GetCursorRow(void) const { return m_wCursorRow; }
+  inline int GetCursorColumn(void) const { return m_wCursorColumn; }
   void SetGridCursor(int row, int col);
-  inline int GetRows(void) { return m_totalRows; }
-  inline int GetCols(void) { return m_totalCols; }
-  inline int GetScrollPosX(void) { return m_scrollPosX; }
-  inline int GetScrollPosY(void) { return m_scrollPosY; }
+  inline int GetRows(void) const { return m_totalRows; }
+  inline int GetCols(void) const { return m_totalCols; }
+  inline int GetScrollPosX(void) const { return m_scrollPosX; }
+  inline int GetScrollPosY(void) const { return m_scrollPosY; }
   inline void SetScrollPosX(int pos) { m_scrollPosX = pos; }
   inline void SetScrollPosY(int pos) { m_scrollPosY = pos; }
-  inline wxTextCtrl *GetTextItem(void) { return m_textItem; }
-  inline wxScrollBar *GetHorizScrollBar(void) { return m_hScrollBar; }
-  inline wxScrollBar *GetVertScrollBar(void) { return m_vScrollBar; }
-  inline bool GetEditable(void) { return m_editable; }
+  inline wxTextCtrl *GetTextItem(void) const { return m_textItem; }
+  inline wxScrollBar *GetHorizScrollBar(void) const { return m_hScrollBar; }
+  inline wxScrollBar *GetVertScrollBar(void) const { return m_vScrollBar; }
+  inline bool GetEditable(void) const { return m_editable; }
   void SetEditable(bool edit);
-  inline wxRect& GetCurrentRect(void) { return m_currentRect; }
-  inline bool CurrentCellVisible(void) { return m_currentRectVisible; }
-  inline void SetDividerPen(wxPen *pen) { m_divisionPen = pen; }
-  inline wxPen *GetDividerPen(void) { return m_divisionPen; }
+  inline wxRect& GetCurrentRect(void) const { return (wxRect&) m_currentRect; }
+  inline bool CurrentCellVisible(void) const { return m_currentRectVisible; }
+  inline void SetDividerPen(const wxPen& pen) { m_divisionPen = pen; }
+  inline wxPen& GetDividerPen(void) const { return (wxPen&) m_divisionPen; }
 
   // High-level event handling
   // Override e.g. to check value of current cell; but call
@@ -227,7 +227,7 @@ class WXDLLEXPORT wxGenericGrid: public wxPanel
   wxScrollBar*              m_vScrollBar;
   int                       m_wCursorRow;
   int                       m_wCursorColumn;
-  wxRect               m_currentRect;
+  wxRect                    m_currentRect;
   bool                      m_currentRectVisible;
   wxGridCell***             m_gridCells;
   wxGridCell**              m_rowLabelCells;
@@ -262,24 +262,24 @@ class WXDLLEXPORT wxGenericGrid: public wxPanel
   // Colours
   wxColour                  m_cellTextColour;
   wxColour                  m_cellBackgroundColour;
-  wxFont*                   m_cellTextFont;
+  wxFont                    m_cellTextFont;
   wxColour                  m_labelTextColour;
   wxColour                  m_labelBackgroundColour;
-  wxBrush*                  m_labelBackgroundBrush;
-  wxFont*                   m_labelTextFont;
-  wxPen*                    m_divisionPen;
+  wxBrush                   m_labelBackgroundBrush;
+  wxFont                    m_labelTextFont;
+  wxPen                     m_divisionPen;
   wxBitmap*                 m_doubleBufferingBitmap;
 
   // Position of Edit control
-  wxRect               m_editControlPosition;
+  wxRect                    m_editControlPosition;
 
   // Drag status
   int                       m_dragStatus;
   int                       m_dragRowOrCol;
   int                       m_dragStartPosition;
   int                       m_dragLastPosition;
-  wxCursor*                 m_horizontalSashCursor;
-  wxCursor*                 m_verticalSashCursor;
+  wxCursor                  m_horizontalSashCursor;
+  wxCursor                  m_verticalSashCursor;
 
   // To avoid multiple refreshes, use Begin/EndBatch
   int                       m_batchCount;
@@ -294,30 +294,30 @@ DECLARE_EVENT_TABLE()
 class WXDLLEXPORT wxGridCell: public wxObject
 {
  public:
-  wxString textValue;
-  wxFont *font;
-  wxColour textColour;
-  wxColour backgroundColour;
-  wxBrush *backgroundBrush;
-  wxBitmap *cellBitmap;
+  wxString  textValue;
+  wxFont    font;
+  wxColour  textColour;
+  wxColour  backgroundColour;
+  wxBrush   backgroundBrush;
+  wxBitmap* cellBitmap;
   int alignment;
 
   wxGridCell(wxGenericGrid *window = (wxGenericGrid *) NULL);
   ~wxGridCell(void);
 
-  virtual wxString& GetTextValue(void) { return textValue; }
+  virtual wxString& GetTextValue(void) const { return (wxString&) textValue; }
   virtual void SetTextValue(const wxString& str) { textValue = str; }
-  inline wxFont *GetFont(void) { return font; }
-  inline void SetFont(wxFont *f) { font = f; }
-  inline wxColour& GetTextColour(void) { return textColour; }
+  inline wxFont& GetFont(void) const { return (wxFont&) font; }
+  inline void SetFont(const wxFont& f) { font = f; }
+  inline wxColour& GetTextColour(void) const { return (wxColour&) textColour; }
   inline void SetTextColour(const wxColour& colour) { textColour = colour; }
-  inline wxColour& GetBackgroundColour(void) { return backgroundColour; }
+  inline wxColour& GetBackgroundColour(void) const { return (wxColour&) backgroundColour; }
   void SetBackgroundColour(const wxColour& colour);
-  inline wxBrush *GetBackgroundBrush(void) { return backgroundBrush; }
-  inline void SetBackgroundBrush(wxBrush *brush) { backgroundBrush = brush; }
-  inline int GetAlignment(void) { return alignment; }
+  inline wxBrush& GetBackgroundBrush(void) const { return (wxBrush&) backgroundBrush; }
+  inline void SetBackgroundBrush(const wxBrush& brush) { backgroundBrush = brush; }
+  inline int GetAlignment(void) const { return alignment; }
   inline void SetAlignment(int align) { alignment = align; }
-  inline wxBitmap *GetCellBitmap(void) { return cellBitmap; }
+  inline wxBitmap *GetCellBitmap(void) const { return cellBitmap; }
   inline void SetCellBitmap(wxBitmap *bitmap) { cellBitmap = bitmap; }
 };
 
@@ -332,9 +332,6 @@ class WXDLLEXPORT wxGrid: public wxGenericGrid
     }
 };
 
-
-
-
 class WXDLLEXPORT wxGridEvent : public wxCommandEvent {
     DECLARE_DYNAMIC_CLASS(wxGridEvent)
 public:
diff --git a/include/wx/motif/bitmap.h b/include/wx/motif/bitmap.h
index 7d3801bd88..39bd89c5a8 100644
--- a/include/wx/motif/bitmap.h
+++ b/include/wx/motif/bitmap.h
@@ -136,7 +136,6 @@ public:
   // Copy constructors
   inline wxBitmap(const wxBitmap& bitmap)
   { Ref(bitmap); if ( wxTheBitmapList ) wxTheBitmapList->AddBitmap(this); }
-  inline wxBitmap(const wxBitmap* bitmap) { if (bitmap) Ref(*bitmap); if ( wxTheBitmapList ) wxTheBitmapList->AddBitmap(this); }
 
   // Initialize with raw XBM data
   wxBitmap(const char bits[], int width, int height, int depth = 1);
diff --git a/include/wx/motif/brush.h b/include/wx/motif/brush.h
index 8f2764962b..15488cba9b 100644
--- a/include/wx/motif/brush.h
+++ b/include/wx/motif/brush.h
@@ -48,7 +48,6 @@ public:
   wxBrush(const wxColour& col, int style);
   wxBrush(const wxBitmap& stipple);
   inline wxBrush(const wxBrush& brush) { Ref(brush); }
-  inline wxBrush(const wxBrush* brush) { if (brush) Ref(*brush); }
   ~wxBrush();
 
   virtual void SetColour(const wxColour& col)  ;
diff --git a/include/wx/motif/colour.h b/include/wx/motif/colour.h
index d9f1711983..7059f61441 100644
--- a/include/wx/motif/colour.h
+++ b/include/wx/motif/colour.h
@@ -35,7 +35,6 @@ public:
 
     // copy ctors and assignment operators
   wxColour( const wxColour& col );
-  wxColour( const wxColour* col );
   wxColour& operator = ( const wxColour& col );
 
     // dtor
diff --git a/include/wx/motif/cursor.h b/include/wx/motif/cursor.h
index 0fde180335..2ca07ac040 100644
--- a/include/wx/motif/cursor.h
+++ b/include/wx/motif/cursor.h
@@ -55,7 +55,6 @@ public:
 
   // Copy constructors
   inline wxCursor(const wxCursor& cursor) { Ref(cursor); }
-  inline wxCursor(const wxCursor* cursor) { if (cursor) Ref(*cursor); }
 
   wxCursor(const char bits[], int width, int height, int hotSpotX = -1, int hotSpotY = -1,
     const char maskBits[] = NULL);
diff --git a/include/wx/motif/dc.h b/include/wx/motif/dc.h
index dda90fba80..b9afc11fca 100644
--- a/include/wx/motif/dc.h
+++ b/include/wx/motif/dc.h
@@ -176,16 +176,16 @@ class WXDLLEXPORT wxDC: public wxObject
     virtual void Clear(void) = 0;
             
     virtual void SetFont( const wxFont &font ) = 0;
-    virtual wxFont *GetFont(void) const { return (wxFont*) &m_font; };
+    virtual wxFont& GetFont(void) const { return (wxFont&) m_font; };
     
     virtual void SetPen( const wxPen &pen ) = 0;
-    virtual wxPen *GetPen(void) const { return (wxPen*) &m_pen; };
+    virtual wxPen& GetPen(void) const { return (wxPen&) m_pen; };
     
     virtual void SetBrush( const wxBrush &brush ) = 0;
-    virtual wxBrush *GetBrush(void) const { return (wxBrush*) &m_brush; };
+    virtual wxBrush& GetBrush(void) const { return (wxBrush&) m_brush; };
 
     virtual void SetBackground( const wxBrush &brush ) = 0;
-    virtual wxBrush *GetBackground(void) const { return (wxBrush*) &m_backgroundBrush; };
+    virtual wxBrush& GetBackground(void) const { return (wxBrush&) m_backgroundBrush; };
 
     virtual void SetLogicalFunction( int function ) = 0;
     virtual int GetLogicalFunction(void) const { return m_logicalFunction; };
diff --git a/include/wx/motif/font.h b/include/wx/motif/font.h
index 769b4d6352..1aa0d4ee0c 100644
--- a/include/wx/motif/font.h
+++ b/include/wx/motif/font.h
@@ -66,7 +66,6 @@ public:
   wxFont();
   wxFont(int pointSize, int family, int style, int weight, bool underlined = FALSE, const wxString& faceName = wxEmptyString);
   inline wxFont(const wxFont& font) { Ref(font); }
-  inline wxFont(const wxFont* font) { if (font) Ref(*font); }
 
   ~wxFont();
 
diff --git a/include/wx/motif/icon.h b/include/wx/motif/icon.h
index dcec9a6004..89f048ab15 100644
--- a/include/wx/motif/icon.h
+++ b/include/wx/motif/icon.h
@@ -43,7 +43,6 @@ public:
 
   // Copy constructors
   inline wxIcon(const wxIcon& icon) { Ref(icon); }
-  inline wxIcon(const wxIcon* icon) { if (icon) Ref(*icon); }
 
   // Initialize with XBM data
   wxIcon(const char bits[], int width, int height);
diff --git a/include/wx/motif/notebook.h b/include/wx/motif/notebook.h
index 37d6439d27..279084b9d8 100644
--- a/include/wx/motif/notebook.h
+++ b/include/wx/motif/notebook.h
@@ -177,6 +177,7 @@ public:
   // callbacks
   // ---------
   void OnSize(wxSizeEvent& event);
+  void OnIdle(wxIdleEvent& event);
   void OnSelChange(wxNotebookEvent& event);
   void OnSetFocus(wxFocusEvent& event);
   void OnNavigationKey(wxNavigationKeyEvent& event);
diff --git a/include/wx/motif/palette.h b/include/wx/motif/palette.h
index 589b7735e0..18302f09df 100644
--- a/include/wx/motif/palette.h
+++ b/include/wx/motif/palette.h
@@ -56,7 +56,6 @@ class WXDLLEXPORT wxPalette: public wxGDIObject
 public:
   wxPalette();
   inline wxPalette(const wxPalette& palette) { Ref(palette); }
-  inline wxPalette(const wxPalette* palette) { UnRef(); if (palette) Ref(*palette); }
 
   wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
   ~wxPalette();
diff --git a/include/wx/motif/pen.h b/include/wx/motif/pen.h
index 8a69853d11..4bc54d41b7 100644
--- a/include/wx/motif/pen.h
+++ b/include/wx/motif/pen.h
@@ -54,7 +54,6 @@ public:
   wxPen(const wxColour& col, int width, int style);
   wxPen(const wxBitmap& stipple, int width);
   inline wxPen(const wxPen& pen) { Ref(pen); }
-  inline wxPen(const wxPen* pen) { if (pen) Ref(*pen); }
   ~wxPen();
 
   inline wxPen& operator = (const wxPen& pen) { if (*this == pen) return (*this); Ref(pen); return *this; }
diff --git a/include/wx/motif/window.h b/include/wx/motif/window.h
index f11c73e389..f4a6a05f4c 100644
--- a/include/wx/motif/window.h
+++ b/include/wx/motif/window.h
@@ -310,13 +310,13 @@ public:
   inline wxWindow *GetParent() const;
   inline void SetParent(wxWindow *p) ;
   inline wxWindow *GetGrandParent() const;
-  inline wxList *GetChildren() const;
+  inline wxList& GetChildren() const;
   // Reparents this window to have the new parent.
   virtual bool Reparent(wxWindow* parent);
 
   // Set/get the window's font
   virtual void SetFont(const wxFont& f);
-  inline virtual wxFont *GetFont() const;
+  inline virtual wxFont& GetFont() const;
 
   // Set/get the window's validator
   void SetValidator(const wxValidator& validator);
@@ -655,8 +655,8 @@ inline void wxWindow::SetId(int id) { m_windowId = id; }
 inline wxWindow *wxWindow::GetParent() const { return m_windowParent; }
 inline void wxWindow::SetParent(wxWindow *p) { m_windowParent = p; }
 inline wxWindow *wxWindow::GetGrandParent() const { return (m_windowParent ? m_windowParent->m_windowParent : (wxWindow*) NULL); }
-inline wxList *wxWindow::GetChildren() const { return m_children; }
-inline wxFont *wxWindow::GetFont() const { return (wxFont *) & m_windowFont; }
+inline wxList& wxWindow::GetChildren() const { return (wxList&) * m_children; }
+inline wxFont& wxWindow::GetFont() const { return (wxFont&) m_windowFont; }
 inline wxString wxWindow::GetName() const { return m_windowName; }
 inline void wxWindow::SetName(const wxString& name) { m_windowName = name; }
 inline long wxWindow::GetWindowStyleFlag() const { return m_windowStyle; }
diff --git a/include/wx/msw/bitmap.h b/include/wx/msw/bitmap.h
index e40cc207e2..aa9fa411f6 100644
--- a/include/wx/msw/bitmap.h
+++ b/include/wx/msw/bitmap.h
@@ -125,7 +125,6 @@ public:
   // Copy constructors
   inline wxBitmap(const wxBitmap& bitmap)
   { Ref(bitmap); if ( wxTheBitmapList ) wxTheBitmapList->AddBitmap(this); }
-  inline wxBitmap(const wxBitmap* bitmap) { if (bitmap) Ref(*bitmap); if ( wxTheBitmapList ) wxTheBitmapList->AddBitmap(this); }
 
   // Initialize with raw data
   wxBitmap(const char bits[], int width, int height, int depth = 1);
diff --git a/include/wx/msw/brush.h b/include/wx/msw/brush.h
index 5ba87d90d1..5805a69252 100644
--- a/include/wx/msw/brush.h
+++ b/include/wx/msw/brush.h
@@ -49,7 +49,6 @@ public:
   wxBrush(const wxColour& col, int style);
   wxBrush(const wxBitmap& stipple);
   inline wxBrush(const wxBrush& brush) { Ref(brush); }
-  inline wxBrush(const wxBrush* brush) { if (brush) Ref(*brush); }
   ~wxBrush(void);
 
   virtual void SetColour(const wxColour& col)  ;
diff --git a/include/wx/msw/control.h b/include/wx/msw/control.h
index 3738d445e0..df1b339b8c 100644
--- a/include/wx/msw/control.h
+++ b/include/wx/msw/control.h
@@ -43,8 +43,8 @@ public:
 
    inline virtual void SetLabelFont(const wxFont& font);
    inline virtual void SetButtonFont(const wxFont& font);
-   inline wxFont  *GetLabelFont(void) const ;
-   inline wxFont  *GetButtonFont(void) const ;
+   inline wxFont& GetLabelFont(void) const ;
+   inline wxFont& GetButtonFont(void) const ;
 #endif
 
    // Places item in centre of panel - so can't be used BEFORE panel->Fit()
@@ -78,8 +78,8 @@ DECLARE_EVENT_TABLE()
 inline void wxControl::Callback(const wxFunction function) { m_callback = function; };           // Adds callback
 
 #if WXWIN_COMPATIBILITY
-inline wxFont  *wxControl::GetLabelFont(void) const         { return GetFont() ; }
-inline wxFont  *wxControl::GetButtonFont(void) const        { return GetFont() ; }
+inline wxFont& wxControl::GetLabelFont(void) const         { return GetFont() ; }
+inline wxFont& wxControl::GetButtonFont(void) const        { return GetFont() ; }
 inline void wxControl::SetLabelFont(const wxFont& font) { SetFont(font); }
 inline void wxControl::SetButtonFont(const wxFont& font) { SetFont(font); }
 #endif
diff --git a/include/wx/msw/cursor.h b/include/wx/msw/cursor.h
index f72d922d05..d15f6fcb1a 100644
--- a/include/wx/msw/cursor.h
+++ b/include/wx/msw/cursor.h
@@ -44,7 +44,6 @@ public:
 
   // Copy constructors
   inline wxCursor(const wxCursor& cursor) { Ref(cursor); }
-  inline wxCursor(const wxCursor* cursor) { /* UnRef(); */ if (cursor) Ref(*cursor); }
 
   wxCursor(const char bits[], int width, int height, int hotSpotX = -1, int hotSpotY = -1,
     const char maskBits[] = NULL);
diff --git a/include/wx/msw/dc.h b/include/wx/msw/dc.h
index ba01d4b18f..9186c620d9 100644
--- a/include/wx/msw/dc.h
+++ b/include/wx/msw/dc.h
@@ -235,11 +235,11 @@ public:
   inline virtual bool Ok(void) const {return m_ok;};
   inline virtual int  GetMapMode(void) const {return m_mappingMode;};
 
-  inline virtual wxBrush *GetBackground(void) const { return (wxBrush*) &m_backgroundBrush ;}
-  inline virtual wxBrush *GetBrush(void) const { return (wxBrush*) &m_brush ;}
-  inline virtual wxFont  *GetFont(void) const { return (wxFont*) &m_font ;}
+  inline virtual wxBrush& GetBackground(void) const { return (wxBrush&) m_backgroundBrush ;}
+  inline virtual wxBrush& GetBrush(void) const { return (wxBrush&) m_brush ;}
+  inline virtual wxFont& GetFont(void) const { return (wxFont&) m_font ;}
   inline virtual int      GetLogicalFunction(void) const { return m_logicalFunction ;}
-  inline virtual wxPen   *GetPen(void) const { return (wxPen*) &m_pen ;}
+  inline virtual wxPen&   GetPen(void) const { return (wxPen&) m_pen ;}
   inline virtual wxColour&GetTextBackground(void) const { return (wxColour&) m_textBackgroundColour ;}
   inline virtual wxColour&GetTextForeground(void) const { return (wxColour&) m_textForegroundColour ;}
 
diff --git a/include/wx/msw/font.h b/include/wx/msw/font.h
index 83079df94d..32b37a954b 100644
--- a/include/wx/msw/font.h
+++ b/include/wx/msw/font.h
@@ -54,7 +54,6 @@ public:
   wxFont(void);
   wxFont(int PointSize, int Family, int Style, int Weight, bool underlined = FALSE, const wxString& Face = wxEmptyString);
   inline wxFont(const wxFont& font) { Ref(font); }
-  inline wxFont(const wxFont* font) { if (font) Ref(*font); }
 
   ~wxFont(void);
 
diff --git a/include/wx/msw/icon.h b/include/wx/msw/icon.h
index 27d7311298..78fd6c42be 100644
--- a/include/wx/msw/icon.h
+++ b/include/wx/msw/icon.h
@@ -43,7 +43,6 @@ public:
 
   // Copy constructors
   inline wxIcon(const wxIcon& icon) { Ref(icon); }
-  inline wxIcon(const wxIcon* icon) { /* UnRef(); */ if (icon) Ref(*icon); }
 
   wxIcon(const char bits[], int width, int height);
   wxIcon(const wxString& name, long flags = wxBITMAP_TYPE_ICO_RESOURCE,
diff --git a/include/wx/msw/palette.h b/include/wx/msw/palette.h
index 510882fa18..4383c44a3f 100644
--- a/include/wx/msw/palette.h
+++ b/include/wx/msw/palette.h
@@ -39,7 +39,6 @@ class WXDLLEXPORT wxPalette: public wxGDIObject
 public:
   wxPalette(void);
   inline wxPalette(const wxPalette& palette) { Ref(palette); }
-  inline wxPalette(const wxPalette* palette) { /* UnRef(); */ if (palette) Ref(*palette); }
 
   wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
   ~wxPalette(void);
diff --git a/include/wx/msw/pen.h b/include/wx/msw/pen.h
index 4933932078..79b162ecd1 100644
--- a/include/wx/msw/pen.h
+++ b/include/wx/msw/pen.h
@@ -53,7 +53,6 @@ public:
   wxPen(const wxColour& col, int width, int style);
   wxPen(const wxBitmap& stipple, int width);
   inline wxPen(const wxPen& pen) { Ref(pen); }
-  inline wxPen(const wxPen* pen) { if (pen) Ref(*pen); }
   ~wxPen();
 
   inline wxPen& operator = (const wxPen& pen) { if (*this == pen) return (*this); Ref(pen); return *this; }
diff --git a/include/wx/msw/window.h b/include/wx/msw/window.h
index b02d8e4298..c0b172bb2f 100644
--- a/include/wx/msw/window.h
+++ b/include/wx/msw/window.h
@@ -151,7 +151,7 @@ public:
 
   // Set the cursor
   virtual void SetCursor(const wxCursor& cursor);
-  inline virtual wxCursor *GetCursor() const { return (wxCursor *)& m_windowCursor; };
+  inline virtual wxCursor& GetCursor() const { return (wxCursor& ) m_windowCursor; };
 
   // Get the window with the focus
   static wxWindow *FindFocus();
@@ -288,7 +288,7 @@ public:
   inline wxWindow *GetParent() const;
   inline void SetParent(wxWindow *p) ;
   inline wxWindow *GetGrandParent() const;
-  inline wxList *GetChildren() const;
+  inline wxList& GetChildren() const;
   // Set this window to be the child of 'parent'.
   // Returns FALSE it's not possible (some systems
   // won't allow it)
@@ -296,7 +296,7 @@ public:
 
   // Set/get the window's font
   virtual void SetFont(const wxFont& f);
-  inline virtual wxFont *GetFont() const;
+  inline virtual wxFont& GetFont() const;
 
   // Set/get the window's validator
   void SetValidator(const wxValidator& validator);
@@ -351,8 +351,8 @@ public:
   // For backward compatibility
   inline virtual void SetButtonFont(const wxFont& font) { SetFont(font); }
   inline virtual void SetLabelFont(const wxFont& font) { SetFont(font); }
-  inline virtual wxFont  *GetLabelFont() const { return GetFont(); };
-  inline virtual wxFont  *GetButtonFont() const { return GetFont(); };
+  inline virtual wxFont& GetLabelFont() const { return GetFont(); };
+  inline virtual wxFont& GetButtonFont() const { return GetFont(); };
 
   // Get the default button, if there is one
   inline virtual wxButton *GetDefaultItem() const;
@@ -715,8 +715,8 @@ inline void wxWindow::SetId(int id) { m_windowId = id; }
 inline wxWindow *wxWindow::GetParent() const { return m_windowParent; }
 inline void wxWindow::SetParent(wxWindow *p) { m_windowParent = p; }
 inline wxWindow *wxWindow::GetGrandParent() const { return (m_windowParent ? m_windowParent->m_windowParent : NULL); }
-inline wxList *wxWindow::GetChildren() const { return m_children; }
-inline wxFont *wxWindow::GetFont() const { return (wxFont *) & m_windowFont; }
+inline wxList& wxWindow::GetChildren() const { return (wxList&) *m_children; }
+inline wxFont& wxWindow::GetFont() const { return (wxFont&) m_windowFont; }
 inline wxString wxWindow::GetName() const { return m_windowName; }
 inline void wxWindow::SetName(const wxString& name) { m_windowName = name; }
 inline long wxWindow::GetWindowStyleFlag() const { return m_windowStyle; }
diff --git a/include/wx/stubs/bitmap.h b/include/wx/stubs/bitmap.h
index 0b1efd764e..1d2f5417e5 100644
--- a/include/wx/stubs/bitmap.h
+++ b/include/wx/stubs/bitmap.h
@@ -124,7 +124,6 @@ public:
   // Copy constructors
   inline wxBitmap(const wxBitmap& bitmap)
   { Ref(bitmap); if ( wxTheBitmapList ) wxTheBitmapList->AddBitmap(this); }
-  inline wxBitmap(const wxBitmap* bitmap) { if (bitmap) Ref(*bitmap); if ( wxTheBitmapList ) wxTheBitmapList->AddBitmap(this); }
 
   // Initialize with raw data.
   wxBitmap(const char bits[], int width, int height, int depth = 1);
diff --git a/include/wx/stubs/brush.h b/include/wx/stubs/brush.h
index 6bff2018f7..a0a1bd7471 100644
--- a/include/wx/stubs/brush.h
+++ b/include/wx/stubs/brush.h
@@ -52,7 +52,6 @@ public:
   wxBrush(const wxColour& col, int style);
   wxBrush(const wxBitmap& stipple);
   inline wxBrush(const wxBrush& brush) { Ref(brush); }
-  inline wxBrush(const wxBrush* brush) { if (brush) Ref(*brush); }
   ~wxBrush();
 
   virtual void SetColour(const wxColour& col)  ;
diff --git a/include/wx/stubs/colour.h b/include/wx/stubs/colour.h
index 47d0e2ac21..16ffdac9aa 100644
--- a/include/wx/stubs/colour.h
+++ b/include/wx/stubs/colour.h
@@ -72,6 +72,8 @@ public:
   }
   bool operator != (const wxColour& colour) { return !(*this == colour); }
 
+  void InitFromName(const wxString& col);
+
 /* TODO
   WXCOLORREF GetPixel() const { return m_pixel; };
 */
diff --git a/include/wx/stubs/cursor.h b/include/wx/stubs/cursor.h
index 027745838a..bc6397069f 100644
--- a/include/wx/stubs/cursor.h
+++ b/include/wx/stubs/cursor.h
@@ -45,7 +45,6 @@ public:
 
   // Copy constructors
   inline wxCursor(const wxCursor& cursor) { Ref(cursor); }
-  inline wxCursor(const wxCursor* cursor) { if (cursor) Ref(*cursor); }
 
   wxCursor(const char bits[], int width, int height, int hotSpotX = -1, int hotSpotY = -1,
     const char maskBits[] = NULL);
diff --git a/include/wx/stubs/dc.h b/include/wx/stubs/dc.h
index e9969358cf..ce3e9998d1 100644
--- a/include/wx/stubs/dc.h
+++ b/include/wx/stubs/dc.h
@@ -177,16 +177,16 @@ class WXDLLEXPORT wxDC: public wxObject
     virtual void Clear(void) = 0;
             
     virtual void SetFont( const wxFont &font ) = 0;
-    virtual wxFont *GetFont(void) const { return (wxFont*) &m_font; };
+    virtual wxFont& GetFont(void) const { return (wxFont&) m_font; };
     
     virtual void SetPen( const wxPen &pen ) = 0;
-    virtual wxPen *GetPen(void) const { return (wxPen*) &m_pen; };
+    virtual wxPen& GetPen(void) const { return (wxPen&) m_pen; };
     
     virtual void SetBrush( const wxBrush &brush ) = 0;
-    virtual wxBrush *GetBrush(void) const { return (wxBrush*) &m_brush; };
+    virtual wxBrush& GetBrush(void) const { return (wxBrush&) m_brush; };
 
     virtual void SetBackground( const wxBrush &brush ) = 0;
-    virtual wxBrush *GetBackground(void) const { return (wxBrush*) &m_backgroundBrush; };
+    virtual wxBrush& GetBackground(void) const { return (wxBrush&) m_backgroundBrush; };
 
     virtual void SetLogicalFunction( int function ) = 0;
     virtual int GetLogicalFunction(void) const { return m_logicalFunction; };
diff --git a/include/wx/stubs/font.h b/include/wx/stubs/font.h
index 601657c657..aff8fb3a75 100644
--- a/include/wx/stubs/font.h
+++ b/include/wx/stubs/font.h
@@ -51,7 +51,6 @@ public:
   wxFont();
   wxFont(int pointSize, int family, int style, int weight, bool underlined = FALSE, const wxString& faceName = wxEmptyString);
   inline wxFont(const wxFont& font) { Ref(font); }
-  inline wxFont(const wxFont* font) { if (font) Ref(*font); }
 
   ~wxFont();
 
diff --git a/include/wx/stubs/icon.h b/include/wx/stubs/icon.h
index f68c23154b..df475672ba 100644
--- a/include/wx/stubs/icon.h
+++ b/include/wx/stubs/icon.h
@@ -45,7 +45,6 @@ public:
 
   // Copy constructors
   inline wxIcon(const wxIcon& icon) { Ref(icon); }
-  inline wxIcon(const wxIcon* icon) { if (icon) Ref(*icon); }
 
   wxIcon(const char bits[], int width, int height);
   wxIcon(const wxString& name, long flags = wxBITMAP_TYPE_ICO_RESOURCE,
diff --git a/include/wx/stubs/palette.h b/include/wx/stubs/palette.h
index 1d198fc6e3..3482b33934 100644
--- a/include/wx/stubs/palette.h
+++ b/include/wx/stubs/palette.h
@@ -41,7 +41,6 @@ class WXDLLEXPORT wxPalette: public wxGDIObject
 public:
   wxPalette();
   inline wxPalette(const wxPalette& palette) { Ref(palette); }
-  inline wxPalette(const wxPalette* palette) { UnRef(); if (palette) Ref(*palette); }
 
   wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
   ~wxPalette();
diff --git a/include/wx/stubs/pen.h b/include/wx/stubs/pen.h
index 5097841e34..938908b56b 100644
--- a/include/wx/stubs/pen.h
+++ b/include/wx/stubs/pen.h
@@ -57,7 +57,6 @@ public:
   wxPen(const wxColour& col, int width, int style);
   wxPen(const wxBitmap& stipple, int width);
   inline wxPen(const wxPen& pen) { Ref(pen); }
-  inline wxPen(const wxPen* pen) { if (pen) Ref(*pen); }
   ~wxPen();
 
   inline wxPen& operator = (const wxPen& pen) { if (*this == pen) return (*this); Ref(pen); return *this; }
diff --git a/include/wx/stubs/region.h b/include/wx/stubs/region.h
index 0c88b794e7..04d143c2e9 100644
--- a/include/wx/stubs/region.h
+++ b/include/wx/stubs/region.h
@@ -18,6 +18,7 @@
 
 #include "wx/list.h"
 #include "wx/gdiobj.h"
+#include "wx/gdicmn.h"
 
 class WXDLLEXPORT wxRect;
 class WXDLLEXPORT wxPoint;
diff --git a/include/wx/stubs/timer.h b/include/wx/stubs/timer.h
index 2e0e85010f..953da997c6 100644
--- a/include/wx/stubs/timer.h
+++ b/include/wx/stubs/timer.h
@@ -31,15 +31,15 @@ public:
     virtual void Notify() = 0;                 // Override this member
 
     // Returns the current interval time (0 if stop)
-    int Interval() const { return milli; }; 
-    bool OneShot() const { return oneShot; }
+    int Interval() const { return m_milli; }; 
+    bool OneShot() const { return m_oneShot; }
 
 protected:
-    bool oneShot ;
-    int  milli ;
-    int  lastMilli ;
+    bool m_oneShot ;
+    int  m_milli ;
+    int  m_lastMilli ;
 
-    long id;
+    long m_id;
 
 private:
     DECLARE_ABSTRACT_CLASS(wxTimer)
diff --git a/include/wx/stubs/window.h b/include/wx/stubs/window.h
index b34c6be619..75809c01b1 100644
--- a/include/wx/stubs/window.h
+++ b/include/wx/stubs/window.h
@@ -81,6 +81,33 @@ WXDLLEXPORT_DATA(extern const char*) wxPanelNameStr;
 WXDLLEXPORT_DATA(extern const wxSize) wxDefaultSize;
 WXDLLEXPORT_DATA(extern const wxPoint) wxDefaultPosition;
 
+//-----------------------------------------------------------------------------
+// wxClientData
+//-----------------------------------------------------------------------------
+
+class wxClientData
+{
+public:
+    wxClientData() { }
+    virtual ~wxClientData() { }
+};
+
+//-----------------------------------------------------------------------------
+// wxStringClientData
+//-----------------------------------------------------------------------------
+
+class wxStringClientData: public wxClientData
+{
+public:
+    wxStringClientData() { }
+    wxStringClientData( wxString &data ) { m_data = data; }
+    void SetData( wxString &data ) { m_data = data; }
+    wxString GetData() const { return m_data; }
+    
+private:
+    wxString  m_data;
+};
+
 class WXDLLEXPORT wxWindow: public wxEvtHandler
 {
   DECLARE_ABSTRACT_CLASS(wxWindow)
@@ -269,11 +296,11 @@ public:
   inline wxWindow *GetParent() const;
   inline void SetParent(wxWindow *p) ;
   inline wxWindow *GetGrandParent() const;
-  inline wxList *GetChildren() const;
+  inline wxList& GetChildren() const;
 
   // Set/get the window's font
   virtual void SetFont(const wxFont& f);
-  inline virtual wxFont *GetFont() const;
+  inline virtual wxFont& GetFont() const;
 
   // Set/get the window's validator
   void SetValidator(const wxValidator& validator);
@@ -505,8 +532,8 @@ inline void wxWindow::SetId(int id) { m_windowId = id; }
 inline wxWindow *wxWindow::GetParent() const { return m_windowParent; }
 inline void wxWindow::SetParent(wxWindow *p) { m_windowParent = p; }
 inline wxWindow *wxWindow::GetGrandParent() const { return (m_windowParent ? m_windowParent->m_windowParent : (wxWindow*) NULL); }
-inline wxList *wxWindow::GetChildren() const { return m_children; }
-inline wxFont *wxWindow::GetFont() const { return (wxFont *) & m_windowFont; }
+inline wxList& wxWindow::GetChildren() const { return (wxList&) * m_children; }
+inline wxFont& wxWindow::GetFont() const { return (wxFont&) m_windowFont; }
 inline wxString wxWindow::GetName() const { return m_windowName; }
 inline void wxWindow::SetName(const wxString& name) { m_windowName = name; }
 inline long wxWindow::GetWindowStyleFlag() const { return m_windowStyle; }
diff --git a/samples/grid/test.cpp b/samples/grid/test.cpp
index 874ebeeb35..ceb64fce1e 100644
--- a/samples/grid/test.cpp
+++ b/samples/grid/test.cpp
@@ -137,7 +137,7 @@ bool MyApp::OnInit(void)
   frame->grid->SetCellValue("First cell", 0, 0);
   frame->grid->SetCellValue("Another cell", 1, 1);
   frame->grid->SetCellValue("Yet another cell", 2, 2);
-  frame->grid->SetCellTextFont(wxTheFontList->FindOrCreateFont(10, wxROMAN, wxITALIC, wxNORMAL), 0, 0);
+  frame->grid->SetCellTextFont(* wxTheFontList->FindOrCreateFont(10, wxROMAN, wxITALIC, wxNORMAL), 0, 0);
   frame->grid->SetCellTextColour(*wxRED, 1, 1);
   frame->grid->SetCellBackgroundColour(*wxCYAN, 2, 2);
   if (cellBitmap1 && cellBitmap2)
@@ -207,10 +207,10 @@ void MyFrame::ToggleColLabel(wxCommandEvent& WXUNUSED(event))
 
 void MyFrame::ToggleDividers(wxCommandEvent& WXUNUSED(event))
 {
-      if (!grid->GetDividerPen())
-        grid->SetDividerPen(wxThePenList->FindOrCreatePen("LIGHT GREY", 1, wxSOLID));
+      if (!grid->GetDividerPen().Ok())
+        grid->SetDividerPen(* wxThePenList->FindOrCreatePen("LIGHT GREY", 1, wxSOLID));
       else
-        grid->SetDividerPen((wxPen *) NULL);
+        grid->SetDividerPen(wxNullPen);
       grid->Refresh();
 }
 
diff --git a/samples/layout/layout.cpp b/samples/layout/layout.cpp
index a4dd5b9f1a..8096c82b8f 100644
--- a/samples/layout/layout.cpp
+++ b/samples/layout/layout.cpp
@@ -205,12 +205,12 @@ void MyFrame::OnSize(wxSizeEvent& WXUNUSED(event) )
 
 void MyFrame::Draw(wxDC& dc, bool WXUNUSED(draw_bitmaps) )
 {
-  dc.SetPen(wxGREEN_PEN);
+  dc.SetPen(* wxGREEN_PEN);
   dc.DrawLine(0, 0, 200, 200);
   dc.DrawLine(200, 0, 0, 200);
 
-  dc.SetBrush(wxCYAN_BRUSH);
-  dc.SetPen(wxRED_PEN);
+  dc.SetBrush(* wxCYAN_BRUSH);
+  dc.SetPen(* wxRED_PEN);
 
   dc.DrawRectangle(100, 100, 100, 50);
   dc.DrawRoundedRectangle(150, 150, 100, 50, 20);
@@ -219,7 +219,7 @@ void MyFrame::Draw(wxDC& dc, bool WXUNUSED(draw_bitmaps) )
   dc.DrawSpline(50, 200, 50, 100, 200, 10);
   dc.DrawLine(50, 230, 200, 230);
 
-  dc.SetPen(wxBLACK_PEN);
+  dc.SetPen(* wxBLACK_PEN);
   dc.DrawArc(50, 300, 100, 250, 100, 300 );
 }
 
diff --git a/samples/printing/printing.cpp b/samples/printing/printing.cpp
index 598d0876fe..ae9b4126bb 100644
--- a/samples/printing/printing.cpp
+++ b/samples/printing/printing.cpp
@@ -512,7 +512,7 @@ void MyPrintout::DrawPageTwo(wxDC *dc)
   float bottomMarginLogical = (float)(logUnitsFactor*(pageHeightMM - bottomMargin));
   float rightMarginLogical = (float)(logUnitsFactor*(pageWidthMM - rightMargin));
 
-  dc->SetPen(wxRED_PEN);
+  dc->SetPen(* wxRED_PEN);
   dc->DrawLine( (long)leftMarginLogical, (long)topMarginLogical, 
                 (long)rightMarginLogical, (long)topMarginLogical);
   dc->DrawLine( (long)leftMarginLogical, (long)bottomMarginLogical, 
diff --git a/src/common/layout.cpp b/src/common/layout.cpp
index 7c8b0ab7cb..38750acead 100644
--- a/src/common/layout.cpp
+++ b/src/common/layout.cpp
@@ -731,7 +731,7 @@ int wxIndividualLayoutConstraint::GetEdge(wxEdge which,
   // know the dimension is obtainable immediately.
   // E.g. a wxExpandSizer may contain a button (but the button's
   // true parent is a panel, not the sizer)
-  if (other->GetChildren()->Member(thisWin))
+  if (other->GetChildren().Member(thisWin))
   {
     switch (which)
     {
@@ -1054,7 +1054,7 @@ bool wxOldDoLayout(wxWindow *win)
 
   doneSoFar.Append(win);
 
-  wxNode *node = win->GetChildren()->First();
+  wxNode *node = win->GetChildren().First();
   while (node)
   {
     wxWindow *child = (wxWindow *)node->Data();
@@ -1079,7 +1079,7 @@ bool wxOldDoLayout(wxWindow *win)
   while ((noChanges > 0) && (noIterations < maxIterations))
   {
     noChanges = 0;
-    wxNode *node = win->GetChildren()->First();
+    wxNode *node = win->GetChildren().First();
     while (node)
     {
       wxWindow *child = (wxWindow *)node->Data();
@@ -1104,7 +1104,7 @@ bool wxOldDoLayout(wxWindow *win)
 */
   // Now set the sizes and positions of the children, and
   // recursively call Layout().
-  node = win->GetChildren()->First();
+  node = win->GetChildren().First();
   while (node)
   {
     wxWindow *child = (wxWindow *)node->Data();
@@ -1203,7 +1203,7 @@ wxSizer::~wxSizer()
 {
   // Remove all children without deleting them,
   // or ~wxbWindow will delete proper windows _twice_
-  wxNode *node = GetChildren()->First();
+  wxNode *node = GetChildren().First();
   while (node)
   {
     wxNode *next = node->Next();
@@ -1249,7 +1249,7 @@ void wxSizer::SetBorder(int x, int y)
 void wxSizer::AddSizerChild(wxWindow *child)
 {
   child->SetSizerParent(this);
-  GetChildren()->Append(child);
+  GetChildren().Append(child);
 
   // Add some constraints for the purpose of storing
   // the relative position of the window/sizer
@@ -1272,7 +1272,7 @@ void wxSizer::AddSizerChild(wxWindow *child)
 
 void wxSizer::RemoveSizerChild(wxWindow *child)
 {
-  GetChildren()->DeleteObject(child);
+  GetChildren().DeleteObject(child);
 }
 
 void wxSizer::SetSize(int x, int y, int w, int h, int WXUNUSED(flags))
@@ -1382,7 +1382,7 @@ bool wxSizer::LayoutPhase1(int *noChanges)
       // Find the bounding box and set own size
       int maxX = 0;
       int maxY = 0;
-      wxNode *node = GetChildren()->First();
+      wxNode *node = GetChildren().First();
       while (node)
       {
         int x, y, width, height;
@@ -1580,7 +1580,7 @@ bool wxRowColSizer::LayoutPhase1(int *noChanges)
     int maxX = currentX;
     int maxY = currentY;
     
-    wxNode *node = GetChildren()->First();
+    wxNode *node = GetChildren().First();
     while (node)
     {
       wxWindow *win = (wxWindow *)node->Data();
diff --git a/src/common/resource.cpp b/src/common/resource.cpp
index fcce235d26..21c1c97190 100644
--- a/src/common/resource.cpp
+++ b/src/common/resource.cpp
@@ -2301,7 +2301,7 @@ wxIcon wxResourceCreateIcon(const wxString& resource, wxResourceTable *table)
   else
   {
     wxLogWarning(_("Icon resource specification %s not found."), (const char*) resource);
-    return (wxIcon *) NULL;
+    return wxNullIcon;
   }
 }
 
@@ -2827,7 +2827,7 @@ bool wxWindow::LoadFromResource(wxWindow *parent, const wxString& resourceName,
   }
 
   // Should have some kind of font at this point
-  if (!GetFont()->Ok())
+  if (!GetFont().Ok())
       SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT));
   if (!GetBackgroundColour().Ok())
       SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE));
diff --git a/src/common/tbarsmpl.cpp b/src/common/tbarsmpl.cpp
index 8976f942f2..0e1a739d29 100644
--- a/src/common/tbarsmpl.cpp
+++ b/src/common/tbarsmpl.cpp
@@ -224,7 +224,7 @@ void wxToolBarSimple::DrawTool(wxDC& dc, wxMemoryDC& memDC, wxToolBarTool *tool)
     {
       dc.SetClippingRegion(ax, ay, (bx-ax+1), (by-ay+1));
       dc.Blit((ax+1), (ay+1), (bx-ax-2), (by-ay-2), &memDC, 0, 0);
-      wxPen * old_pen = dc.GetPen();
+      wxPen * old_pen = & dc.GetPen();
       dc.SetPen( white_pen );
       dc.DrawLine(ax,(by-1),ax,ay);
       dc.DrawLine(ax,ay,(bx-1),ay);
@@ -276,7 +276,7 @@ void wxToolBarSimple::DrawTool(wxDC& dc, wxMemoryDC& memDC, wxToolBarTool *tool)
         memDC.SelectObject(tool->m_bitmap1);
         dc.SetClippingRegion(ax, ay, (bx-ax+1), (by-ay+1));
         dc.Blit((ax+2), (ay+2), (bx-ax-2), (by-ay-2), &memDC, 0, 0);
-        wxPen * old_pen = dc.GetPen();
+        wxPen * old_pen = & dc.GetPen();
         dc.SetPen( black_pen );
         dc.DrawLine(ax,(by-1),ax,ay);
         dc.DrawLine(ax,ay,(bx-1),ay);
diff --git a/src/common/utilscmn.cpp b/src/common/utilscmn.cpp
index d845ed71da..d590221e91 100644
--- a/src/common/utilscmn.cpp
+++ b/src/common/utilscmn.cpp
@@ -445,7 +445,7 @@ wxFindWindowByLabel1 (const wxString& title, wxWindow * parent)
 
   if (parent)
     {
-      for (wxNode * node = parent->GetChildren()->First (); node; node = node->Next ())
+      for (wxNode * node = parent->GetChildren().First (); node; node = node->Next ())
 	{
 	  wxWindow *win = (wxWindow *) node->Data ();
 	  wxWindow *retwin = wxFindWindowByLabel1 (title, win);
@@ -501,7 +501,7 @@ wxFindWindowByName1 (const wxString& title, wxWindow * parent)
 
   if (parent)
     {
-      for (wxNode * node = parent->GetChildren()->First (); node; node = node->Next ())
+      for (wxNode * node = parent->GetChildren().First (); node; node = node->Next ())
 	{
 	  wxWindow *win = (wxWindow *) node->Data ();
 	  wxWindow *retwin = wxFindWindowByName1 (title, win);
diff --git a/src/generic/gridg.cpp b/src/generic/gridg.cpp
index 8fae3103b2..6184648dc6 100644
--- a/src/generic/gridg.cpp
+++ b/src/generic/gridg.cpp
@@ -80,9 +80,9 @@ wxGenericGrid::wxGenericGrid(void)
   m_labelTextColour = *wxBLACK;
 //  m_labelBackgroundColour = *wxLIGHT_GREY;
   m_labelBackgroundColour = wxSystemSettings::GetSystemColour( wxSYS_COLOUR_BTNFACE );
-  m_labelBackgroundBrush = (wxBrush *) NULL;
-  m_labelTextFont = (wxFont *) NULL;
-  m_cellTextFont = (wxFont *) NULL;
+  m_labelBackgroundBrush = wxNullBrush;
+  m_labelTextFont = wxNullFont;
+  m_cellTextFont = wxNullFont;
   m_textItem = (wxTextCtrl *) NULL;
   m_currentRectVisible = FALSE;
   m_editable = TRUE;
@@ -95,7 +95,7 @@ wxGenericGrid::wxGenericGrid(void)
   m_dragRowOrCol = 0;
   m_dragStartPosition = 0;
   m_dragLastPosition = 0;
-  m_divisionPen = (wxPen *) NULL;
+  m_divisionPen = wxNullPen;
   m_leftOfSheet = wxGRID_DEFAULT_SHEET_LEFT;
   m_topOfSheet = wxGRID_DEFAULT_SHEET_TOP;
   m_cellHeight = wxGRID_DEFAULT_CELL_HEIGHT;
@@ -122,8 +122,6 @@ wxGenericGrid::wxGenericGrid(void)
   m_rowLabelCells = (wxGridCell **) NULL;
   m_colLabelCells = (wxGridCell **) NULL;
   m_textItem = (wxTextCtrl *) NULL;
-  m_horizontalSashCursor = (wxCursor *) NULL;
-  m_verticalSashCursor = (wxCursor *) NULL;
 }
 
 bool wxGenericGrid::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
@@ -133,16 +131,14 @@ bool wxGenericGrid::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos,
   m_editingPanel = (wxPanel *) NULL;
   m_hScrollBar = (wxScrollBar *) NULL;
   m_vScrollBar = (wxScrollBar *) NULL;
-  m_horizontalSashCursor = (wxCursor *) NULL;
-  m_verticalSashCursor = (wxCursor *) NULL;
   m_cellTextColour = *wxBLACK;
   m_cellBackgroundColour = *wxWHITE;
   m_labelTextColour = *wxBLACK;
 //  m_labelBackgroundColour = *wxLIGHT_GREY;
   m_labelBackgroundColour = wxSystemSettings::GetSystemColour( wxSYS_COLOUR_BTNFACE );
-  m_labelBackgroundBrush = (wxBrush *) NULL;
-  m_labelTextFont = wxTheFontList->FindOrCreateFont(10, wxSWISS, wxNORMAL, wxBOLD);
-  m_cellTextFont = wxTheFontList->FindOrCreateFont(10, wxSWISS, wxNORMAL, wxNORMAL);
+  m_labelBackgroundBrush = wxNullBrush;
+  m_labelTextFont = * wxTheFontList->FindOrCreateFont(10, wxSWISS, wxNORMAL, wxBOLD);
+  m_cellTextFont = * wxTheFontList->FindOrCreateFont(10, wxSWISS, wxNORMAL, wxNORMAL);
   m_textItem = (wxTextCtrl *) NULL;
   m_currentRectVisible = FALSE;
   m_editable = TRUE;
@@ -155,13 +151,13 @@ bool wxGenericGrid::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos,
   m_dragRowOrCol = 0;
   m_dragStartPosition = 0;
   m_dragLastPosition = 0;
-  m_divisionPen = wxThePenList->FindOrCreatePen("LIGHT GREY", 1, wxSOLID);
+  m_divisionPen = * wxThePenList->FindOrCreatePen("LIGHT GREY", 1, wxSOLID);
   m_doubleBufferingBitmap = (wxBitmap *) NULL;
 
-  if (!m_horizontalSashCursor)
+  if (!m_horizontalSashCursor.Ok())
   {
-    m_horizontalSashCursor = new wxCursor(wxCURSOR_SIZEWE);
-    m_verticalSashCursor = new wxCursor(wxCURSOR_SIZENS);
+    m_horizontalSashCursor = wxCursor(wxCURSOR_SIZEWE);
+    m_verticalSashCursor = wxCursor(wxCURSOR_SIZENS);
   }
 
   SetLabelBackgroundColour(m_labelBackgroundColour);
@@ -402,7 +398,7 @@ void wxGenericGrid::UpdateDimensions(void)
   }
 }
 
-wxGridCell *wxGenericGrid::GetCell(int row, int col)
+wxGridCell *wxGenericGrid::GetCell(int row, int col) const
 {
   if (!m_gridCells)
     return (wxGridCell *) NULL;
@@ -414,7 +410,7 @@ wxGridCell *wxGenericGrid::GetCell(int row, int col)
   if (!cell)
   {
     // m_gridCells[row][col] = OnCreateCell();
-    wxGridEvent g_evt(GetId(), wxEVT_GRID_CREATE_CELL, this, row, col);
+    wxGridEvent g_evt(GetId(), wxEVT_GRID_CREATE_CELL, (wxGenericGrid*) this, row, col);
     GetEventHandler()->ProcessEvent(g_evt);
     m_gridCells[row][col] = g_evt.m_cell;
     return m_gridCells[row][col];
@@ -556,7 +552,7 @@ void wxGenericGrid::DrawLabelAreas(wxDC *dc)
 //  dc->DrawRectangle(m_rightOfSheet, m_topOfSheet, cw - m_rightOfSheet, ch - m_topOfSheet);
 
   // Paint the label areas
-  dc->SetBrush(*m_labelBackgroundBrush);
+  dc->SetBrush(m_labelBackgroundBrush);
 //  dc->DrawRectangle(m_leftOfSheet, m_topOfSheet, m_rightOfSheet - m_leftOfSheet + 1, m_horizontalLabelHeight + 1);
   dc->DrawRectangle(m_leftOfSheet, m_topOfSheet, cw-m_leftOfSheet, m_horizontalLabelHeight + 1);
 //  dc->DrawRectangle(m_leftOfSheet, m_topOfSheet, m_verticalLabelWidth + 1, m_bottomOfSheet - m_topOfSheet + 1);
@@ -583,9 +579,9 @@ void wxGenericGrid::DrawGridLines(wxDC *dc)
 
   int i;
 
-  if (m_divisionPen)
+  if (m_divisionPen.Ok())
   {
-    dc->SetPen(*m_divisionPen);
+    dc->SetPen(m_divisionPen);
 
     int heightCount = m_topOfSheet + m_horizontalLabelHeight;
 
@@ -653,9 +649,9 @@ void wxGenericGrid::DrawGridLines(wxDC *dc)
 
   }
 
-  if (m_divisionPen)
+  if (m_divisionPen.Ok())
   {
-    dc->SetPen(*m_divisionPen);
+    dc->SetPen(m_divisionPen);
 
     // Draw vertical grey lines for cells
     int widthCount = m_leftOfSheet + m_verticalLabelWidth;
@@ -782,7 +778,7 @@ void wxGenericGrid::DrawColumnLabel(wxDC *dc, wxRect *rect, int col)
     rect2.width -= 5;
     rect2.height -= 4;
     dc->SetTextForeground(GetLabelTextColour());
-    dc->SetFont(*GetLabelTextFont());
+    dc->SetFont(GetLabelTextFont());
 	if ( !cell->GetTextValue().IsNull() )
     	DrawTextRect(dc, cell->GetTextValue(), &rect2, GetLabelAlignment(wxHORIZONTAL));
   }
@@ -835,7 +831,7 @@ void wxGenericGrid::DrawRowLabel(wxDC *dc, wxRect *rect, int row)
     rect2.width -= 5;
     rect2.height -= 4;
     dc->SetTextForeground(GetLabelTextColour());
-    dc->SetFont(*GetLabelTextFont());
+    dc->SetFont(GetLabelTextFont());
 	if ( !cell->GetTextValue().IsNull() )
     	DrawTextRect(dc, cell->GetTextValue(), &rect2, GetLabelAlignment(wxVERTICAL));
   }
@@ -874,7 +870,7 @@ void wxGenericGrid::DrawCellBackground(wxDC *dc, wxRect *rect, int row, int col)
   wxGridCell *cell = GetCell(row, col);
   if (cell)
   {
-    dc->SetBrush(*cell->GetBackgroundBrush());
+    dc->SetBrush(cell->GetBackgroundBrush());
     dc->SetPen(*wxTRANSPARENT_PEN);
 
 #if 0    // In wxWin 2.0 the dc code is exact. RR.
@@ -912,7 +908,7 @@ void wxGenericGrid::DrawCellValue(wxDC *dc, wxRect *rect, int row, int col)
     {
       dc->SetBackgroundMode(wxTRANSPARENT);
       dc->SetTextForeground(cell->GetTextColour());
-      dc->SetFont(*cell->GetFont());
+      dc->SetFont(cell->GetFont());
 
 	  if ( !cell->GetTextValue().IsNull() )
       	DrawTextRect(dc, cell->GetTextValue(), &rect2, cell->GetAlignment());
@@ -1239,13 +1235,13 @@ void wxGenericGrid::OnMouseEvent(wxMouseEvent& ev)
           if (orientation == wxHORIZONTAL)
           {
             m_dragStatus = wxGRID_DRAG_LEFT_RIGHT;
-            SetCursor(*m_horizontalSashCursor);
+            SetCursor(m_horizontalSashCursor);
             m_dragLastPosition = (int)ev.GetX();
           }
           else
           {
             m_dragStatus = wxGRID_DRAG_UP_DOWN;
-            SetCursor(*m_verticalSashCursor);
+            SetCursor(m_verticalSashCursor);
             m_dragLastPosition = (int)ev.GetY();
           }
           wxClientDC dc(this);
@@ -1272,7 +1268,7 @@ void wxGenericGrid::OnMouseEvent(wxMouseEvent& ev)
         dc.EndDrawing();
 
         m_dragLastPosition = (int)ev.GetX();
-        SetCursor(*m_horizontalSashCursor);
+        SetCursor(m_horizontalSashCursor);
         break;
       }
       case wxGRID_DRAG_UP_DOWN:
@@ -1286,7 +1282,7 @@ void wxGenericGrid::OnMouseEvent(wxMouseEvent& ev)
         dc.EndDrawing();
 
         m_dragLastPosition = (int)ev.GetY();
-        SetCursor(*m_verticalSashCursor);
+        SetCursor(m_verticalSashCursor);
         break;
       }
     }
@@ -1297,9 +1293,9 @@ void wxGenericGrid::OnMouseEvent(wxMouseEvent& ev)
     if (LabelSashHitTest((int)ev.GetX(), (int)ev.GetY(), &orientation, &rowOrCol, &startPos))
     {
       if (orientation == wxHORIZONTAL)
-        SetCursor(*m_horizontalSashCursor);
+        SetCursor(m_horizontalSashCursor);
        else
-        SetCursor(*m_verticalSashCursor);
+        SetCursor(m_verticalSashCursor);
     }
     else
       SetCursor(*wxSTANDARD_CURSOR);
@@ -1511,7 +1507,7 @@ void wxGenericGrid::DrawCellText(void)
   SetGridClippingRegion(& dc);
 
   dc.SetBackgroundMode(wxTRANSPARENT);
-  dc.SetBrush(*cell->GetBackgroundBrush());
+  dc.SetBrush(cell->GetBackgroundBrush());
 
   strcpy(szEdit, m_textItem->GetValue());
 
@@ -1816,7 +1812,7 @@ void wxGenericGrid::RefreshCell(int row, int col, bool setText)
     }
 }
 
-wxString& wxGenericGrid::GetCellValue(int row, int col)
+wxString& wxGenericGrid::GetCellValue(int row, int col) const
 {
   static wxString emptyString("");
 
@@ -1833,7 +1829,7 @@ void wxGenericGrid::SetColumnWidth(int col, int width)
     m_colWidths[col] = width;
 }
 
-int wxGenericGrid::GetColumnWidth(int col)
+int wxGenericGrid::GetColumnWidth(int col) const
 {
   if (col <= m_totalCols)
     return m_colWidths[col];
@@ -1847,7 +1843,7 @@ void wxGenericGrid::SetRowHeight(int row, int height)
     m_rowHeights[row] = height;
 }
 
-int wxGenericGrid::GetRowHeight(int row)
+int wxGenericGrid::GetRowHeight(int row) const
 {
   if (row <= m_totalRows)
     return m_rowHeights[row];
@@ -1865,7 +1861,7 @@ void wxGenericGrid::SetLabelSize(int orientation, int sz)
   SetCurrentRect(GetCursorRow(), GetCursorColumn());
 }
 
-int wxGenericGrid::GetLabelSize(int orientation)
+int wxGenericGrid::GetLabelSize(int orientation) const
 {
   if (orientation == wxHORIZONTAL)
     return m_horizontalLabelHeight;
@@ -1873,7 +1869,7 @@ int wxGenericGrid::GetLabelSize(int orientation)
     return m_verticalLabelWidth;
 }
 
-wxGridCell *wxGenericGrid::GetLabelCell(int orientation, int pos)
+wxGridCell *wxGenericGrid::GetLabelCell(int orientation, int pos) const
 {
   if (orientation == wxHORIZONTAL)
   {
@@ -1898,7 +1894,7 @@ void wxGenericGrid::SetLabelValue(int orientation, const wxString& val, int pos)
     cell->SetTextValue(val);
 }
 
-wxString& wxGenericGrid::GetLabelValue(int orientation, int pos)
+wxString& wxGenericGrid::GetLabelValue(int orientation, int pos) const
 {
  static wxString emptyString = "";
   wxGridCell *cell = GetLabelCell(orientation, pos);
@@ -1918,7 +1914,7 @@ void wxGenericGrid::SetLabelAlignment(int orientation, int align)
   SetCurrentRect(GetCursorRow(), GetCursorColumn());
 }
 
-int wxGenericGrid::GetLabelAlignment(int orientation)
+int wxGenericGrid::GetLabelAlignment(int orientation) const
 {
   if (orientation == wxHORIZONTAL)
     return m_horizontalLabelAlignment;
@@ -1935,7 +1931,7 @@ void wxGenericGrid::SetLabelTextColour(const wxColour& colour)
 void wxGenericGrid::SetLabelBackgroundColour(const wxColour& colour)
 {
   m_labelBackgroundColour = colour;
-  m_labelBackgroundBrush = wxTheBrushList->FindOrCreateBrush(m_labelBackgroundColour, wxSOLID);
+  m_labelBackgroundBrush = * wxTheBrushList->FindOrCreateBrush(m_labelBackgroundColour, wxSOLID);
 }
 
 void wxGenericGrid::SetEditable(bool edit)
@@ -1989,7 +1985,7 @@ void wxGenericGrid::SetCellAlignment(int flag, int row, int col)
     cell->SetAlignment(flag);
 }
 
-int wxGenericGrid::GetCellAlignment(int row, int col)
+int wxGenericGrid::GetCellAlignment(int row, int col) const
 {
   wxGridCell *cell = GetCell(row, col);
   if (cell)
@@ -2008,7 +2004,7 @@ void wxGenericGrid::SetCellAlignment(int flag)
         GetCell(i, j)->SetAlignment(flag);
 }
 
-int wxGenericGrid::GetCellAlignment(void)
+int wxGenericGrid::GetCellAlignment(void) const
 {
   return m_cellAlignment;
 }
@@ -2033,13 +2029,13 @@ void wxGenericGrid::SetCellBackgroundColour(const wxColour& val, int row, int co
   }
 }
 
-wxColour& wxGenericGrid::GetCellBackgroundColour(int row, int col)
+wxColour& wxGenericGrid::GetCellBackgroundColour(int row, int col) const
 {
   wxGridCell *cell = GetCell(row, col);
   if (cell)
     return cell->GetBackgroundColour();
   else
-    return m_cellBackgroundColour;
+    return (wxColour&) m_cellBackgroundColour;
 }
 
 void wxGenericGrid::SetCellTextColour(const wxColour& val, int row, int col)
@@ -2052,7 +2048,7 @@ void wxGenericGrid::SetCellTextColour(const wxColour& val, int row, int col)
   }
 }
 
-void wxGenericGrid::SetCellTextFont(wxFont *fnt, int row, int col)
+void wxGenericGrid::SetCellTextFont(const wxFont& fnt, int row, int col)
 {
   wxGridCell *cell = GetCell(row, col);
   if (cell)
@@ -2062,22 +2058,22 @@ void wxGenericGrid::SetCellTextFont(wxFont *fnt, int row, int col)
   }
 }
 
-wxFont *wxGenericGrid::GetCellTextFont(int row, int col)
+wxFont& wxGenericGrid::GetCellTextFont(int row, int col) const
 {
   wxGridCell *cell = GetCell(row, col);
   if (cell)
-    return cell->GetFont();
+    return (wxFont&) cell->GetFont();
   else
-    return m_cellTextFont;
+    return (wxFont&) m_cellTextFont;
 }
 
-wxColour& wxGenericGrid::GetCellTextColour(int row, int col)
+wxColour& wxGenericGrid::GetCellTextColour(int row, int col) const
 {
   wxGridCell *cell = GetCell(row, col);
   if (cell)
-    return cell->GetTextColour();
+    return (wxColour&) cell->GetTextColour();
   else
-    return m_cellTextColour;
+    return (wxColour&) m_cellTextColour;
 }
 
 void wxGenericGrid::SetCellTextColour(const wxColour& val)
@@ -2090,7 +2086,7 @@ void wxGenericGrid::SetCellTextColour(const wxColour& val)
         GetCell(i, j)->SetTextColour(val);
 }
 
-void wxGenericGrid::SetCellTextFont(wxFont *fnt)
+void wxGenericGrid::SetCellTextFont(const wxFont& fnt)
 {
   m_cellTextFont = fnt;
   int i,j;
@@ -2110,7 +2106,7 @@ void wxGenericGrid::SetCellBitmap(wxBitmap *bitmap, int row, int col)
   }
 }
 
-wxBitmap *wxGenericGrid::GetCellBitmap(int row, int col)
+wxBitmap *wxGenericGrid::GetCellBitmap(int row, int col) const
 {
   wxGridCell *cell = GetCell(row, col);
   if (cell)
@@ -2407,8 +2403,8 @@ void wxGenericGrid::SetGridCursor(int row, int col)
 wxGridCell::wxGridCell(wxGenericGrid *window)
 {
   cellBitmap = (wxBitmap *) NULL;
-  font = (wxFont *) NULL;
-  backgroundBrush = (wxBrush *) NULL;
+  font = wxNullFont;
+  backgroundBrush = wxNullBrush;
   if (window)
     textColour = window->GetCellTextColour();
   else
@@ -2421,7 +2417,7 @@ wxGridCell::wxGridCell(wxGenericGrid *window)
   if (window)
     font = window->GetCellTextFont();
   else
-    font = wxTheFontList->FindOrCreateFont(12, wxSWISS, wxNORMAL, wxNORMAL);
+    font = * wxTheFontList->FindOrCreateFont(12, wxSWISS, wxNORMAL, wxNORMAL);
 
   SetBackgroundColour(backgroundColour);
 
@@ -2438,7 +2434,7 @@ wxGridCell::~wxGridCell(void)
 void wxGridCell::SetBackgroundColour(const wxColour& colour)
 {
   backgroundColour = colour;
-  backgroundBrush = wxTheBrushList->FindOrCreateBrush(backgroundColour, wxSOLID);
+  backgroundBrush = * wxTheBrushList->FindOrCreateBrush(backgroundColour, wxSOLID);
 }
 
 void wxGenericGrid::OnText(wxCommandEvent& WXUNUSED(ev) )
diff --git a/src/generic/laywin.cpp b/src/generic/laywin.cpp
index 88677b3780..396fe18067 100644
--- a/src/generic/laywin.cpp
+++ b/src/generic/laywin.cpp
@@ -176,7 +176,7 @@ bool wxLayoutAlgorithm::LayoutMDIFrame(wxMDIParentFrame* frame, wxRect* r)
     wxCalculateLayoutEvent event;
     event.SetRect(rect);
 
-    wxNode* node = frame->GetChildren()->First();
+    wxNode* node = frame->GetChildren().First();
     while (node)
     {
         wxWindow* win = (wxWindow*) node->Data();
@@ -210,7 +210,7 @@ bool wxLayoutAlgorithm::LayoutFrame(wxFrame* frame, wxWindow* mainWindow)
     wxCalculateLayoutEvent event;
     event.SetRect(rect);
 
-    wxNode* node = frame->GetChildren()->First();
+    wxNode* node = frame->GetChildren().First();
     while (node)
     {
         wxWindow* win = (wxWindow*) node->Data();
diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp
index f63efe7977..3a916fb19f 100644
--- a/src/generic/listctrl.cpp
+++ b/src/generic/listctrl.cpp
@@ -528,13 +528,13 @@ void wxListLineData::DoDraw( wxPaintDC *dc, bool hilight, bool paintBG )
   {
     if (hilight)
     {
-      dc->SetBrush( m_hilightBrush );
-      dc->SetPen( wxTRANSPARENT_PEN );
+      dc->SetBrush( * m_hilightBrush );
+      dc->SetPen( * wxTRANSPARENT_PEN );
     }
     else
     {
-      dc->SetBrush( wxWHITE_BRUSH );
-      dc->SetPen( wxTRANSPARENT_PEN );
+      dc->SetBrush( * wxWHITE_BRUSH );
+      dc->SetPen( * wxTRANSPARENT_PEN );
     }
     dc->DrawRectangle( m_bound_hilight.x, m_bound_hilight.y,
                        m_bound_hilight.width, m_bound_hilight.height );
@@ -615,8 +615,8 @@ void wxListLineData::DrawRubberBand( wxPaintDC *dc, bool on )
 {
   if (on)
   {
-    dc->SetPen( wxBLACK_PEN );
-    dc->SetBrush( wxTRANSPARENT_BRUSH );
+    dc->SetPen( * wxBLACK_PEN );
+    dc->SetBrush( * wxTRANSPARENT_BRUSH );
     dc->DrawRectangle( m_bound_hilight.x, m_bound_hilight.y,
                        m_bound_hilight.width, m_bound_hilight.height );
   }
@@ -720,7 +720,7 @@ void wxListHeaderWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
 
   dc.BeginDrawing();
 
-  dc.SetFont( *GetFont() );
+  dc.SetFont( GetFont() );
 
   int w = 0;
   int h = 0;
@@ -832,12 +832,12 @@ void wxListHeaderWindow::OnMouse( wxMouseEvent &event )
   {
     if (hit_border)
     {
-      if (m_currentCursor == wxSTANDARD_CURSOR) SetCursor( m_resizeCursor );
+      if (m_currentCursor == wxSTANDARD_CURSOR) SetCursor( * m_resizeCursor );
       m_currentCursor = m_resizeCursor;
     }
     else
     {
-      if (m_currentCursor != wxSTANDARD_CURSOR) SetCursor( wxSTANDARD_CURSOR );
+      if (m_currentCursor != wxSTANDARD_CURSOR) SetCursor( * wxSTANDARD_CURSOR );
       m_currentCursor = wxSTANDARD_CURSOR;
     }
   }
@@ -1035,7 +1035,7 @@ void wxListMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
 
   dc.BeginDrawing();
 
-  dc.SetFont( *GetFont() );
+  dc.SetFont( GetFont() );
 
   wxNode *node = m_lines.First();
   while (node)
@@ -1863,7 +1863,7 @@ void wxListMainWindow::CalculatePositions( void )
   if (!m_lines.First()) return;
 
   wxPaintDC dc( this );
-  dc.SetFont( *GetFont() );
+  dc.SetFont( GetFont() );
 
   int iconSpacing = 0;
   if (m_mode & wxLC_ICON) iconSpacing = m_normal_spacing;
diff --git a/src/generic/panelg.cpp b/src/generic/panelg.cpp
index c26d67adbe..70006c5ea0 100644
--- a/src/generic/panelg.cpp
+++ b/src/generic/panelg.cpp
@@ -89,7 +89,7 @@ void wxPanel::OnNavigationKey(wxNavigationKeyEvent& event)
   }
 
   // first of all, find the window which currently has the focus
-  wxNode *node = GetChildren()->First();
+  wxNode *node = GetChildren().First();
   wxWindow *winFocus = event.GetCurrentFocus();
   
   // @@@ no FindFocus() in wxGTK
@@ -117,7 +117,7 @@ bool wxPanel::SetFocusToNextChild(wxNode *node, bool bForward)
 
   bool bFound = FALSE;  // have we found a window we will set focus to?
 
-  wxList *children = GetChildren();
+  wxList *children = & GetChildren();
   if ( node == NULL ) {
     // we've never had focus before
     node = bForward ? children->First() : children->Last();
diff --git a/src/generic/sashwin.cpp b/src/generic/sashwin.cpp
index 2b4c57472c..9bac85b92d 100644
--- a/src/generic/sashwin.cpp
+++ b/src/generic/sashwin.cpp
@@ -527,9 +527,9 @@ void wxSashWindow::SizeWindows()
     int cw, ch;
     GetClientSize(&cw, &ch);
 
-    if (GetChildren()->Number() > 0)
+    if (GetChildren().Number() > 0)
     {
-        wxWindow* child = (wxWindow*) (GetChildren()->First()->Data());
+        wxWindow* child = (wxWindow*) (GetChildren().First()->Data());
 
         int x = 0;
         int y = 0;
diff --git a/src/generic/statusbr.cpp b/src/generic/statusbr.cpp
index 424008eafa..13c524247e 100644
--- a/src/generic/statusbr.cpp
+++ b/src/generic/statusbr.cpp
@@ -87,7 +87,7 @@ bool wxStatusBar::Create(wxWindow *parent, wxWindowID id,
   bool success = wxWindow::Create(parent, id, pos, size, style, name);
 
   // Don't wish this to be found as a child
-  parent->GetChildren()->DeleteObject(this);
+  parent->GetChildren().DeleteObject(this);
 
   InitColours();
 
@@ -172,8 +172,8 @@ void wxStatusBar::OnPaint(wxPaintEvent& WXUNUSED(event) )
   wxPaintDC dc(this);
 
   int i;
-  if ( GetFont() )
-    dc.SetFont(*GetFont());
+  if ( GetFont().Ok() )
+    dc.SetFont(GetFont());
   dc.SetBackgroundMode(wxTRANSPARENT);
 
   for ( i = 0; i < m_nFields; i ++ )
diff --git a/src/generic/tabg.cpp b/src/generic/tabg.cpp
index cd9f9355df..297d93d55e 100644
--- a/src/generic/tabg.cpp
+++ b/src/generic/tabg.cpp
@@ -825,7 +825,7 @@ void wxTabView::Draw(wxDC& dc)
 #ifndef wxUSE_NEW_METHOD
 	if (GetTabStyle() & wxTAB_STYLE_DRAW_BOX)
 	{
-		dc.SetPen(GetShadowPen());
+		dc.SetPen(* GetShadowPen());
 
 		// Draw bottom line
 		dc.DrawLine(
@@ -843,7 +843,7 @@ void wxTabView::Draw(wxDC& dc)
 				(GetViewRect().y + GetViewRect().height)
 				);
 
-		dc.SetPen(wxBLACK_PEN);
+		dc.SetPen(* wxBLACK_PEN);
 
 		// Draw bottom line
 		dc.DrawLine(
diff --git a/src/motif/app.cpp b/src/motif/app.cpp
index 1d34942d06..622e9c126e 100644
--- a/src/motif/app.cpp
+++ b/src/motif/app.cpp
@@ -438,7 +438,7 @@ bool wxApp::SendIdleEvents(wxWindow* win)
     if (event.MoreRequested())
         needMore = TRUE;
 
-	wxNode* node = win->GetChildren()->First();
+	wxNode* node = win->GetChildren().First();
 	while (node)
 	{
 		wxWindow* win = (wxWindow*) node->Data();
diff --git a/src/motif/button.cpp b/src/motif/button.cpp
index 3ff312878a..814d1a2a51 100644
--- a/src/motif/button.cpp
+++ b/src/motif/button.cpp
@@ -98,7 +98,7 @@ void wxButton::SetDefault()
   // Because it's very hard to find wxButton in the same row,
   // correction is straighforward: we set resource for all wxButton
   // in this parent (but not sub panels)
-  for (wxNode * node = parent->GetChildren ()->First (); node; node = node->Next ())
+  for (wxNode * node = parent->GetChildren().First (); node; node = node->Next ())
     {
       wxButton *item = (wxButton *) node->Data ();
       if (item->IsKindOf(CLASSINFO(wxButton)))
diff --git a/src/motif/dc.cpp b/src/motif/dc.cpp
index e05e204f43..8502eb79e4 100644
--- a/src/motif/dc.cpp
+++ b/src/motif/dc.cpp
@@ -403,10 +403,10 @@ void wxDC::ComputeScaleAndOrigin(void)
   {
     // this is a bit artificial, but we need to force wxDC to think
     // the pen has changed
-    wxPen* pen = GetPen();
+    wxPen* pen = & GetPen();
     wxPen tempPen;
     m_pen = tempPen;
-    SetPen(pen);
+    SetPen(* pen);
   }
 };
 
diff --git a/src/motif/dcclient.cpp b/src/motif/dcclient.cpp
index 357b4fc447..e99b12a347 100644
--- a/src/motif/dcclient.cpp
+++ b/src/motif/dcclient.cpp
@@ -1403,7 +1403,7 @@ void wxWindowDC::SetPen( const wxPen &pen )
   m_currentPenDash = m_pen.GetDash();
 
   if (m_currentStyle == wxSTIPPLE)
-    m_currentStipple = m_pen.GetStipple ();
+    m_currentStipple = * m_pen.GetStipple ();
 
   bool sameStyle = (oldStyle == m_currentStyle &&
              oldFill == m_currentFill &&
@@ -1540,7 +1540,7 @@ void wxWindowDC::SetPen( const wxPen &pen )
     {
       Pixmap myStipple;
 
-      oldStipple = (wxBitmap*) NULL;    // For later reset!!
+      oldStipple = wxNullBitmap;    // For later reset!!
 
       switch (m_currentFill)
       {
@@ -1691,7 +1691,7 @@ void wxWindowDC::SetBrush( const wxBrush &brush )
 
   m_currentFill = m_brush.GetStyle ();
   if (m_currentFill == wxSTIPPLE)
-    m_currentStipple = m_brush.GetStipple ();
+    m_currentStipple = * m_brush.GetStipple ();
 
   wxColour oldBrushColour(m_currentColour);
   m_currentColour = m_brush.GetColour ();
diff --git a/src/motif/dcmemory.cpp b/src/motif/dcmemory.cpp
index c27c9a22e4..37c52a8b5d 100644
--- a/src/motif/dcmemory.cpp
+++ b/src/motif/dcmemory.cpp
@@ -48,8 +48,8 @@ wxMemoryDC::wxMemoryDC(void)
     XGCValues valReturn;
     XGetGCValues((Display*) m_display, (GC) m_gc, GCFont, &valReturn);
     m_oldFont = (WXFont) valReturn.font;
-    SetBrush (wxWHITE_BRUSH);
-    SetPen (wxBLACK_PEN);
+    SetBrush (* wxWHITE_BRUSH);
+    SetPen (* wxBLACK_PEN);
 };
 
 wxMemoryDC::wxMemoryDC( wxDC* dc )
@@ -77,8 +77,8 @@ wxMemoryDC::wxMemoryDC( wxDC* dc )
     XGCValues valReturn;
     XGetGCValues((Display*) m_display, (GC) m_gc, GCFont, &valReturn);
     m_oldFont = (WXFont) valReturn.font;
-    SetBrush (wxWHITE_BRUSH);
-    SetPen (wxBLACK_PEN);
+    SetBrush (* wxWHITE_BRUSH);
+    SetPen (* wxBLACK_PEN);
 };
 
 wxMemoryDC::~wxMemoryDC(void)
@@ -117,8 +117,8 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap )
     bool oldOpt = GetOptimization();
     SetOptimization(FALSE);
     
-    SetBrush (wxWHITE_BRUSH);
-    SetPen (wxBLACK_PEN);
+    SetBrush (* wxWHITE_BRUSH);
+    SetPen (* wxBLACK_PEN);
 
     SetOptimization(oldOpt);
 
diff --git a/src/motif/frame.cpp b/src/motif/frame.cpp
index c95fc09b97..d540ec4a9c 100644
--- a/src/motif/frame.cpp
+++ b/src/motif/frame.cpp
@@ -378,7 +378,7 @@ void wxFrame::GetClientSize(int *x, int *y) const
     // it seems that if a frame holds a panel, the menu bar size
     // gets automatically taken care of --- grano@cs.helsinki.fi 4.4.95
     bool hasSubPanel = FALSE;
-    for(wxNode* node = GetChildren()->First(); node; node = node->Next())
+    for(wxNode* node = GetChildren().First(); node; node = node->Next())
     {
      wxWindow *win = (wxWindow *)node->Data();
      hasSubPanel = (win->IsKindOf(CLASSINFO(wxPanel)) && !win->IsKindOf(CLASSINFO(wxDialog)));
@@ -571,7 +571,7 @@ wxStatusBar *wxFrame::OnCreateStatusBar(int number, long style, wxWindowID id,
 
     // Set the height according to the font and the border size
     wxClientDC dc(statusBar);
-    dc.SetFont(* statusBar->GetFont());
+    dc.SetFont(statusBar->GetFont());
 
     long x, y;
     dc.GetTextExtent("X", &x, &y);
@@ -664,7 +664,7 @@ void wxFrame::SetMenuBar(wxMenuBar *menuBar)
 void wxFrame::Fit()
 {
   // Work out max. size
-  wxNode *node = GetChildren()->First();
+  wxNode *node = GetChildren().First();
   int max_width = 0;
   int max_height = 0;
   while (node)
@@ -721,7 +721,7 @@ void wxFrame::OnSize(wxSizeEvent& event)
 
   // do we have _exactly_ one child?
   wxWindow *child = NULL;
-  for ( wxNode *node = GetChildren()->First(); node; node = node->Next() )
+  for ( wxNode *node = GetChildren().First(); node; node = node->Next() )
   {
     wxWindow *win = (wxWindow *)node->Data();
     if ( !win->IsKindOf(CLASSINFO(wxFrame))  &&
@@ -751,7 +751,7 @@ void wxFrame::OnSize(wxSizeEvent& event)
 // subwindow found.
 void wxFrame::OnActivate(wxActivateEvent& event)
 {
-  for(wxNode *node = GetChildren()->First(); node; node = node->Next())
+  for(wxNode *node = GetChildren().First(); node; node = node->Next())
   {
     // Find a child that's a subwindow, but not a dialog box.
     wxWindow *child = (wxWindow *)node->Data();
diff --git a/src/motif/notebook.cpp b/src/motif/notebook.cpp
index 00729a08ed..ae9e5c7252 100644
--- a/src/motif/notebook.cpp
+++ b/src/motif/notebook.cpp
@@ -48,6 +48,7 @@ BEGIN_EVENT_TABLE(wxNotebook, wxControl)
     EVT_MOUSE_EVENTS(wxNotebook::OnMouseEvent)
     EVT_SET_FOCUS(wxNotebook::OnSetFocus)
     EVT_NAVIGATION_KEY(wxNotebook::OnNavigationKey)
+    EVT_IDLE(wxNotebook::OnIdle)
 END_EVENT_TABLE()
 
 IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxControl)
@@ -392,6 +393,23 @@ void wxNotebook::OnSize(wxSizeEvent& event)
     event.Skip();
 }
 
+// This was supposed to cure the non-display of the notebook
+// until the user resizes the window.
+// What's going on?
+void wxNotebook::OnIdle(wxIdleEvent& event)
+{
+    static bool s_bFirstTime = TRUE;
+    if ( s_bFirstTime ) {
+      wxSize sz(GetSize());
+      wxSizeEvent sizeEvent(sz, GetId());
+      sizeEvent.SetEventObject(this);
+      GetEventHandler()->ProcessEvent(sizeEvent);
+      Refresh();
+      s_bFirstTime = FALSE;
+    }
+    event.Skip();
+}
+
 // Implementation: calculate the layout of the view rect
 // and resize the children if required
 bool wxNotebook::RefreshLayout(bool force)
diff --git a/src/motif/scrolbar.cpp b/src/motif/scrolbar.cpp
index 10b670d400..08dca34d54 100644
--- a/src/motif/scrolbar.cpp
+++ b/src/motif/scrolbar.cpp
@@ -148,7 +148,7 @@ void wxScrollBar::SetScrollbar(int position, int thumbSize, int range, int pageS
 
 void wxScrollBar::Command(wxCommandEvent& event)
 {
-    SetPosition(event.m_commandInt);
+    SetThumbPosition(event.m_commandInt);
     ProcessCommand(event);
 }
 
diff --git a/src/motif/toolbar.cpp b/src/motif/toolbar.cpp
index 071f4f030b..989b24331b 100644
--- a/src/motif/toolbar.cpp
+++ b/src/motif/toolbar.cpp
@@ -590,7 +590,7 @@ void wxToolBar::DestroyPixmaps()
 wxToolBarTool *wxToolBar::AddTool(int index, const wxBitmap& bitmap, const wxBitmap& pushedBitmap,
              bool toggle, long xPos, long yPos, wxObject *clientData, const wxString& helpString1, const wxString& helpString2)
 {
-  wxToolBarTool *tool = new wxToolBarTool(index, bitmap, (wxBitmap *)NULL, toggle, xPos, yPos, helpString1, helpString2);
+  wxToolBarTool *tool = new wxToolBarTool(index, bitmap, wxNullBitmap, toggle, xPos, yPos, helpString1, helpString2);
   tool->m_clientData = clientData;
 
   if (xPos > -1)
diff --git a/src/motif/utils.cpp b/src/motif/utils.cpp
index 07ac707905..29f7b5488a 100644
--- a/src/motif/utils.cpp
+++ b/src/motif/utils.cpp
@@ -571,7 +571,7 @@ wxXSetBusyCursor (wxWindow * win, wxCursor * cursor)
 
   XFlush (display);
 
-  for(wxNode *node = win->GetChildren()->First (); node; node = node->Next())
+  for(wxNode *node = win->GetChildren().First (); node; node = node->Next())
   {
         wxWindow *child = (wxWindow *) node->Data ();
 	    wxXSetBusyCursor (child, cursor);
diff --git a/src/motif/window.cpp b/src/motif/window.cpp
index d6bef2d967..9be496a55a 100644
--- a/src/motif/window.cpp
+++ b/src/motif/window.cpp
@@ -942,7 +942,7 @@ void wxWindow::Refresh(bool eraseBack, const wxRect *rect)
 // Responds to colour changes: passes event on to children.
 void wxWindow::OnSysColourChanged(wxSysColourChangedEvent& event)
 {
-    wxNode *node = GetChildren()->First();
+    wxNode *node = GetChildren().First();
     while ( node )
     {
         // Only propagate to non-top-level windows
@@ -1371,7 +1371,7 @@ bool wxWindow::IsEnabled() const
 // it's an application error (pops up a dialog)
 bool wxWindow::TransferDataToWindow()
 {
-	wxNode *node = GetChildren()->First();
+	wxNode *node = GetChildren().First();
 	while ( node )
 	{
 		wxWindow *child = (wxWindow *)node->Data();
@@ -1391,7 +1391,7 @@ bool wxWindow::TransferDataToWindow()
 // validation failed: don't quit
 bool wxWindow::TransferDataFromWindow()
 {
-	wxNode *node = GetChildren()->First();
+	wxNode *node = GetChildren().First();
 	while ( node )
 	{
 		wxWindow *child = (wxWindow *)node->Data();
@@ -1407,7 +1407,7 @@ bool wxWindow::TransferDataFromWindow()
 
 bool wxWindow::Validate()
 {
-	wxNode *node = GetChildren()->First();
+	wxNode *node = GetChildren().First();
 	while ( node )
 	{
 		wxWindow *child = (wxWindow *)node->Data();
@@ -1430,14 +1430,13 @@ wxWindow *wxWindow::FindFocus()
 
 void wxWindow::AddChild(wxWindow *child)
 {
-    GetChildren()->Append(child);
+    GetChildren().Append(child);
     child->m_windowParent = this;
 }
 
 void wxWindow::RemoveChild(wxWindow *child)
 {
-    if (GetChildren())
-        GetChildren()->DeleteObject(child);
+    GetChildren().DeleteObject(child);
     child->m_windowParent = NULL;
 }
 
@@ -1450,9 +1449,7 @@ bool wxWindow::Reparent(wxWindow* WXUNUSED(parent))
 
 void wxWindow::DestroyChildren()
 {
-  if (GetChildren())
-  {
-    wxNode *node = GetChildren()->First();
+    wxNode *node = GetChildren().First();
     while (node)
     {
       wxNode* next = node->Next();
@@ -1460,19 +1457,18 @@ void wxWindow::DestroyChildren()
       delete child;
       node = next;
     }
-    GetChildren()->Clear();
+    GetChildren().Clear();
 #if 0
     wxNode *node;
-    while ((node = GetChildren()->First()) != (wxNode *)NULL) {
+    while ((node = GetChildren().First()) != (wxNode *)NULL) {
       wxWindow *child;
       if ((child = (wxWindow *)node->Data()) != (wxWindow *)NULL) {
         delete child;
-		if ( GetChildren()->Member(child) )
+		if ( GetChildren().Member(child) )
 			delete node;
       }
     } /* while */
 #endif
-  }
 }
 
 void wxWindow::MakeModal(bool modal)
@@ -1687,7 +1683,7 @@ bool wxWindow::DoPhase(int phase)
   {
     noChanges = 0;
     noFailures = 0;
-    wxNode *node = GetChildren()->First();
+    wxNode *node = GetChildren().First();
     while (node)
     {
       wxWindow *child = (wxWindow *)node->Data();
@@ -1732,7 +1728,7 @@ void wxWindow::ResetConstraints()
     constr->centreX.SetDone(FALSE);
     constr->centreY.SetDone(FALSE);
   }
-  wxNode *node = GetChildren()->First();
+  wxNode *node = GetChildren().First();
   while (node)
   {
     wxWindow *win = (wxWindow *)node->Data();
@@ -1791,7 +1787,7 @@ void wxWindow::SetConstraintSizes(bool recurse)
 
   if (recurse)
   {
-    wxNode *node = GetChildren()->First();
+    wxNode *node = GetChildren().First();
     while (node)
     {
       wxWindow *win = (wxWindow *)node->Data();
@@ -1928,9 +1924,7 @@ bool wxWindow::Close(bool force)
 wxObject* wxWindow::GetChild(int number) const
 {
   // Return a pointer to the Nth object in the window
-  if (!GetChildren())
-    return(NULL) ;
-  wxNode *node = GetChildren()->First();
+  wxNode *node = GetChildren().First();
   int n = number;
   while (node && n--)
     node = node->Next() ;
@@ -1961,7 +1955,7 @@ void wxWindow::Fit()
 {
 	int maxX = 0;
 	int maxY = 0;
-	wxNode *node = GetChildren()->First();
+	wxNode *node = GetChildren().First();
 	while ( node )
 	{
 		wxWindow *win = (wxWindow *)node->Data();
@@ -2015,7 +2009,7 @@ wxWindow *wxWindow::FindWindow(long id)
 	if ( GetId() == id)
 		return this;
 
-	wxNode *node = GetChildren()->First();
+	wxNode *node = GetChildren().First();
 	while ( node )
 	{
 		wxWindow *child = (wxWindow *)node->Data();
@@ -2032,7 +2026,7 @@ wxWindow *wxWindow::FindWindow(const wxString& name)
 	if ( GetName() == name)
 		return this;
 
-	wxNode *node = GetChildren()->First();
+	wxNode *node = GetChildren().First();
 	while ( node )
 	{
 		wxWindow *child = (wxWindow *)node->Data();
diff --git a/src/msw/app.cpp b/src/msw/app.cpp
index 58798d9374..76458c15a6 100644
--- a/src/msw/app.cpp
+++ b/src/msw/app.cpp
@@ -869,7 +869,7 @@ bool wxApp::SendIdleEvents(wxWindow* win)
   if (event.MoreRequested())
     needMore = TRUE;
 
-  wxNode* node = win->GetChildren()->First();
+  wxNode* node = win->GetChildren().First();
   while (node)
   {
     wxWindow* win = (wxWindow*) node->Data();
diff --git a/src/msw/bitmap.cpp b/src/msw/bitmap.cpp
index 6949e0783a..9d8228fea9 100644
--- a/src/msw/bitmap.cpp
+++ b/src/msw/bitmap.cpp
@@ -405,9 +405,9 @@ wxBitmap wxBitmap::GetBitmapForDC(wxDC& dc) const
 */
     if( this->GetPalette() && this->GetPalette()->Ok() && (this->GetPalette()->GetHPALETTE() != 0) )
     {
-        tmpBitmap.SetPalette(this->GetPalette());
+        tmpBitmap.SetPalette(* this->GetPalette());
         memDC.SelectObject(tmpBitmap);
-        memDC.SetPalette(this->GetPalette());
+        memDC.SetPalette(* this->GetPalette());
         hPal = (HPALETTE) this->GetPalette()->GetHPALETTE();
     }
     else
diff --git a/src/msw/bmpbuttn.cpp b/src/msw/bmpbuttn.cpp
index 201529d4ca..f21e4ff954 100644
--- a/src/msw/bmpbuttn.cpp
+++ b/src/msw/bmpbuttn.cpp
@@ -82,7 +82,7 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bit
   // Subclass again for purposes of dialog editing mode
   SubclassWin((WXHWND)wx_button);
 
-  SetFont(* parent->GetFont()) ;
+  SetFont(parent->GetFont()) ;
 
   SetSize(x, y, width, height);
   ShowWindow(wx_button, SW_SHOW);
diff --git a/src/msw/button.cpp b/src/msw/button.cpp
index 03200cfacf..79f81ffaaa 100644
--- a/src/msw/button.cpp
+++ b/src/msw/button.cpp
@@ -87,7 +87,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label,
   // Subclass again for purposes of dialog editing mode
   SubclassWin((WXHWND)wx_button);
 
-  SetFont(* parent->GetFont());
+  SetFont(parent->GetFont());
 
   SetSize(x, y, width, height);
   ShowWindow(wx_button, SW_SHOW);
@@ -117,7 +117,7 @@ void wxButton::SetSize(int x, int y, int width, int height, int sizeFlags)
   int cyf;
   char buf[300];
   GetWindowText((HWND) GetHWND(), buf, 300);
-  GetTextExtent(buf, &current_width, &cyf,NULL,NULL,GetFont());
+  GetTextExtent(buf, &current_width, &cyf,NULL,NULL,& GetFont());
 
   // If we're prepared to use the existing width, then...
   if (width == -1 && ((sizeFlags & wxSIZE_AUTO_WIDTH) != wxSIZE_AUTO_WIDTH))
@@ -126,7 +126,7 @@ void wxButton::SetSize(int x, int y, int width, int height, int sizeFlags)
   {
     int cx;
     int cy;
-    wxGetCharSize(GetHWND(), &cx, &cy,GetFont());
+    wxGetCharSize(GetHWND(), &cx, &cy,& GetFont());
     actualWidth = (int)(current_width + 3*cx) ;
   }
   
diff --git a/src/msw/checkbox.cpp b/src/msw/checkbox.cpp
index 3c659f88fa..33452a6cdd 100644
--- a/src/msw/checkbox.cpp
+++ b/src/msw/checkbox.cpp
@@ -105,7 +105,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
   // Subclass again for purposes of dialog editing mode
   SubclassWin(m_hWnd);
   
-  SetFont(*parent->GetFont());
+  SetFont(parent->GetFont());
 
   SetSize(x, y, width, height);
 
@@ -143,7 +143,7 @@ void wxCheckBox::SetSize(int x, int y, int width, int height, int sizeFlags)
 
   if ( !str.IsEmpty() )
   {
-    GetTextExtent(str, &current_width, &cyf, NULL, NULL, GetFont());
+    GetTextExtent(str, &current_width, &cyf, NULL, NULL, & GetFont());
     if (w1 < 0)
       w1 = (int)(current_width + RADIO_SIZE);
     if (h1 < 0)
diff --git a/src/msw/choice.cpp b/src/msw/choice.cpp
index 9688accf39..1ea6050d46 100644
--- a/src/msw/choice.cpp
+++ b/src/msw/choice.cpp
@@ -105,7 +105,7 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id,
   // Subclass again for purposes of dialog editing mode
   SubclassWin(m_hWnd);
 
-  SetFont(* parent->GetFont());
+  SetFont(parent->GetFont());
 
   int i;
   for (i = 0; i < n; i++)
@@ -204,7 +204,7 @@ void wxChoice::SetSize(int x, int y, int width, int height, int sizeFlags)
 
   int cx; // button font dimensions
   int cy;
-  wxGetCharSize(GetHWND(), &cx, &cy, GetFont());
+  wxGetCharSize(GetHWND(), &cx, &cy, & GetFont());
 
   int control_width, control_height;
 
@@ -232,7 +232,7 @@ void wxChoice::SetSize(int x, int y, int width, int height, int sizeFlags)
       for (i = 0; i < m_noStrings; i++)
       {
         wxString str(GetString(i));
-        GetTextExtent(str, &len, &ht, NULL, NULL,GetFont());
+        GetTextExtent(str, &len, &ht, NULL, NULL, & GetFont());
         if ( len > longest)
             longest = len;
       }
diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp
index db6801a3f3..abd740fa2b 100644
--- a/src/msw/combobox.cpp
+++ b/src/msw/combobox.cpp
@@ -127,7 +127,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
   // Subclass again for purposes of dialog editing mode
   SubclassWin(m_hWnd);
 
-  SetFont(* parent->GetFont());
+  SetFont(parent->GetFont());
   int i;
   for (i = 0; i < n; i++)
   {
diff --git a/src/msw/frame.cpp b/src/msw/frame.cpp
index 8616d1a2ae..c46347705c 100644
--- a/src/msw/frame.cpp
+++ b/src/msw/frame.cpp
@@ -370,7 +370,7 @@ wxStatusBar *wxFrame::OnCreateStatusBar(int number, long style, wxWindowID id,
 
         // Set the height according to the font and the border size
         wxClientDC dc(statusBar);
-        dc.SetFont(* statusBar->GetFont());
+        dc.SetFont(statusBar->GetFont());
 
         long x, y;
         dc.GetTextExtent("X", &x, &y);
@@ -508,7 +508,7 @@ bool wxFrame::LoadAccelerators(const wxString& table)
 void wxFrame::Fit(void)
 {
   // Work out max. size
-  wxNode *node = GetChildren()->First();
+  wxNode *node = GetChildren().First();
   int max_width = 0;
   int max_height = 0;
   while (node)
@@ -801,7 +801,7 @@ void wxFrame::OnSize(wxSizeEvent& event)
 
   // do we have _exactly_ one child?
   wxWindow *child = NULL;
-  for ( wxNode *node = GetChildren()->First(); node; node = node->Next() )
+  for ( wxNode *node = GetChildren().First(); node; node = node->Next() )
   {
     wxWindow *win = (wxWindow *)node->Data();
     if ( !win->IsKindOf(CLASSINFO(wxFrame))  &&
@@ -831,7 +831,7 @@ void wxFrame::OnSize(wxSizeEvent& event)
 // subwindow found.
 void wxFrame::OnActivate(wxActivateEvent& event)
 {
-  for(wxNode *node = GetChildren()->First(); node; node = node->Next())
+  for(wxNode *node = GetChildren().First(); node; node = node->Next())
   {
     // Find a child that's a subwindow, but not a dialog box.
     wxWindow *child = (wxWindow *)node->Data();
@@ -1037,7 +1037,7 @@ void wxFrame::PositionToolBar(void)
 // propagate our state change to all child frames
 void wxFrame::IconizeChildFrames(bool bIconize)
 {
-  for ( wxNode *node = GetChildren()->First(); node; node = node->Next() ) {
+  for ( wxNode *node = GetChildren().First(); node; node = node->Next() ) {
     wxWindow *win = (wxWindow *)node->Data();
     if ( win->IsKindOf(CLASSINFO(wxFrame)) ) {
       ((wxFrame *)win)->Iconize(bIconize);
diff --git a/src/msw/gauge95.cpp b/src/msw/gauge95.cpp
index e48513d680..f671fb2c7e 100644
--- a/src/msw/gauge95.cpp
+++ b/src/msw/gauge95.cpp
@@ -81,7 +81,7 @@ bool wxGauge95::Create(wxWindow *parent, wxWindowID id,
 
   SendMessage((HWND) GetHWND(), PBM_SETRANGE, 0, MAKELPARAM(0, range));
 
-  SetFont(* parent->GetFont());
+  SetFont(parent->GetFont());
 
   if (width == -1)
     width = 50;
diff --git a/src/msw/gaugemsw.cpp b/src/msw/gaugemsw.cpp
index 0c33ec4dda..1f82c799c4 100644
--- a/src/msw/gaugemsw.cpp
+++ b/src/msw/gaugemsw.cpp
@@ -128,7 +128,7 @@ bool wxGaugeMSW::Create(wxWindow *parent, wxWindowID id,
   SendMessage((HWND) GetHWND(), ZYZG_SETFGCOLOR, 0, RGB(GetForegroundColour().Red(), GetForegroundColour().Green(), GetForegroundColour().Blue()));
   SendMessage((HWND) GetHWND(), ZYZG_SETBKCOLOR, 0, RGB(GetBackgroundColour().Red(), GetBackgroundColour().Green(), GetBackgroundColour().Blue()));
 
-  SetFont(* parent->GetFont());
+  SetFont(parent->GetFont());
 
   if (width == -1)
     width = 50;
diff --git a/src/msw/imaglist.cpp b/src/msw/imaglist.cpp
index e6ca103540..1ad87888ba 100644
--- a/src/msw/imaglist.cpp
+++ b/src/msw/imaglist.cpp
@@ -167,7 +167,7 @@ bool wxImageList::Draw(int index, wxDC& dc, int x, int y,
 
 	if ( solidBackground )
 	{
-		wxBrush *brush = dc.GetBackground();
+		wxBrush *brush = & dc.GetBackground();
 		if ( brush && brush->Ok())
 		{
 			wxColour col(brush->GetColour());
diff --git a/src/msw/listbox.cpp b/src/msw/listbox.cpp
index c3a7f12755..40f02d0f05 100644
--- a/src/msw/listbox.cpp
+++ b/src/msw/listbox.cpp
@@ -244,7 +244,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
   if ( (m_windowStyle & wxLB_MULTIPLE) == 0 )
     SendMessage(hwnd, LB_SETCURSEL, 0, 0);
 
-  SetFont(* parent->GetFont());
+  SetFont(parent->GetFont());
 
   SetSize(x, y, width, height);
 
@@ -495,7 +495,7 @@ void wxListBox::SetSize(int x, int y, int width, int height, int sizeFlags)
   int cx; // button font dimensions
   int cy;
 
-  wxGetCharSize(GetHWND(), &cx, &cy,GetFont());
+  wxGetCharSize(GetHWND(), &cx, &cy, & GetFont());
 
   float control_width, control_height, control_x, control_y;
 
@@ -540,8 +540,8 @@ void wxListBox::SetHorizontalExtent(const wxString& s)
     int existingExtent = (int)SendMessage(hwnd, LB_GETHORIZONTALEXTENT, 0, 0L);
     HDC dc = GetWindowDC(hwnd);
     HFONT oldFont = 0;
-    if (GetFont() && GetFont()->GetResourceHandle())
-      oldFont = (HFONT) ::SelectObject(dc, (HFONT) GetFont()->GetResourceHandle());
+    if (GetFont().Ok() && GetFont().GetResourceHandle())
+      oldFont = (HFONT) ::SelectObject(dc, (HFONT) GetFont().GetResourceHandle());
 
     GetTextMetrics(dc, &lpTextMetric);
     SIZE extentXY;
@@ -561,8 +561,8 @@ void wxListBox::SetHorizontalExtent(const wxString& s)
     int largestExtent = 0;
     HDC dc = GetWindowDC(hwnd);
     HFONT oldFont = 0;
-    if (GetFont() && GetFont()->GetResourceHandle())
-      oldFont = (HFONT) ::SelectObject(dc, (HFONT) GetFont()->GetResourceHandle());
+    if (GetFont().Ok() && GetFont().GetResourceHandle())
+      oldFont = (HFONT) ::SelectObject(dc, (HFONT) GetFont().GetResourceHandle());
 
     GetTextMetrics(dc, &lpTextMetric);
     int i;
diff --git a/src/msw/mdi.cpp b/src/msw/mdi.cpp
index 953733d50a..61653c10fe 100644
--- a/src/msw/mdi.cpp
+++ b/src/msw/mdi.cpp
@@ -527,7 +527,7 @@ bool wxMDIParentFrame::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control)
   }
   if (id >= wxFIRST_MDI_CHILD && id <= wxLAST_MDI_CHILD)
   {
-    wxNode* node = GetChildren()->First();
+    wxNode* node = GetChildren().First();
     while (node)
     {
         wxWindow* child = (wxWindow*) node->Data();
diff --git a/src/msw/nativdlg.cpp b/src/msw/nativdlg.cpp
index a8b9eb10cc..097db29e59 100644
--- a/src/msw/nativdlg.cpp
+++ b/src/msw/nativdlg.cpp
@@ -96,7 +96,7 @@ wxWindow* wxWindow::GetWindowChild1(wxWindowID& id)
 	if ( m_windowId == id )
 		return this;
 
-	wxNode *node = GetChildren()->First();
+	wxNode *node = GetChildren().First();
 	while ( node )
 	{
 		wxWindow* child = (wxWindow*) node->Data();
diff --git a/src/msw/radiobox.cpp b/src/msw/radiobox.cpp
index fee27add59..f49f7a857d 100644
--- a/src/msw/radiobox.cpp
+++ b/src/msw/radiobox.cpp
@@ -154,7 +154,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
   }
 #endif
 
-  SetFont(* parent->GetFont());
+  SetFont(parent->GetFont());
 
   SubclassWin((WXHWND)m_hWnd);
 
@@ -183,10 +183,10 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
    m_useCtl3D = TRUE;
   }
 #endif
-    if (GetFont())
+    if (GetFont().Ok())
     {
        SendMessage((HWND)m_radioButtons[i],WM_SETFONT,
-                    (WPARAM)GetFont()->GetResourceHandle(),0L);
+                    (WPARAM)GetFont().GetResourceHandle(),0L);
     }
     m_subControls.Append((wxObject *)newId);
   }
@@ -262,7 +262,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
   }
 #endif
 
-  SetFont(* parent->GetFont());
+  SetFont(parent->GetFont());
 
   // Subclass again for purposes of dialog editing mode
   SubclassWin((WXHWND)m_hWnd);
@@ -407,7 +407,7 @@ void wxRadioBox::SetSize(int x, int y, int width, int height, int sizeFlags)
   int current_width, cyf;
 
   int cx1,cy1 ;
-  wxGetCharSize(m_hWnd, &cx1, &cy1, GetFont());
+  wxGetCharSize(m_hWnd, &cx1, &cy1, & GetFont());
   // Attempt to have a look coherent with other platforms:
   // We compute the biggest toggle dim, then we align all
   // items according this value.
@@ -423,7 +423,7 @@ void wxRadioBox::SetSize(int x, int y, int width, int height, int sizeFlags)
     {
       // It's a labelled toggle
       GetWindowText((HWND) m_radioButtons[i], buf, 300);
-      GetTextExtent(buf, &current_width, &cyf,NULL,NULL, GetFont());
+      GetTextExtent(buf, &current_width, &cyf,NULL,NULL, & GetFont());
       eachWidth = (int)(current_width + RADIO_SIZE);
       eachHeight = (int)((3*cyf)/2);
     }
@@ -503,7 +503,7 @@ void wxRadioBox::SetSize(int x, int y, int width, int height, int sizeFlags)
     {
       // It's a labeled item
       GetWindowText((HWND) m_radioButtons[i], buf, 300);
-      GetTextExtent(buf, &current_width, &cyf,NULL,NULL,GetFont());
+      GetTextExtent(buf, &current_width, &cyf,NULL,NULL, & GetFont());
 
       // How do we find out radio button bitmap size!!
       // By adjusting them carefully, manually :-)
diff --git a/src/msw/radiobut.cpp b/src/msw/radiobut.cpp
index 8a222716d2..32bd65e9b8 100644
--- a/src/msw/radiobut.cpp
+++ b/src/msw/radiobut.cpp
@@ -103,7 +103,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id,
   }
 #endif
 
-  SetFont(* parent->GetFont());
+  SetFont(parent->GetFont());
 
   // Subclass again for purposes of dialog editing mode
   SubclassWin((WXHWND)m_hWnd);
@@ -114,7 +114,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id,
   if (label != "")
   {
     int label_width, label_height;
-    GetTextExtent(label, &label_width, &label_height, NULL, NULL, GetFont());
+    GetTextExtent(label, &label_width, &label_height, NULL, NULL, & GetFont());
     if (width < 0)
       width = (int)(label_width + RADIO_SIZE);
     if (height<0)
diff --git a/src/msw/scrolbar.cpp b/src/msw/scrolbar.cpp
index 904fc74ec7..bac5e67a09 100644
--- a/src/msw/scrolbar.cpp
+++ b/src/msw/scrolbar.cpp
@@ -100,7 +100,7 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
     ::SetScrollPos(scroll_bar, SB_CTL, 0, FALSE);
     ShowWindow(scroll_bar, SW_SHOW);
 
-    SetFont(* parent->GetFont());
+    SetFont(parent->GetFont());
 
     m_hWnd = (WXHWND)scroll_bar;
 
diff --git a/src/msw/slider95.cpp b/src/msw/slider95.cpp
index 20f3620080..6e5f9c4ba3 100644
--- a/src/msw/slider95.cpp
+++ b/src/msw/slider95.cpp
@@ -156,7 +156,7 @@ bool wxSlider95::Create(wxWindow *parent, wxWindowID id,
 
   SetWindowText((HWND) m_hWnd, "");
 
-  SetFont(* parent->GetFont());
+  SetFont(parent->GetFont());
 
   if ( m_windowStyle & wxSL_LABELS )
   {
@@ -168,20 +168,19 @@ bool wxSlider95::Create(wxWindow *parent, wxWindowID id,
                              wxGetInstance(), NULL);
 
 
-      if (GetFont())
+      if (GetFont().Ok())
       {
-//        GetFont()->RealizeResource();
-        if (GetFont()->GetResourceHandle())
+        if (GetFont().GetResourceHandle())
         {
 		    if ( m_staticMin )
       		    SendMessage((HWND)m_staticMin,WM_SETFONT,
-                  	    (WPARAM)GetFont()->GetResourceHandle(),0L);
+                  	    (WPARAM)GetFont().GetResourceHandle(),0L);
 		    if ( m_staticMax )
       		    SendMessage((HWND)m_staticMax,WM_SETFONT,
-                      (WPARAM)GetFont()->GetResourceHandle(),0L);
+                      (WPARAM)GetFont().GetResourceHandle(),0L);
       	    if (m_staticValue)
         	    SendMessage((HWND)m_staticValue,WM_SETFONT,
-                        (WPARAM)GetFont()->GetResourceHandle(),0L);
+                        (WPARAM)GetFont().GetResourceHandle(),0L);
         }
       }
   }
@@ -369,7 +368,7 @@ void wxSlider95::SetSize(int x, int y, int width, int height, int sizeFlags)
   int cy;
   int cyf;
 
-  wxGetCharSize(GetHWND(), &cx, &cy,GetFont());
+  wxGetCharSize(GetHWND(), &cx, &cy, & GetFont());
 
   if ((m_windowStyle & wxSL_VERTICAL) != wxSL_VERTICAL)
   {
@@ -378,12 +377,12 @@ void wxSlider95::SetSize(int x, int y, int width, int height, int sizeFlags)
     int min_len = 0;
 
     GetWindowText((HWND) m_staticMin, buf, 300);
-    GetTextExtent(buf, &min_len, &cyf,NULL,NULL, GetFont());
+    GetTextExtent(buf, &min_len, &cyf,NULL,NULL, & GetFont());
 
     int max_len = 0;
 
     GetWindowText((HWND) m_staticMax, buf, 300);
-    GetTextExtent(buf, &max_len, &cyf,NULL,NULL, GetFont());
+    GetTextExtent(buf, &max_len, &cyf,NULL,NULL, & GetFont());
     if (m_staticValue)
     {
       int new_width = (int)(wxMax(min_len, max_len));
@@ -439,11 +438,11 @@ void wxSlider95::SetSize(int x, int y, int width, int height, int sizeFlags)
 	{
     int min_len;
     GetWindowText((HWND) m_staticMin, buf, 300);
-    GetTextExtent(buf, &min_len, &cyf,NULL,NULL,GetFont());
+    GetTextExtent(buf, &min_len, &cyf,NULL,NULL, & GetFont());
 
     int max_len;
     GetWindowText((HWND) m_staticMax, buf, 300);
-    GetTextExtent(buf, &max_len, &cyf,NULL,NULL, GetFont());
+    GetTextExtent(buf, &max_len, &cyf,NULL,NULL, & GetFont());
 
     if (m_staticValue)
     {
diff --git a/src/msw/slidrmsw.cpp b/src/msw/slidrmsw.cpp
index cd2b47760c..28d9a1ac7e 100644
--- a/src/msw/slidrmsw.cpp
+++ b/src/msw/slidrmsw.cpp
@@ -136,22 +136,22 @@ bool wxSliderMSW::Create(wxWindow *parent, wxWindowID id,
                          0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)NewControlId(),
                          wxGetInstance(), NULL);
 
-  SetFont(* parent->GetFont());
+  SetFont(parent->GetFont());
 
-  if (GetFont())
+  if (GetFont().Ok())
   {
 //    GetFont()->RealizeResource();
-    if (GetFont()->GetResourceHandle())
+    if (GetFont().GetResourceHandle())
     {
 		if ( m_staticMin )
       		SendMessage((HWND)m_staticMin,WM_SETFONT,
-                  	(WPARAM)GetFont()->GetResourceHandle(),0L);
+                  	(WPARAM)GetFont().GetResourceHandle(),0L);
 		if ( m_staticMax )
       		SendMessage((HWND)m_staticMax,WM_SETFONT,
-                  (WPARAM)GetFont()->GetResourceHandle(),0L);
+                  (WPARAM)GetFont().GetResourceHandle(),0L);
       	if (m_staticValue)
         	SendMessage((HWND)m_staticValue,WM_SETFONT,
-                    (WPARAM)GetFont()->GetResourceHandle(),0L);
+                    (WPARAM)GetFont().GetResourceHandle(),0L);
     }
   }
 
@@ -340,7 +340,7 @@ void wxSliderMSW::SetSize(int x, int y, int width, int height, int sizeFlags)
   int cy;
   int cyf;
 
-  wxGetCharSize(GetHWND(), &cx, &cy,GetFont());
+  wxGetCharSize(GetHWND(), &cx, &cy,& GetFont());
 
   if ((m_windowStyle & wxSL_VERTICAL) != wxSL_VERTICAL)
   {
@@ -349,12 +349,12 @@ void wxSliderMSW::SetSize(int x, int y, int width, int height, int sizeFlags)
     int min_len = 0;
 
     GetWindowText((HWND) m_staticMin, buf, 300);
-    GetTextExtent(buf, &min_len, &cyf,NULL,NULL, GetFont());
+    GetTextExtent(buf, &min_len, &cyf,NULL,NULL, & GetFont());
 
     int max_len = 0;
 
     GetWindowText((HWND) m_staticMax, buf, 300);
-    GetTextExtent(buf, &max_len, &cyf,NULL,NULL, GetFont());
+    GetTextExtent(buf, &max_len, &cyf,NULL,NULL, & GetFont());
     if (m_staticValue)
     {
       int new_width = (int)(wxMax(min_len, max_len));
@@ -400,11 +400,11 @@ void wxSliderMSW::SetSize(int x, int y, int width, int height, int sizeFlags)
 	{
     int min_len;
     GetWindowText((HWND) m_staticMin, buf, 300);
-    GetTextExtent(buf, &min_len, &cyf,NULL,NULL,GetFont());
+    GetTextExtent(buf, &min_len, &cyf,NULL,NULL,& GetFont());
 
     int max_len;
     GetWindowText((HWND) m_staticMax, buf, 300);
-    GetTextExtent(buf, &max_len, &cyf,NULL,NULL, GetFont());
+    GetTextExtent(buf, &max_len, &cyf,NULL,NULL, & GetFont());
 
     if (m_staticValue)
     {
diff --git a/src/msw/statbmp.cpp b/src/msw/statbmp.cpp
index 0725df9d88..e5070f3546 100644
--- a/src/msw/statbmp.cpp
+++ b/src/msw/statbmp.cpp
@@ -84,7 +84,7 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id,
   // Subclass again for purposes of dialog editing mode
   SubclassWin(m_hWnd);
 
-  SetFont(* GetParent()->GetFont());
+  SetFont(GetParent()->GetFont());
 
   SetSize(x, y, width, height);
   return TRUE;
diff --git a/src/msw/statbox.cpp b/src/msw/statbox.cpp
index 63ddabb570..eb82270972 100644
--- a/src/msw/statbox.cpp
+++ b/src/msw/statbox.cpp
@@ -89,7 +89,7 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID id,
   // Subclass again for purposes of dialog editing mode
   SubclassWin(GetHWND());
 
-  SetFont(* parent->GetFont());
+  SetFont(parent->GetFont());
 
   SetSize(x, y, width, height);
   ShowWindow(wx_button, SW_SHOW);
@@ -131,10 +131,10 @@ void wxStaticBox::SetSize(int x, int y, int width, int height, int sizeFlags)
   int cy;
   int cyf;
 
-  wxGetCharSize(GetHWND(), &cx, &cy,GetFont());
+  wxGetCharSize(GetHWND(), &cx, &cy, & GetFont());
 
   GetTextExtent(wxGetWindowText(m_hWnd), &current_width, &cyf,
-                NULL,NULL,GetFont());
+                NULL,NULL, & GetFont());
   if ( w1 < 0 )
    w1 = current_width + 3*cx;
   if ( h1 < 0 )
diff --git a/src/msw/stattext.cpp b/src/msw/stattext.cpp
index e27866942b..3c7f1df266 100644
--- a/src/msw/stattext.cpp
+++ b/src/msw/stattext.cpp
@@ -86,7 +86,7 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id,
 
   SubclassWin(m_hWnd);
 
-  SetFont(* parent->GetFont());
+  SetFont(parent->GetFont());
   SetSize(x, y, width, height);
 
   return TRUE;
@@ -114,7 +114,7 @@ void wxStaticText::SetSize(int x, int y, int width, int height, int sizeFlags)
   int cyf;
 
   ::GetWindowText((HWND) GetHWND(), buf, 300);
-  GetTextExtent(buf, &current_width, &cyf, NULL, NULL,GetFont());
+  GetTextExtent(buf, &current_width, &cyf, NULL, NULL, & GetFont());
 
   int ww, hh;
   GetSize(&ww, &hh);
@@ -126,7 +126,7 @@ void wxStaticText::SetSize(int x, int y, int width, int height, int sizeFlags)
   {
     int cx;
     int cy;
-    wxGetCharSize(GetHWND(), &cx, &cy,GetFont());
+    wxGetCharSize(GetHWND(), &cx, &cy, & GetFont());
     actualWidth = (int)(current_width + cx) ;
   }
 
@@ -159,7 +159,7 @@ void wxStaticText::SetLabel(const wxString& label)
     ::ScreenToClient((HWND) parent->GetHWND(), &point);
   }
 
-  GetTextExtent(label, &w, &h, NULL, NULL, GetFont());
+  GetTextExtent(label, &w, &h, NULL, NULL, & GetFont());
   MoveWindow((HWND) GetHWND(), point.x, point.y, (int)(w + 10), (int)h,
              TRUE);
   SetWindowText((HWND) GetHWND(), (const char *)label);
diff --git a/src/msw/tbarmsw.cpp b/src/msw/tbarmsw.cpp
index 91bed87c4b..15dd0eafae 100644
--- a/src/msw/tbarmsw.cpp
+++ b/src/msw/tbarmsw.cpp
@@ -348,7 +348,7 @@ wxToolBarTool *wxToolBarMSW::AddTool(int index, const wxBitmap& bitmap, const wx
 
   wxToolBarTool *tool = new wxToolBarTool(index, bitmap, *bitmap2, toggle, xPos, yPos, helpString1, helpString2);
 #else
-  wxToolBarTool *tool = new wxToolBarTool(index, bitmap, (wxBitmap *)NULL, toggle, xPos, yPos, helpString1, helpString2);
+  wxToolBarTool *tool = new wxToolBarTool(index, bitmap, wxNullBitmap, toggle, xPos, yPos, helpString1, helpString2);
 #endif
 
   tool->m_clientData = clientData;
diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp
index 623a803942..0f5afa110a 100644
--- a/src/msw/textctrl.cpp
+++ b/src/msw/textctrl.cpp
@@ -200,9 +200,9 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
 
   SubclassWin(GetHWND());
 
-  if ( parent->GetFont() && parent->GetFont()->Ok() )
+  if ( parent->GetFont().Ok() && parent->GetFont().Ok() )
   {
-  SetFont(* parent->GetFont());
+    SetFont(parent->GetFont());
   }
   else
   {
@@ -328,7 +328,7 @@ void wxTextCtrl::SetSize(int x, int y, int width, int height, int sizeFlags)
   int cx; // button font dimensions
   int cy;
 
-  wxGetCharSize(GetHWND(), &cx, &cy,GetFont());
+  wxGetCharSize(GetHWND(), &cx, &cy, & GetFont());
 
   int control_width, control_height, control_x, control_y;
 
diff --git a/src/msw/window.cpp b/src/msw/window.cpp
index a3ee4e93e1..68cf6d87c2 100644
--- a/src/msw/window.cpp
+++ b/src/msw/window.cpp
@@ -108,9 +108,9 @@ END_EVENT_TABLE()
 // Find an item given the MS Windows id
 wxWindow *wxWindow::FindItem(int id) const
 {
-    if (!GetChildren())
-        return NULL;
-    wxNode *current = GetChildren()->First();
+//    if (!GetChildren())
+//        return NULL;
+    wxNode *current = GetChildren().First();
     while (current)
     {
         wxWindow *childWin = (wxWindow *)current->Data();
@@ -139,9 +139,9 @@ wxWindow *wxWindow::FindItem(int id) const
 // Find an item given the MS Windows handle
 wxWindow *wxWindow::FindItemByHWND(WXHWND hWnd, bool controlOnly) const
 {
-    if (!GetChildren())
-        return NULL;
-    wxNode *current = GetChildren()->First();
+//    if (!GetChildren())
+//        return NULL;
+    wxNode *current = GetChildren().First();
     while (current)
     {
         wxObject *obj = (wxObject *)current->Data() ;
@@ -1594,7 +1594,7 @@ long wxWindow::MSWOnNotify(WXWPARAM wParam, WXLPARAM lParam)
     {
         // Rely on MSWNotify to check whether the message
         // belongs to the window or not
-        wxNode *node = GetChildren()->First();
+        wxNode *node = GetChildren().First();
         while (node)
         {
             wxWindow *child = (wxWindow *)node->Data();
@@ -1818,7 +1818,7 @@ long wxWindow::MSWOnQueryNewPalette()
 // Responds to colour changes: passes event on to children.
 void wxWindow::OnSysColourChanged(wxSysColourChangedEvent& event)
 {
-    wxNode *node = GetChildren()->First();
+    wxNode *node = GetChildren().First();
     while ( node )
     {
         // Only propagate to non-top-level windows
@@ -3493,7 +3493,7 @@ bool wxWindow::IsEnabled(void) const
 // it's an application error (pops up a dialog)
 bool wxWindow::TransferDataToWindow()
 {
-    wxNode *node = GetChildren()->First();
+    wxNode *node = GetChildren().First();
     while ( node )
     {
         wxWindow *child = (wxWindow *)node->Data();
@@ -3513,7 +3513,7 @@ bool wxWindow::TransferDataToWindow()
 // validation failed: don't quit
 bool wxWindow::TransferDataFromWindow()
 {
-    wxNode *node = GetChildren()->First();
+    wxNode *node = GetChildren().First();
     while ( node )
     {
         wxWindow *child = (wxWindow *)node->Data();
@@ -3529,7 +3529,7 @@ bool wxWindow::TransferDataFromWindow()
 
 bool wxWindow::Validate()
 {
-    wxNode *node = GetChildren()->First();
+    wxNode *node = GetChildren().First();
     while ( node )
     {
         wxWindow *child = (wxWindow *)node->Data();
@@ -3556,30 +3556,28 @@ wxWindow *wxWindow::FindFocus()
 
 void wxWindow::AddChild(wxWindow *child)
 {
-    GetChildren()->Append(child);
+    GetChildren().Append(child);
     child->m_windowParent = this;
 }
 
 void wxWindow::RemoveChild(wxWindow *child)
 {
-    if (GetChildren())
-        GetChildren()->DeleteObject(child);
+//    if (GetChildren())
+    GetChildren().DeleteObject(child);
     child->m_windowParent = NULL;
 }
 
 void wxWindow::DestroyChildren()
 {
-    if (GetChildren()) {
         wxNode *node;
-        while ((node = GetChildren()->First()) != (wxNode *)NULL) {
+        while ((node = GetChildren().First()) != (wxNode *)NULL) {
             wxWindow *child;
             if ((child = (wxWindow *)node->Data()) != (wxWindow *)NULL) {
                 delete child;
-                if ( GetChildren()->Member(child) )
+                if ( GetChildren().Member(child) )
                     delete node;
             }
         } /* while */
-    }
 }
 
 void wxWindow::MakeModal(bool modal)
@@ -3794,7 +3792,7 @@ bool wxWindow::DoPhase(int phase)
     {
         noChanges = 0;
         noFailures = 0;
-        wxNode *node = GetChildren()->First();
+        wxNode *node = GetChildren().First();
         while (node)
         {
             wxWindow *child = (wxWindow *)node->Data();
@@ -3839,7 +3837,7 @@ void wxWindow::ResetConstraints()
         constr->centreX.SetDone(FALSE);
         constr->centreY.SetDone(FALSE);
     }
-    wxNode *node = GetChildren()->First();
+    wxNode *node = GetChildren().First();
     while (node)
     {
         wxWindow *win = (wxWindow *)node->Data();
@@ -3898,7 +3896,7 @@ void wxWindow::SetConstraintSizes(bool recurse)
 
     if (recurse)
     {
-        wxNode *node = GetChildren()->First();
+        wxNode *node = GetChildren().First();
         while (node)
         {
             wxWindow *win = (wxWindow *)node->Data();
@@ -4036,9 +4034,9 @@ bool wxWindow::Close(bool force)
 wxObject* wxWindow::GetChild(int number) const
 {
     // Return a pointer to the Nth object in the Panel
-    if (!GetChildren())
-        return(NULL) ;
-    wxNode *node = GetChildren()->First();
+//    if (!GetChildren())
+//        return(NULL) ;
+    wxNode *node = GetChildren().First();
     int n = number;
     while (node && n--)
         node = node->Next() ;
@@ -4100,7 +4098,7 @@ void wxWindow::Fit()
 {
     int maxX = 0;
     int maxY = 0;
-    wxNode *node = GetChildren()->First();
+    wxNode *node = GetChildren().First();
     while ( node )
     {
         wxWindow *win = (wxWindow *)node->Data();
@@ -4133,7 +4131,7 @@ wxWindow *wxWindow::FindWindow(long id)
     if ( GetId() == id)
         return this;
 
-    wxNode *node = GetChildren()->First();
+    wxNode *node = GetChildren().First();
     while ( node )
     {
         wxWindow *child = (wxWindow *)node->Data();
@@ -4150,7 +4148,7 @@ wxWindow *wxWindow::FindWindow(const wxString& name)
     if ( GetName() == name)
         return this;
 
-    wxNode *node = GetChildren()->First();
+    wxNode *node = GetChildren().First();
     while ( node )
     {
         wxWindow *child = (wxWindow *)node->Data();
diff --git a/src/stubs/app.cpp b/src/stubs/app.cpp
index bfe240f225..b04a01bbe2 100644
--- a/src/stubs/app.cpp
+++ b/src/stubs/app.cpp
@@ -326,7 +326,7 @@ bool wxApp::SendIdleEvents(wxWindow* win)
     if (event.MoreRequested())
         needMore = TRUE;
 
-	wxNode* node = win->GetChildren()->First();
+	wxNode* node = win->GetChildren().First();
 	while (node)
 	{
 		wxWindow* win = (wxWindow*) node->Data();
diff --git a/src/stubs/bmpbuttn.cpp b/src/stubs/bmpbuttn.cpp
index 9e46c22b2b..169f0d557a 100644
--- a/src/stubs/bmpbuttn.cpp
+++ b/src/stubs/bmpbuttn.cpp
@@ -30,8 +30,8 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bit
     SetValidator(validator);
     parent->AddChild(this);
 
-    m_backgroundColour = parent->GetDefaultBackgroundColour() ;
-    m_foregroundColour = parent->GetDefaultForegroundColour() ;
+    m_backgroundColour = parent->GetBackgroundColour() ;
+    m_foregroundColour = parent->GetForegroundColour() ;
     m_windowStyle = style;
     m_marginX = 0;
     m_marginY = 0;
diff --git a/src/stubs/data.cpp b/src/stubs/data.cpp
index 6245f1607c..5e6c418519 100644
--- a/src/stubs/data.cpp
+++ b/src/stubs/data.cpp
@@ -15,6 +15,10 @@
 
 #include "wx/wx.h"
 
+#if wxUSE_POSTSCRIPT
+#include "wx/postscrp.h"
+#endif
+
 #define _MAXPATHLEN 500
 
 // Useful buffer, initialized in CommonInit
diff --git a/src/stubs/dc.cpp b/src/stubs/dc.cpp
index 484a44f6fd..642dc1edc5 100644
--- a/src/stubs/dc.cpp
+++ b/src/stubs/dc.cpp
@@ -376,10 +376,10 @@ void wxDC::ComputeScaleAndOrigin(void)
   {
     // this is a bit artificial, but we need to force wxDC to think
     // the pen has changed
-    wxPen* pen = GetPen();
+    wxPen* pen = & GetPen();
     wxPen tempPen;
     m_pen = tempPen;
-    SetPen(pen);
+    SetPen(* pen);
   }
 };
 
diff --git a/src/stubs/dcclient.cpp b/src/stubs/dcclient.cpp
index 36a3f9ccaf..925d9609ee 100644
--- a/src/stubs/dcclient.cpp
+++ b/src/stubs/dcclient.cpp
@@ -15,6 +15,7 @@
 
 #include "wx/dcclient.h"
 #include "wx/dcmemory.h"
+#include "wx/region.h"
 #include <math.h>
 
 //-----------------------------------------------------------------------------
diff --git a/src/stubs/frame.cpp b/src/stubs/frame.cpp
index b12097f5c4..84555cbf01 100644
--- a/src/stubs/frame.cpp
+++ b/src/stubs/frame.cpp
@@ -190,7 +190,7 @@ wxStatusBar *wxFrame::OnCreateStatusBar(int number, long style, wxWindowID id,
 
     // Set the height according to the font and the border size
     wxClientDC dc(statusBar);
-    dc.SetFont(* statusBar->GetFont());
+    dc.SetFont(statusBar->GetFont());
 
     long x, y;
     dc.GetTextExtent("X", &x, &y);
@@ -264,7 +264,7 @@ void wxFrame::SetMenuBar(wxMenuBar *menuBar)
 void wxFrame::Fit()
 {
   // Work out max. size
-  wxNode *node = GetChildren()->First();
+  wxNode *node = GetChildren().First();
   int max_width = 0;
   int max_height = 0;
   while (node)
@@ -321,7 +321,7 @@ void wxFrame::OnSize(wxSizeEvent& event)
 
   // do we have _exactly_ one child?
   wxWindow *child = NULL;
-  for ( wxNode *node = GetChildren()->First(); node; node = node->Next() )
+  for ( wxNode *node = GetChildren().First(); node; node = node->Next() )
   {
     wxWindow *win = (wxWindow *)node->Data();
     if ( !win->IsKindOf(CLASSINFO(wxFrame))  &&
@@ -351,7 +351,7 @@ void wxFrame::OnSize(wxSizeEvent& event)
 // subwindow found.
 void wxFrame::OnActivate(wxActivateEvent& event)
 {
-  for(wxNode *node = GetChildren()->First(); node; node = node->Next())
+  for(wxNode *node = GetChildren().First(); node; node = node->Next())
   {
     // Find a child that's a subwindow, but not a dialog box.
     wxWindow *child = (wxWindow *)node->Data();
diff --git a/src/stubs/scrolbar.cpp b/src/stubs/scrolbar.cpp
index a602748157..54df181166 100644
--- a/src/stubs/scrolbar.cpp
+++ b/src/stubs/scrolbar.cpp
@@ -72,7 +72,7 @@ void wxScrollBar::SetScrollbar(int position, int thumbSize, int range, int pageS
 
 void wxScrollBar::Command(wxCommandEvent& event)
 {
-    SetPosition(event.m_commandInt);
+    SetThumbPosition(event.m_commandInt);
     ProcessCommand(event);
 }
 
diff --git a/src/stubs/stattext.cpp b/src/stubs/stattext.cpp
index a1275b8bdc..3b19c7184d 100644
--- a/src/stubs/stattext.cpp
+++ b/src/stubs/stattext.cpp
@@ -32,8 +32,8 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id,
   SetName(name);
   if (parent) parent->AddChild(this);
 
-  SetBackgroundColour(parent->GetDefaultBackgroundColour()) ;
-  SetForegroundColour(parent->GetDefaultForegroundColour()) ;
+  SetBackgroundColour(parent->GetBackgroundColour()) ;
+  SetForegroundColour(parent->GetForegroundColour()) ;
 
   if ( id == -1 )
   	m_windowId = (int)NewControlId();
@@ -42,7 +42,7 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id,
 
   m_windowStyle = style;
 
-  SetFont(* parent->GetFont());
+  SetFont(parent->GetFont());
 
   // TODO
   return FALSE;
diff --git a/src/stubs/window.cpp b/src/stubs/window.cpp
index fa6aac07b6..10ec3976dd 100644
--- a/src/stubs/window.cpp
+++ b/src/stubs/window.cpp
@@ -378,7 +378,7 @@ void wxWindow::Refresh(bool eraseBack, const wxRect *rect)
 // Responds to colour changes: passes event on to children.
 void wxWindow::OnSysColourChanged(wxSysColourChangedEvent& event)
 {
-    wxNode *node = GetChildren()->First();
+    wxNode *node = GetChildren().First();
     while ( node )
     {
         // Only propagate to non-top-level windows
@@ -583,7 +583,7 @@ bool wxWindow::IsEnabled() const
 // it's an application error (pops up a dialog)
 bool wxWindow::TransferDataToWindow()
 {
-	wxNode *node = GetChildren()->First();
+	wxNode *node = GetChildren().First();
 	while ( node )
 	{
 		wxWindow *child = (wxWindow *)node->Data();
@@ -603,7 +603,7 @@ bool wxWindow::TransferDataToWindow()
 // validation failed: don't quit
 bool wxWindow::TransferDataFromWindow()
 {
-	wxNode *node = GetChildren()->First();
+	wxNode *node = GetChildren().First();
 	while ( node )
 	{
 		wxWindow *child = (wxWindow *)node->Data();
@@ -619,7 +619,7 @@ bool wxWindow::TransferDataFromWindow()
 
 bool wxWindow::Validate()
 {
-	wxNode *node = GetChildren()->First();
+	wxNode *node = GetChildren().First();
 	while ( node )
 	{
 		wxWindow *child = (wxWindow *)node->Data();
@@ -642,30 +642,27 @@ wxWindow *wxWindow::FindFocus()
 
 void wxWindow::AddChild(wxWindow *child)
 {
-    GetChildren()->Append(child);
+    GetChildren().Append(child);
     child->m_windowParent = this;
 }
 
 void wxWindow::RemoveChild(wxWindow *child)
 {
-    if (GetChildren())
-        GetChildren()->DeleteObject(child);
+    GetChildren().DeleteObject(child);
     child->m_windowParent = NULL;
 }
 
 void wxWindow::DestroyChildren()
 {
-  if (GetChildren()) {
     wxNode *node;
-    while ((node = GetChildren()->First()) != (wxNode *)NULL) {
+    while ((node = GetChildren().First()) != (wxNode *)NULL) {
       wxWindow *child;
       if ((child = (wxWindow *)node->Data()) != (wxWindow *)NULL) {
         delete child;
-		if ( GetChildren()->Member(child) )
+		if ( GetChildren().Member(child) )
 			delete node;
       }
     } /* while */
-  }
 }
 
 void wxWindow::MakeModal(bool modal)
@@ -880,7 +877,7 @@ bool wxWindow::DoPhase(int phase)
   {
     noChanges = 0;
     noFailures = 0;
-    wxNode *node = GetChildren()->First();
+    wxNode *node = GetChildren().First();
     while (node)
     {
       wxWindow *child = (wxWindow *)node->Data();
@@ -925,7 +922,7 @@ void wxWindow::ResetConstraints()
     constr->centreX.SetDone(FALSE);
     constr->centreY.SetDone(FALSE);
   }
-  wxNode *node = GetChildren()->First();
+  wxNode *node = GetChildren().First();
   while (node)
   {
     wxWindow *win = (wxWindow *)node->Data();
@@ -984,7 +981,7 @@ void wxWindow::SetConstraintSizes(bool recurse)
 
   if (recurse)
   {
-    wxNode *node = GetChildren()->First();
+    wxNode *node = GetChildren().First();
     while (node)
     {
       wxWindow *win = (wxWindow *)node->Data();
@@ -1121,9 +1118,7 @@ bool wxWindow::Close(bool force)
 wxObject* wxWindow::GetChild(int number) const
 {
   // Return a pointer to the Nth object in the window
-  if (!GetChildren())
-    return(NULL) ;
-  wxNode *node = GetChildren()->First();
+  wxNode *node = GetChildren().First();
   int n = number;
   while (node && n--)
     node = node->Next() ;
@@ -1154,7 +1149,7 @@ void wxWindow::Fit()
 {
 	int maxX = 0;
 	int maxY = 0;
-	wxNode *node = GetChildren()->First();
+	wxNode *node = GetChildren().First();
 	while ( node )
 	{
 		wxWindow *win = (wxWindow *)node->Data();
@@ -1192,7 +1187,7 @@ wxWindow *wxWindow::FindWindow(long id)
 	if ( GetId() == id)
 		return this;
 
-	wxNode *node = GetChildren()->First();
+	wxNode *node = GetChildren().First();
 	while ( node )
 	{
 		wxWindow *child = (wxWindow *)node->Data();
@@ -1209,7 +1204,7 @@ wxWindow *wxWindow::FindWindow(const wxString& name)
 	if ( GetName() == name)
 		return this;
 
-	wxNode *node = GetChildren()->First();
+	wxNode *node = GetChildren().First();
 	while ( node )
 	{
 		wxWindow *child = (wxWindow *)node->Data();
diff --git a/utils/ogl/src/basic.cpp b/utils/ogl/src/basic.cpp
index 4faa132925..2ca8ddaee5 100644
--- a/utils/ogl/src/basic.cpp
+++ b/utils/ogl/src/basic.cpp
@@ -605,7 +605,7 @@ void wxShape::FormatText(wxDC& dc, const wxString& s, int i)
     
   wxShapeRegion *region = (wxShapeRegion *)node->Data();
   region->SetText(s);
-  dc.SetFont(region->GetFont());
+  dc.SetFont(* region->GetFont());
 
   region->GetSize(&w, &h);
 
@@ -919,10 +919,10 @@ void wxShape::OnDrawContents(wxDC& dc)
   GetBoundingBoxMin(&bound_x, &bound_y);
     if (m_regions.Number() < 1) return;
 
-    if (m_pen) dc.SetPen(m_pen);
+    if (m_pen) dc.SetPen(* m_pen);
 
     wxShapeRegion *region = (wxShapeRegion *)m_regions.First()->Data();
-    if (region->GetFont()) dc.SetFont(region->GetFont());
+    if (region->GetFont()) dc.SetFont(* region->GetFont());
 
     dc.SetTextForeground(* (region->GetActualColourObject()));
     dc.SetBackgroundMode(wxTRANSPARENT);
@@ -988,8 +988,8 @@ void wxShape::OnEraseContents(wxDC& dc)
     if (m_pen)
       penWidth = m_pen->GetWidth();
 
-    dc.SetPen(g_oglWhiteBackgroundPen);
-    dc.SetBrush(g_oglWhiteBackgroundBrush);
+    dc.SetPen(* g_oglWhiteBackgroundPen);
+    dc.SetBrush(* g_oglWhiteBackgroundBrush);
     dc.DrawRectangle(WXROUND(topLeftX - penWidth), WXROUND(topLeftY - penWidth),
                       WXROUND(maxX + penWidth*2.0 + 4.0), WXROUND(maxY + penWidth*2.0 + 4.0));
 }
@@ -2535,8 +2535,8 @@ void wxShape::OnDrawControlPoints(wxDC& dc)
   if (!m_drawHandles)
     return;
     
-  dc.SetBrush(wxBLACK_BRUSH);
-  dc.SetPen(wxBLACK_PEN);
+  dc.SetBrush(* wxBLACK_BRUSH);
+  dc.SetPen(* wxBLACK_PEN);
 
   wxNode *node = m_controlPoints.First();
   while (node)
diff --git a/utils/ogl/src/basic2.cpp b/utils/ogl/src/basic2.cpp
index b5bd83af21..ba46cca6fe 100644
--- a/utils/ogl/src/basic2.cpp
+++ b/utils/ogl/src/basic2.cpp
@@ -503,8 +503,8 @@ void wxPolygonShape::OnDraw(wxDC& dc)
     if (m_shadowMode != SHADOW_NONE)
     {
       if (m_shadowBrush)
-        dc.SetBrush(m_shadowBrush);
-      dc.SetPen(g_oglTransparentPen);
+        dc.SetBrush(* m_shadowBrush);
+      dc.SetPen(* g_oglTransparentPen);
 
       dc.DrawPolygon(n, intPoints, WXROUND(m_xpos + m_shadowOffsetX), WXROUND(m_ypos + m_shadowOffsetY));
     }
@@ -512,12 +512,12 @@ void wxPolygonShape::OnDraw(wxDC& dc)
     if (m_pen)
     {
       if (m_pen->GetWidth() == 0)
-        dc.SetPen(g_oglTransparentPen);
+        dc.SetPen(* g_oglTransparentPen);
       else
-        dc.SetPen(m_pen);
+        dc.SetPen(* m_pen);
     }
     if (m_brush)
-      dc.SetBrush(m_brush);
+      dc.SetBrush(* m_brush);
     dc.DrawPolygon(n, intPoints, WXROUND(m_xpos), WXROUND(m_ypos));
 
     delete[] intPoints;
@@ -525,7 +525,7 @@ void wxPolygonShape::OnDraw(wxDC& dc)
 
 void wxPolygonShape::OnDrawOutline(wxDC& dc, double x, double y, double w, double h)
 {
-  dc.SetBrush(wxTRANSPARENT_BRUSH);
+  dc.SetBrush(* wxTRANSPARENT_BRUSH);
   // Multiply all points by proportion of new size to old size
   double x_proportion = (double)(fabs(w/m_originalWidth));
   double y_proportion = (double)(fabs(h/m_originalHeight));
@@ -879,8 +879,8 @@ void wxRectangleShape::OnDraw(wxDC& dc)
     if (m_shadowMode != SHADOW_NONE)
     {
       if (m_shadowBrush)
-        dc.SetBrush(m_shadowBrush);
-      dc.SetPen(g_oglTransparentPen);
+        dc.SetBrush(* m_shadowBrush);
+      dc.SetPen(* g_oglTransparentPen);
 
       if (m_cornerRadius != 0.0)
         dc.DrawRoundedRectangle(WXROUND(x1 + m_shadowOffsetX), WXROUND(y1 + m_shadowOffsetY),
@@ -892,12 +892,12 @@ void wxRectangleShape::OnDraw(wxDC& dc)
     if (m_pen)
     {
       if (m_pen->GetWidth() == 0)
-        dc.SetPen(g_oglTransparentPen);
+        dc.SetPen(* g_oglTransparentPen);
       else
-        dc.SetPen(m_pen);
+        dc.SetPen(* m_pen);
     }
     if (m_brush)
-      dc.SetBrush(m_brush);
+      dc.SetBrush(* m_brush);
 
     if (m_cornerRadius != 0.0)
       dc.DrawRoundedRectangle(WXROUND(x1), WXROUND(y1), WXROUND(m_width), WXROUND(m_height), m_cornerRadius);
@@ -1049,8 +1049,8 @@ void wxEllipseShape::OnDraw(wxDC& dc)
     if (m_shadowMode != SHADOW_NONE)
     {
       if (m_shadowBrush)
-        dc.SetBrush(m_shadowBrush);
-      dc.SetPen(g_oglTransparentPen);
+        dc.SetBrush(* m_shadowBrush);
+      dc.SetPen(* g_oglTransparentPen);
       dc.DrawEllipse((long) ((m_xpos - GetWidth()/2) + m_shadowOffsetX),
                       (long) ((m_ypos - GetHeight()/2) + m_shadowOffsetY),
                       (long) GetWidth(), (long) GetHeight());
@@ -1059,12 +1059,12 @@ void wxEllipseShape::OnDraw(wxDC& dc)
     if (m_pen)
     {
       if (m_pen->GetWidth() == 0)
-        dc.SetPen(g_oglTransparentPen);
+        dc.SetPen(* g_oglTransparentPen);
       else
-        dc.SetPen(m_pen);
+        dc.SetPen(* m_pen);
     }
     if (m_brush)
-      dc.SetBrush(m_brush);
+      dc.SetBrush(* m_brush);
     dc.DrawEllipse((long) (m_xpos - GetWidth()/2), (long) (m_ypos - GetHeight()/2), (long) GetWidth(), (long) GetHeight());
 }
 
diff --git a/utils/ogl/src/composit.cpp b/utils/ogl/src/composit.cpp
index 366777b25f..c5118f64e7 100644
--- a/utils/ogl/src/composit.cpp
+++ b/utils/ogl/src/composit.cpp
@@ -101,8 +101,8 @@ void wxCompositeShape::OnDraw(wxDC& dc)
   if (m_shadowMode != SHADOW_NONE)
   {
     if (m_shadowBrush)
-      dc.SetBrush(m_shadowBrush);
-    dc.SetPen(g_oglTransparentPen);
+      dc.SetBrush(* m_shadowBrush);
+    dc.SetPen(* g_oglTransparentPen);
 
     if (m_cornerRadius != 0.0)
       dc.DrawRoundedRectangle(WXROUND(x1 + m_shadowOffsetX), WXROUND(y1 + m_shadowOffsetY),
@@ -841,7 +841,7 @@ wxDivisionShape::~wxDivisionShape()
 
 void wxDivisionShape::OnDraw(wxDC& dc)
 {
-    dc.SetBrush(wxTRANSPARENT_BRUSH);
+    dc.SetBrush(* wxTRANSPARENT_BRUSH);
     dc.SetBackgroundMode(wxTRANSPARENT);
 
     double x1 = (double)(GetX() - (GetWidth()/2.0));
@@ -856,18 +856,18 @@ void wxDivisionShape::OnDraw(wxDC& dc)
 
     if (m_leftSide)
     {
-      dc.SetPen(m_leftSidePen);
+      dc.SetPen(* m_leftSidePen);
       dc.DrawLine(WXROUND(x1), WXROUND(y2), WXROUND(x1), WXROUND(y1));
     }
     if (m_topSide)
     {
-      dc.SetPen(m_topSidePen);
+      dc.SetPen(* m_topSidePen);
       dc.DrawLine(WXROUND(x1), WXROUND(y1), WXROUND(x2), WXROUND(y1));
     }
 
     // For testing purposes, draw a rectangle so we know
     // how big the division is.
-//    SetBrush(wxCYAN_BRUSH);
+//    SetBrush(* wxCYAN_BRUSH);
 //    wxRectangleShape::OnDraw(dc);
 }
 
diff --git a/utils/ogl/src/divided.cpp b/utils/ogl/src/divided.cpp
index 68fa6ca646..ba8cd615ac 100644
--- a/utils/ogl/src/divided.cpp
+++ b/utils/ogl/src/divided.cpp
@@ -81,7 +81,7 @@ void wxDividedShape::OnDrawContents(wxDC& dc)
   double leftX = (double)(m_xpos - (m_width / 2.0));
   double rightX = (double)(m_xpos + (m_width / 2.0));
 
-  if (m_pen) dc.SetPen(m_pen);
+  if (m_pen) dc.SetPen(* m_pen);
 
   if (m_textColour) dc.SetTextForeground(* m_textColour);
 
@@ -108,7 +108,7 @@ void wxDividedShape::OnDrawContents(wxDC& dc)
   while (node)
   {
     wxShapeRegion *region = (wxShapeRegion *)node->Data();
-    dc.SetFont(region->GetFont());
+    dc.SetFont(* region->GetFont());
     dc.SetTextForeground(* region->GetActualColourObject());
 
     double proportion =
@@ -128,7 +128,7 @@ void wxDividedShape::OnDrawContents(wxDC& dc)
       wxPen *regionPen = region->GetActualPen();
       if (regionPen)
       {
-        dc.SetPen(regionPen);
+        dc.SetPen(* regionPen);
         dc.DrawLine(WXROUND(leftX), WXROUND(y), WXROUND(rightX), WXROUND(y));
       }
     }
diff --git a/utils/ogl/src/drawn.cpp b/utils/ogl/src/drawn.cpp
index d602580b86..e473681512 100644
--- a/utils/ogl/src/drawn.cpp
+++ b/utils/ogl/src/drawn.cpp
@@ -431,7 +431,7 @@ void wxOpSetGDI::Do(wxDC& dc, double xoffset, double yoffset)
       if (m_image->m_outlineColours.Member((wxObject *)m_gdiIndex))
       {
         if (m_image->m_outlinePen)
-          dc.SetPen(m_image->m_outlinePen);
+          dc.SetPen(* m_image->m_outlinePen);
       }
       else
       {
@@ -440,7 +440,7 @@ void wxOpSetGDI::Do(wxDC& dc, double xoffset, double yoffset)
         {
           wxPen *pen = (wxPen *)node->Data();
           if (pen)
-            dc.SetPen(pen);
+            dc.SetPen(* pen);
         }
       }
       break;
@@ -456,14 +456,14 @@ void wxOpSetGDI::Do(wxDC& dc, double xoffset, double yoffset)
         {
           wxBrush *br = wxTheBrushList->FindOrCreateBrush(m_image->m_outlinePen->GetColour(), wxSOLID);
           if (br)
-            dc.SetBrush(br);
+            dc.SetBrush(* br);
         }
       }
       else if (m_image->m_fillColours.Member((wxObject *)m_gdiIndex))
       {
         if (m_image->m_fillBrush)
         {
-          dc.SetBrush(m_image->m_fillBrush);
+          dc.SetBrush(* m_image->m_fillBrush);
         }
       }
       else
@@ -473,7 +473,7 @@ void wxOpSetGDI::Do(wxDC& dc, double xoffset, double yoffset)
         {
           wxBrush *brush = (wxBrush *)node->Data();
           if (brush)
-            dc.SetBrush(brush);
+            dc.SetBrush(* brush);
         }
       }
       break;
@@ -485,7 +485,7 @@ void wxOpSetGDI::Do(wxDC& dc, double xoffset, double yoffset)
       {
         wxFont *font = (wxFont *)node->Data();
         if (font)
-          dc.SetFont(font);
+          dc.SetFont(* font);
       }
       break;
     }
@@ -1194,7 +1194,7 @@ void wxOpPolyDraw::ReadExpr(wxPseudoMetaFile *image, wxExpr *expr)
 // Draw an outline using the current operation.
 bool wxOpPolyDraw::OnDrawOutline(wxDC& dc, double x, double y, double w, double h, double oldW, double oldH)
 {
-    dc.SetBrush(wxTRANSPARENT_BRUSH);
+    dc.SetBrush(* wxTRANSPARENT_BRUSH);
 
     // Multiply all points by proportion of new size to old size
     double x_proportion = (double)(fabs(w/oldW));
diff --git a/utils/ogl/src/lines.cpp b/utils/ogl/src/lines.cpp
index a44bb7d2c6..a62cffbfa3 100644
--- a/utils/ogl/src/lines.cpp
+++ b/utils/ogl/src/lines.cpp
@@ -216,7 +216,7 @@ void wxLineShape::FormatText(wxDC& dc, const wxString& s, int i)
     
   wxShapeRegion *region = (wxShapeRegion *)node->Data();
   region->SetText(s);
-  dc.SetFont(region->GetFont());
+  dc.SetFont(* region->GetFont());
 
   region->GetSize(&w, &h);
   // Initialize the size if zero
@@ -284,15 +284,15 @@ void wxLineShape::DrawRegion(wxDC& dc, wxShapeRegion *region, double x, double y
   // First, clear a rectangle for the text IF there is any
   if (region->GetFormattedText().Number() > 0)
   {
-      dc.SetPen(g_oglWhiteBackgroundPen);
-      dc.SetBrush(g_oglWhiteBackgroundBrush);
+      dc.SetPen(* g_oglWhiteBackgroundPen);
+      dc.SetBrush(* g_oglWhiteBackgroundBrush);
 
       // Now draw the text
-      if (region->GetFont()) dc.SetFont(region->GetFont());
+      if (region->GetFont()) dc.SetFont(* region->GetFont());
 
       dc.DrawRectangle((long)(xp - w/2.0), (long)(yp - h/2.0), (long)w, (long)h);
 
-      if (m_pen) dc.SetPen(m_pen);
+      if (m_pen) dc.SetPen(* m_pen);
       dc.SetTextForeground(* region->GetActualColourObject());
 
 #ifdef __WXMSW__
@@ -320,8 +320,8 @@ void wxLineShape::EraseRegion(wxDC& dc, wxShapeRegion *region, double x, double
 
   if (region->GetFormattedText().Number() > 0)
   {
-      dc.SetPen(g_oglWhiteBackgroundPen);
-      dc.SetBrush(g_oglWhiteBackgroundBrush);
+      dc.SetPen(* g_oglWhiteBackgroundPen);
+      dc.SetBrush(* g_oglWhiteBackgroundBrush);
 
       dc.DrawRectangle((long)(xp - w/2.0), (long)(yp - h/2.0), (long)w, (long)h);
   }
@@ -727,8 +727,8 @@ void wxLineShape::DrawArrow(wxDC& dc, wxArrowHead *arrow, double xOffset, bool p
       points[2].x = (int) side2_x; points[2].y = (int) side2_y;
       points[3].x = (int) tip_x; points[3].y = (int) tip_y;
 
-      dc.SetPen(m_pen);
-      dc.SetBrush(m_brush);
+      dc.SetPen(* m_pen);
+      dc.SetBrush(* m_brush);
       dc.DrawPolygon(4, points);
       break;
     }
@@ -748,11 +748,11 @@ void wxLineShape::DrawArrow(wxDC& dc, wxArrowHead *arrow, double xOffset, bool p
       double x1 = (double)(x - (diameter/2.0));
       double y1 = (double)(y - (diameter/2.0));
 
-      dc.SetPen(m_pen);
+      dc.SetPen(* m_pen);
       if (arrow->_GetType() == ARROW_HOLLOW_CIRCLE)
-        dc.SetBrush(g_oglWhiteBackgroundBrush);
+        dc.SetBrush(* g_oglWhiteBackgroundBrush);
       else
-        dc.SetBrush(m_brush);
+        dc.SetBrush(* m_brush);
 
       dc.DrawEllipse((long) x1, (long) y1, (long) diameter, (long) diameter);
       break;
@@ -854,7 +854,7 @@ void wxLineShape::OnErase(wxDC& dc)
 
     double bound_x, bound_y;
     GetBoundingBoxMax(&bound_x, &bound_y);
-    if (m_font) dc.SetFont(m_font);
+    if (m_font) dc.SetFont(* m_font);
 
     // Undraw text regions
     for (int i = 0; i < 3; i++)
@@ -870,8 +870,8 @@ void wxLineShape::OnErase(wxDC& dc)
     }
 
     // Undraw line
-    dc.SetPen(g_oglWhiteBackgroundPen);
-    dc.SetBrush(g_oglWhiteBackgroundBrush);
+    dc.SetPen(* g_oglWhiteBackgroundPen);
+    dc.SetBrush(* g_oglWhiteBackgroundBrush);
 
     // Drawing over the line only seems to work if the line has a thickness
     // of 1.
@@ -1177,9 +1177,9 @@ void wxLineShape::OnDraw(wxDC& dc)
   if (m_lineControlPoints)
   {
     if (m_pen)
-      dc.SetPen(m_pen);
+      dc.SetPen(* m_pen);
     if (m_brush)
-      dc.SetBrush(m_brush);
+      dc.SetBrush(* m_brush);
 
     int n = m_lineControlPoints->Number();
     wxPoint *points = new wxPoint[n];
@@ -1211,7 +1211,7 @@ void wxLineShape::OnDraw(wxDC& dc)
       wxPen *solid_pen =
         wxThePenList->FindOrCreatePen(m_pen->GetColour(), 1, wxSOLID);
       if (solid_pen)
-        dc.SetPen(solid_pen);
+        dc.SetPen(* solid_pen);
     }
     DrawArrows(dc);
   }
@@ -1813,7 +1813,7 @@ void wxLineShape::OnSizingBeginDragLeft(wxControlPoint* pt, double x, double y,
 
   if (lpt->m_type == CONTROL_POINT_ENDPOINT_FROM || lpt->m_type == CONTROL_POINT_ENDPOINT_TO)
   {
-    m_canvas->SetCursor(g_oglBullseyeCursor);
+    m_canvas->SetCursor(* g_oglBullseyeCursor);
     lpt->m_oldCursor = wxSTANDARD_CURSOR;
   }
 }
@@ -1847,7 +1847,7 @@ void wxLineShape::OnSizingEndDragLeft(wxControlPoint* pt, double x, double y, in
   if (lpt->m_type == CONTROL_POINT_ENDPOINT_FROM)
   {
     if (lpt->m_oldCursor)
-      m_canvas->SetCursor(lpt->m_oldCursor);
+      m_canvas->SetCursor(* lpt->m_oldCursor);
 
 //    this->Erase(dc);
 
@@ -1861,7 +1861,7 @@ void wxLineShape::OnSizingEndDragLeft(wxControlPoint* pt, double x, double y, in
   if (lpt->m_type == CONTROL_POINT_ENDPOINT_TO)
   {
     if (lpt->m_oldCursor)
-      m_canvas->SetCursor(lpt->m_oldCursor);
+      m_canvas->SetCursor(* lpt->m_oldCursor);
 
 //    lpt->m_xpos = x; lpt->m_ypos = y;
 
@@ -2429,11 +2429,11 @@ void wxLabelShape::OnDraw(wxDC& dc)
     if (m_pen)
     {
       if (m_pen->GetWidth() == 0)
-        dc.SetPen(g_oglTransparentPen);
+        dc.SetPen(* g_oglTransparentPen);
       else
-        dc.SetPen(m_pen);
+        dc.SetPen(* m_pen);
     }
-    dc.SetBrush(wxTRANSPARENT_BRUSH);
+    dc.SetBrush(* wxTRANSPARENT_BRUSH);
 
     if (m_cornerRadius > 0.0)
       dc.DrawRoundedRectangle(WXROUND(x1), WXROUND(y1), WXROUND(m_width), WXROUND(m_height), m_cornerRadius);
diff --git a/utils/ogl/src/ogldiag.cpp b/utils/ogl/src/ogldiag.cpp
index 86a2025290..3961607b18 100644
--- a/utils/ogl/src/ogldiag.cpp
+++ b/utils/ogl/src/ogldiag.cpp
@@ -93,7 +93,7 @@ void wxDiagram::Redraw(wxDC& dc)
   if (m_shapeList)
   {
     if (GetCanvas())
-      GetCanvas()->SetCursor(wxHOURGLASS_CURSOR);
+      GetCanvas()->SetCursor(* wxHOURGLASS_CURSOR);
     wxNode *current = m_shapeList->First();
 
     while (current)
@@ -105,7 +105,7 @@ void wxDiagram::Redraw(wxDC& dc)
       current = current->Next();
     }
     if (GetCanvas())
-      GetCanvas()->SetCursor(wxSTANDARD_CURSOR);
+      GetCanvas()->SetCursor(* wxSTANDARD_CURSOR);
   }
 }
 
-- 
2.50.0

