Search found 99 matches

by Disch
Fri Feb 22, 2008 4:15 pm
Forum: C++ Development
Topic: wx stalling after modal dialog exits
Replies: 6
Views: 694

wxYield does not appear to help. I tried putting it in a few places (after the ShowModal call, after deleteing my dialog object in Go(), etc) and nowhere seemed to make a difference. To try and narrow down the problem I put in wxMessageBoxes in the same places to see where the delay is occuring. It ...
by Disch
Fri Feb 22, 2008 3:02 pm
Forum: C++ Development
Topic: wx stalling after modal dialog exits
Replies: 6
Views: 694

wx stalling after modal dialog exits

I'm making an NES emulator with wxWidgets (it's working out great so far!) I'm working on my input config dialog, where I let the user set their buttons and stuff. Everything works -- but I've noticed an odd delay that happens after you set a button. Here's an image of my input config dialog to give...
by Disch
Tue Feb 05, 2008 2:15 am
Forum: C++ Development
Topic: Assigning a program icon
Replies: 2
Views: 565

mc2r wrote:Look at wxTopLevelWindow::SetIcon()
*feels dumb*

forgot all about wxTopLevelWindow >_<

Ah well, I knew it was something simple. Thanks.
by Disch
Tue Feb 05, 2008 1:26 am
Forum: C++ Development
Topic: Assigning a program icon
Replies: 2
Views: 565

Assigning a program icon

This seems like such a simple question, but I've been looking all day and I can't find anything that directly addresses it either in the docs, on the wiki, or on these forums (or I'm just doing a bad job of searching -- which is possible). I want to assign my executable an icon, so that the icon app...
by Disch
Sun Nov 18, 2007 6:49 pm
Forum: C++ Development
Topic: documentation error?: wxImage::RemoveHandler
Replies: 1
Views: 217

documentation error?: wxImage::RemoveHandler

I'm using wxWidgets 2.8.6 on Windows 2000. wxImage::RemoveHandler documentation indicates the following: Finds the handler with the given name, and removes it. The handler is not deleted. Yet I ran into problems using it -- and after tracing found that it is actually deleteing the handler: image.cpp...
by Disch
Thu Nov 15, 2007 4:18 pm
Forum: C++ Development
Topic: Only allow specific client sizes
Replies: 1
Views: 397

I was tinkering around with this some more. I was looking at Freeze/Thaw pairs and thought I might be able to use them to prevent the size from redrawing the window. So I threw this test program together (which asserts that the client area is always perfectly square): #include <wx/wx.h> class MyFram...
by Disch
Fri Nov 09, 2007 10:58 pm
Forum: C++ Development
Topic: Only allow specific client sizes
Replies: 1
Views: 397

Only allow specific client sizes

I want to make it so that the user can resize my main window frame, but I want it to "snap" to specific sizes. For example, I would want the client area to be some multiple of 256. So 256x256, 512x512 would be acceptable, but anywhere in between wouldn't be. I am handling the Size event for my main ...
by Disch
Sat Oct 20, 2007 5:18 pm
Forum: C++ Development
Topic: The "main loop"
Replies: 12
Views: 3558

One theory I had ( which I didn't test! ) was to hijack the event loop in an idle event. Something like: void MyApp::OnIdle(wxIdleEvent& event) { event.Skip(); if(inidle) return; inidle = 1; while(wantprogramopen) { /* hijacked new program loop */ while(Pending()) Dispatch(); /* do whatever else you...
by Disch
Wed Oct 17, 2007 2:29 am
Forum: C++ Development
Topic: The "main loop"
Replies: 12
Views: 3558

I'm really interested in this too. For the program I'm working on, I need constant CPU attention. The easiest way for me to do what I want is to manually pump the event queue. The alternatives I've been considering (creating a seperate thread, using idle events) are much less appealing and would rea...