Search found 61 matches

by arucard
Sat Dec 01, 2007 2:31 pm
Forum: C++ Development
Topic: wxScrolledWindow repainting question
Replies: 2
Views: 750

In MyScrolledWindowDumb::NextLine function, you are posting paint event to redraw window. But generating paint events is an OS-specific task. If you want to redraw your window, call Refresh() instead. This will generate paint event in the right way.
by arucard
Sat Dec 01, 2007 1:58 pm
Forum: C++ Development
Topic: Text on wxGLCanvas flash
Replies: 5
Views: 1688

I believe you cannot mix OpenGL and DC rendering on the same pane. But you can place wxStaticText control somewhere on wxGLCanvas and use it to show what you want. This obviously isn't the right way when you need to move text according to your view transformation (like labels for axis in 3d graph) ...
by arucard
Wed Oct 17, 2007 6:56 pm
Forum: C++ Development
Topic: OpenGL DIB Section Offscreen Rendering
Replies: 5
Views: 1966

What about using FBO extension and render into texture? Texels can be then queried through standard GL mechanism. This would also remain portability. Not sure if your program is required to run on old hardware too, you couldn't use it then.
by arucard
Wed Oct 17, 2007 2:07 pm
Forum: C++ Development
Topic: filling a circle with an image
Replies: 1
Views: 562

1. load your image into a bitmap
2. create mask by drawing white circle into black background
3. assign created mask to your bitmap
4. draw bitmap on the canvas
by arucard
Tue Oct 09, 2007 12:13 pm
Forum: Compiler / Linking / IDE Related
Topic: OpenGl OnSize event trouble
Replies: 1
Views: 817

Because OnPaint isn't called when shrinking the frame unless you add wxFULL_REPAINT_ON_RESIZE to wxGLCanvas constructor
by arucard
Mon Oct 08, 2007 8:57 am
Forum: Open Discussion
Topic: Heap and two-dim array with std:.vector
Replies: 1
Views: 1255

1) Incorrect. If you create instance of the C class by calling operator new, you get the class and all its data allocated on the heap. This is the right way. Also your constructor body has weird syntax, data initialization can't be done this way. 2) See your second post 3) every new has its delete.....
by arucard
Mon Oct 08, 2007 8:47 am
Forum: Open Discussion
Topic: Heap allocation of vector<T>
Replies: 3
Views: 1310

Code: Select all

typedef std::vector<std::vector<int> > matrix_t;
matrix_t* m = new matrix_t(5);
for (size_t i = 0; i < m->size(); i++)
  m->resize(5);
But, why do you do this? Often it is better to use some math library for matrix like classes or simple old [] for multidimensional arrays.
by arucard
Tue Sep 25, 2007 2:55 pm
Forum: C++ Development
Topic: How to get a list of network interfaces and their IPs?
Replies: 6
Views: 1808

I used the pcap library for similar things. I remember I was able to get list of MAC address for all installed adapters. Perhaps you can try it, it is a more mature way of getting this sort of things then parsing ipconfig:)
by arucard
Tue Sep 25, 2007 2:26 pm
Forum: C++ Development
Topic: wxWidgets and OpenGL full screen antialiasing (extensions)
Replies: 11
Views: 2242

Well I didn't used this specific extension but I recently also ran into some problems with GL under wx. My problem was that glEnable and some other functions didn't work when called from the GLCanvas constructor (maybe because SetCurrent didn't work, I didn't investigate it further). I don't know if...
by arucard
Wed Sep 12, 2007 11:21 pm
Forum: C++ Development
Topic: wxWidgets and OpenGL full screen antialiasing (extensions)
Replies: 11
Views: 2242

I have used GLEW with wxWidgets with no problems. You are right, that Set/GetPixelFormat functions are platform dependant (they are from Windows API). But you don't _need_ to use them. Simply derive your your canvas-like class from wxGLCanvas and let wxWidgets do it for you portably. Sometime after ...
by arucard
Tue Feb 28, 2006 6:07 pm
Forum: C++ Development
Topic: wxFileConfig and location of INI files
Replies: 1
Views: 1005

Create wxFileConfig like this:

Code: Select all

new wxFileConfig(wxEmptyString, wxEmptyString, full_path_to_your_config)
by arucard
Sat Feb 25, 2006 4:05 pm
Forum: C++ Development
Topic: SetLabel and AddCheckTool
Replies: 9
Views: 1755

Your errors come probably from the situation that you are using XRCID and don't linking over all xrc libraries. But you don't need XRCID at all. I have put it there because I use it but you may not. Simply put there an integer id which you have used when you have called AddCheckTool function
by arucard
Sat Feb 25, 2006 3:52 pm
Forum: Announcements and Discoveries
Topic: wxIFM Patches
Replies: 5
Views: 2164

The for cycle in file definterface.cpp on line 275 (in function GetContainer) should be reversed. Change from: for( wxIFMComponentList::const_iterator i = m_containers.begin(), end = m_containers.end(); i != end; ++i ) to for( wxIFMComponentList::const_reverse_iterator i = m_containers.rbegin(), end...
by arucard
Fri Feb 24, 2006 12:13 pm
Forum: C++ Development
Topic: SetLabel and AddCheckTool
Replies: 9
Views: 1755

I use this for setting the label and it works for me:

Code: Select all

wxToolBarToolBase *tool;
tool = ToolBar->FindById(XRCID("ID_SOMEID"));
tool->SetLabel("new label");
by arucard
Thu Feb 09, 2006 11:59 am
Forum: Compiler / Linking / IDE Related
Topic: How do you use contrib library ?
Replies: 6
Views: 1558

brajul wrote:I've installed wxpropgrid-1.1.3-win.exe

Then I want to compile it

wxWidgets-2.6.2/contrib/build/propgrid
$ make makefile.gcc

the result => make: Nothing to be done for `makefile.gcc'.

How do you use the makefile with a contrib ?
Try make -f makefile.gcc