Search found 1249 matches

by T-Rex
Sat May 07, 2005 4:28 pm
Forum: C++ Development
Topic: [solved]Problem with wxMouseEvent
Replies: 11
Views: 4259

#include <wx/wx.h> #include <wx/datetime.h> class MyApp : public wxApp { public: virtual bool OnInit(); }; class myPanel : public wxPanel { public: // class constructor myPanel(wxWindow* parent); // class destructor ~myPanel(); void onMouseDown(wxMouseEvent& event); private: DECLARE_EVENT_TABLE...
by T-Rex
Sat May 07, 2005 7:38 am
Forum: Platform Related Issues
Topic: w2k wxWidgets2.4.2 wxHatch1.33 simple make problem.
Replies: 6
Views: 2397

But IMHO wxHatch is not the best choice if IDE.... I had some problems using it under Linux etc... but it is better than notepad, certainly :)
by T-Rex
Sat May 07, 2005 7:35 am
Forum: Platform Related Issues
Topic: w2k wxWidgets2.4.2 wxHatch1.33 simple make problem.
Replies: 6
Views: 2397

if your *.lib files are in wxMSW242/lib/vc_lib and wxHatch needs *lib files to be placed in wxMSW242/lib then you should have a monolythic build of wxWidgets. You can create the monolythic build using VC workspace or makefiles in wxMSW242/src directory. In this case wxMSW242/lib/wxmsw.lib and wxMSW2...
by T-Rex
Fri May 06, 2005 9:01 pm
Forum: Platform Related Issues
Topic: w2k wxWidgets2.4.2 wxHatch1.33 simple make problem.
Replies: 6
Views: 2397

try to rename your wxWidgets folder to 8 characters name... e.g. wxMSW242 and change the path in wxHatch.... I used it only once long time ago and I don't remember where to change the path.... there should be the way how to do it. :)
by T-Rex
Mon May 02, 2005 9:04 pm
Forum: C++ Development
Topic: Menu help for menu titles?
Replies: 4
Views: 1556

This must be what you need #include <wx/wx.h> #include <wx/notebook.h> class MyApp : public wxApp { public: virtual bool OnInit(); }; class MyFrame : public wxFrame { public: MyFrame(wxWindow * parent); }; MyFrame::MyFrame(wxWindow * parent) : wxFrame(parent, -1, "Test", wxPoint(100,100), ...
by T-Rex
Thu Apr 28, 2005 8:24 pm
Forum: C++ Development
Topic: Repaint confusion
Replies: 8
Views: 2758

If you send me all the project (or a part of the source), I'll try to help you.
by T-Rex
Thu Apr 28, 2005 11:32 am
Forum: C++ Development
Topic: Repaint confusion
Replies: 8
Views: 2758

If you move the code to EVT_ERASE_BACKGROUND method, then you shouldn't use an empty EVT_PAINT handler. This must be the problem why you can't close the window.
Just comment EVT_PAINT macro and see, if this helps.
by T-Rex
Thu Apr 28, 2005 10:38 am
Forum: C++ Development
Topic: wxWindow GetPosition ...How about setting the position?
Replies: 6
Views: 2776

Code: Select all

void Move(int x, int y)
void Move(const wxPoint& pt)
by T-Rex
Thu Apr 28, 2005 10:36 am
Forum: C++ Development
Topic: Repaint confusion
Replies: 8
Views: 2758

use wxScrolledWindow
it has virtual void OnDraw(wxDC & dc);
and also you must create an empty EVT_ERASE_BACKGROUND handler to avoid flickering

Or try to put all painting code to EVT_ERASE_BACKGROUND handler of the frame, but in this case you have to use wxClientDC
by T-Rex
Wed Apr 27, 2005 6:45 pm
Forum: C++ Development
Topic: Help newbie with program plz
Replies: 2
Views: 1241

#include <wx/wx.h> #include <wx/image.h> #include <wx/bmpbuttn.h> #include <wx/dcclient.h> #include <wx/dcmemory.h> #include <wx/dc.h> wxString num2str(long a); int getPixRed(wxImage img, int x, int y); class wxImageApp : public wxApp { virtual bool OnInit() ; }; IMPLEMENT_APP(wxImageApp); // class...
by T-Rex
Wed Apr 27, 2005 5:42 pm
Forum: C++ Development
Topic: Event handling in wxFrame
Replies: 3
Views: 1580

#include <wx/wx.h> class MyApp : public wxApp { public: virtual bool OnInit(); }; class MyFrame : public wxFrame { public: MyFrame(wxWindow * parent); DECLARE_EVENT_TABLE() void OnMouseDown(wxMouseEvent & event); }; BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_LEFT_DOWN(MyFrame::OnMouseDown) END_EVE...
by T-Rex
Mon Apr 25, 2005 7:41 pm
Forum: C++ Development
Topic: ZLIB and ZSTREAMS (please help!!)
Replies: 10
Views: 3068

wxString archivePath = "myzipfile.zip"; wxString path = "SomeFolder/somefile.txt"; wxZipInputStream zipstream(archivePath, path); if(zipstream.IsOk()) { wxString paramStr = ""; while(!zipstream.Eof()) { paramStr += zipstream.GetC(); } // Do smth with paramStr }
by T-Rex
Mon Apr 25, 2005 6:10 pm
Forum: C++ Development
Topic: Repaint confusion
Replies: 8
Views: 2758

Use wxPaintDC in EVT_PAINT handler use smth like that wxPaintDC dc(this); wxBitmap bmp(x_size, y_size); wxMemoryDC mdc; mdc.SelectObject(bmp); mdc.BeginDrawing(); // Draw smth on mdc; mdc.EndDrawing(); dc.Blit(0,0,x_size, y_size,&mdc,0,0); Drawing on wxMemoryDC removes flicker. Also you can use ...
by T-Rex
Sat Apr 23, 2005 9:05 pm
Forum: Compiler / Linking / IDE Related
Topic: msw+mingw+makefiles -> command not found: not [1]
Replies: 3
Views: 2207

if not exist gcc_msw mkdir gcc_msw
try to move
mkdir gcc_msw
to the next line
by T-Rex
Sun Apr 10, 2005 8:28 am
Forum: C++ Development
Topic: wxGLCanvas constructor [RESOLVED]
Replies: 2
Views: 1322

setup.h must be copied from inculde/wx/msw to include/wx after changing wxUSE_GLCANVAS parameter.