Search found 99 matches

by Disch
Wed Feb 04, 2009 2:34 pm
Forum: C++ Development
Topic: Generic way to intercept an event before processing ?
Replies: 9
Views: 2430

My understanding is that FilterEvent does not prevent the iconize from happening, it just prevents it from sending an event to the window.

Can you just omit the wxMINIMIZE_BOX flag from the window style for your frame to prevent the user from attempting to iconize the window?
by Disch
Mon Jan 26, 2009 9:16 pm
Forum: Compiler / Linking / IDE Related
Topic: C++ Precompiled Headers in VS2002
Replies: 6
Views: 1893

C++ Precompiled Headers in VS2002

Hey. I'm completely new to the whole precompiled header thing. Up until now I haven't been using them, and have just been enduring the compile times. Now I'm interested in trying out precompiled headers to see if they can cut down on compile time. I checked the wiki and available documentation, and ...
by Disch
Mon Jan 26, 2009 4:00 pm
Forum: C++ Development
Topic: Send sel change events from wxListBox derived
Replies: 2
Views: 1219

Thanks for the reply! Good to know I can create it on the stack. I was worried about ownership issues but it's great that I don't have to worry about that. I did a bit more research after my first post and it looks like wxCommand::Command() does pretty much exactly what I want. wxCommandEvent kind o...
by Disch
Sun Jan 25, 2009 9:19 pm
Forum: C++ Development
Topic: Send sel change events from wxListBox derived
Replies: 2
Views: 1219

Send sel change events from wxListBox derived

I derived a class from wxListBox which has the ability to remove items from the list via a call to Delete(). The thing is, Delete() does not send any selection changing events to the parent window.. and I would like this to happen. So my question is how do I manually notify the parent window of a se...
by Disch
Fri Jan 23, 2009 12:11 am
Forum: C++ Development
Topic: RTTI, dynamic casting, wxClientData questions
Replies: 6
Views: 2042

RTTI, dynamic casting, wxClientData questions

I'm trying to tie some data to entries in a list box. I'm doing this by deriving a class (called SourceInfo) from wxClientData, and supplying it to my call to Append() when adding items to the list box. I had problems downcasting from wxClientData* to SourceInfo*. I ran through the RTTI section in t...
by Disch
Fri Jan 16, 2009 10:30 pm
Forum: General Development
Topic: Hiding top level windows before destroying
Replies: 2
Views: 867

I'm having problems logging onto to the tracker -- logging in keeps taking me to the registration page. Blech.

Whatever -- too much hassle for something not that important. If anyone else wants to bring this to the developers' attention, I'd be grateful, but I'm not going to bother.

Thanks.
by Disch
Fri Jan 16, 2009 7:13 pm
Forum: General Development
Topic: Hiding top level windows before destroying
Replies: 2
Views: 867

Hiding top level windows before destroying

This isn't so much of a question as much as a way to avoid a weird visual quirk when destroying top level windows (like frames, dialogs). I suppose it's also a feature request for future versions of wx. I honestly didn't know which forum to post this in -- this one seemed like the most appropriate. ...
by Disch
Tue Nov 04, 2008 3:45 pm
Forum: C++ Development
Topic: Quick delete question
Replies: 6
Views: 2105

I know this is solved and you're using vectors now, but I felt I should mention this anyway: Since you were using new[] for all items, you should use delete[] for all, too. vsp's code suggestion had the right idea, but he made a somewhat critical mistake: for(int i=0; i<cagestotal; i++) { delete[] c...
by Disch
Sun Oct 26, 2008 11:24 pm
Forum: C++ Development
Topic: Big Flickers using wxGLCanvas
Replies: 6
Views: 1471

You're trying to draw one window (canvas_OpenGL) from another window's (Window) Paint event. This isn't the right way to approach this. You want to draw to canvas_OpenGL in canvas_OpenGL's paint event -- not in Window's paint event. This means you should do the following: 1) derive a class from wxGL...
by Disch
Sun Oct 26, 2008 6:28 pm
Forum: C++ Development
Topic: Big Flickers using wxGLCanvas
Replies: 6
Views: 1471

I also I see you create wxPaintDC(this). It seemd like you,re catching the paint even of the window, and drawing on the window. Instead, catch the paint event of the GL cavas and draw on the GL canvas. See the wiki for a full example. Ah you're right. Looks like he's trying to paint to window A fro...
by Disch
Sun Oct 26, 2008 5:20 pm
Forum: C++ Development
Topic: Big Flickers using wxGLCanvas
Replies: 6
Views: 1471

Catch the Erase Background event and have it do nothing. ///////////////////////////////////////////////// BEGIN_EVENT_TABLE(GLCanvasBase,wxGLCanvas) EVT_PAINT(GLCanvasBase::OnPaint) EVT_ERASE_BACKGROUND(GLCanvasBase::OnEraseBG) END_EVENT_TABLE() ///////////////////////////////////////////////// voi...
by Disch
Fri Oct 24, 2008 3:21 pm
Forum: C++ Development
Topic: wxStaticBox as a parent
Replies: 2
Views: 895

Re: wxStaticBox as a parent

Whoops. I totally missed that blurb in the docs about how you shouldn't use wxStaticBox as a parent for controls. I'd assume this also means you shouldn't use it as a parent for GL canvases on those platforms... right? With that in mind I tried the next thing I could think of, which was to put a sec...
by Disch
Fri Oct 24, 2008 2:29 am
Forum: C++ Development
Topic: wxStaticBox as a parent
Replies: 2
Views: 895

wxStaticBox as a parent

I recently was having troubles with a wxGLCanvas in a panel on my dialog. I've gotten this to work on dialogs before with the exact same code, so I was baffled. After a bit of tinkering I realized the problem was that I was trying to put my GLCanvas inside a wxStaticBoxSizer with the panel as the pa...
by Disch
Mon Oct 20, 2008 2:48 pm
Forum: C++ Development
Topic: wxSizerItem::DeleteWindows
Replies: 4
Views: 1245

Ah!

Such an obvious solution and yet I didn't think of it. Putting each chunk in a panel will actually be much easier.

Thanks!
by Disch
Mon Oct 20, 2008 2:26 pm
Forum: C++ Development
Topic: wxSizerItem::DeleteWindows
Replies: 4
Views: 1245

Yuk... so I have to manually traverse each element in the sizer -- and then recursively step through any included sizers? What exactly is the point of DeleteWindows then?