User forums > Using Code::Blocks

How to define new frame type in wxSmith? To add a worker thread.

(1/1)

paddle:
Using codeblocks17.12 + wxwidgets 3.1.2 + wxsmith project template.

I need to add a worker thread as discussed on this wxwidget forum topic : https://forums.wxwidgets.org/viewtopic.php?f=1&t=46472

Someone supplied me a demo, but writen on raw wxwidgets. As I am using wxsmith there are some structure differences that makes things different.

One issue is that the demo declares a new frame type deriving from wxFrame, in which he adds a thread class.

My issue is that on wxSmith template created by the CodeBlocks new wxwidgets project, I can't find where the frame class is defined.

In XxxApp.cpp (where Xxx is the project name) there's :


--- Code: ---XxxFrame* Frame = new XxxFrame(0);
--- End code ---

But I cannot find where the XxxFrame is defined.

In XxxMain.cpp there's :


--- Code: ---//(*InternalHeaders(XxxFrame)
#include <wx/intl.h>
#include <wx/string.h>
//*)

//(*IdInit(XxxFrame)
const long XxxFrame::ID_PANEL1 = wxNewId();
const long XxxFrame::idMenuQuit = wxNewId();
const long XxxFrame::idMenuAbout = wxNewId();
const long XxxFrame::ID_STATUSBAR1 = wxNewId();
//*)

XxxFrame::XxxFrame (wxWindow* parent,wxWindowID id)
{
...
--- End code ---
But nothing like :


--- Code: ---class XxxFrame : public wxFrame
{
public:
    ...
};
--- End code ---
How can I add some changes to the Frame class to add my thread class?

Alternatively, if someone have a demo for a wxsmith project with a worker thread that would be really awesome.

Thanks!

Miguel Gimenez:
The frame is defined in XxxMain.h

paddle:
Thanks!

Navigation

[0] Message Index

Go to full version