]> git.saurik.com Git - wxWidgets.git/blobdiff - demos/forty/pile.cpp
new wxUSE_xxx variables must be in chkconf.h
[wxWidgets.git] / demos / forty / pile.cpp
index 4622829964ff0846062289f4ff76fbbe2b52a093..34796835c164503f4bea7a7a7c0219856a279ce8 100644 (file)
@@ -40,6 +40,8 @@
 #include <string.h>
 #include "card.h"
 #include "pile.h"
+#include "forty.h"
+#include "canvas.h"
 
 #include "wx/app.h"
 
@@ -75,12 +77,11 @@ Pile::Pile(int x, int y, int dx, int dy)
 //+-------------------------------------------------------------+
 void Pile::Redraw(wxDC& dc )
 {
-   wxWindow *frame = wxTheApp->GetTopWindow();
+   FortyFrame *frame = (FortyFrame*) wxTheApp->GetTopWindow();
    wxWindow *canvas = (wxWindow *) NULL;
    if (frame)
    {
-     wxNode *node = frame->GetChildren().First();
-     if (node) canvas = (wxWindow*)node->Data();
+       canvas = frame->GetCanvas();
    }
 
        if (m_topCard >= 0)