Search found 122 matches

by Xangis
Fri Jan 29, 2010 9:08 pm
Forum: Component Writing
Topic: Associating a file with my application - Reg
Replies: 2
Views: 1435

Setting a file association is not normally done from within a program. It's more common to set file associations using the installer. For instance, I use InnoSetup for my Windows installs, and in one part of that install process I set registry entries that associate file types with my app. If you're...
by Xangis
Fri Jan 29, 2010 9:04 pm
Forum: Component Writing
Topic: Howto set focus on DrawRectangle
Replies: 2
Views: 1077

If yours is a standard control, you should also be able to call SetFocus() on it from a mouse down event handler if that's what you're looking for.
by Xangis
Fri Jan 29, 2010 7:00 pm
Forum: Component Writing
Topic: Custom wxControl Component Size Problem (Size Ignored)
Replies: 2
Views: 1861

Custom wxControl Component Size Problem (Size Ignored)

Since I'm having trouble with keyboard events in a wxSlider control, I'm building one from scratch to get the behavior I'm looking for (including being based on float values and allowing bitmaps for slider and indicator). It almost works right. The problem I'm having is that when I create the contro...
by Xangis
Fri Jan 29, 2010 4:29 pm
Forum: Component Writing
Topic: wxSlider Processing Problem With wxKeyEvent (ding)
Replies: 3
Views: 2587

wxSlider Processing Problem With wxKeyEvent (ding)

I have a custom control, a wxBitmapSlider derived from wxSlider. It allows an optional custom bitmap for the slider and thumb. I have key down and key up events attached to this control. _modWheel = new wxBitmapSlider( itemDialog1, ID_MODWHEEL, 0, 0, 16383, wxDefaultPosition, wxSize( 30, 108 ), wxSL...
by Xangis
Sun Jan 03, 2010 8:38 pm
Forum: Platform Related Issues
Topic: XPM Image Preview in Windows Explorer?
Replies: 1
Views: 699

XPM Image Preview in Windows Explorer?

While not specifically a code question, I'm curious about this: In Windows Explorer (on Vista and 7), I see icon image previews for .bmp, .jpg, .ico, and .png files, but Windows does not natively recognize XPM as an image type. Is there a plugin, registry setting, filter, or somesuch that would enab...
by Xangis
Sat Dec 12, 2009 2:27 pm
Forum: Platform Related Issues
Topic: ConfusingEvent Handler Error When Compiling On Linux
Replies: 2
Views: 691

Thank you. I wouldn't expect that to make a difference, but it does -- works like a charm.
by Xangis
Sat Dec 12, 2009 4:35 am
Forum: Platform Related Issues
Topic: ConfusingEvent Handler Error When Compiling On Linux
Replies: 2
Views: 691

ConfusingEvent Handler Error When Compiling On Linux

I'm manually posting and creating an update command event with 2.8.9, and it compiles and works great on Windows. When trying to compile on Linux, I get an error: wxMyDlg.cpp:151: error: no matching function for call to ‘wxRichTextCtrl::AddPendingEvent(wxCommandEvent)’ /usr/include/wx-2.8/wx/event.h...
by Xangis
Wed Dec 02, 2009 4:44 am
Forum: C++ Development
Topic: What Is The Right Threading Strategy For This?
Replies: 11
Views: 1794

Well, it looks like I've come up with a workaround. It doesn't solve the problem of coming up with a new event type that works, but it does the trick using a command event. The event table has: EVT_COMMAND(IDM_TEXT_UPDATE, wxEVT_NULL, MyDlg::FlushText ) Instead of embedding parameters in my event, I...
by Xangis
Wed Dec 02, 2009 3:27 am
Forum: C++ Development
Topic: What Is The Right Threading Strategy For This?
Replies: 11
Views: 1794

Thank you for the tip on the string copy. I stepped through the copy code and verified that I do get at least as far as the event being copied. The output wxRichTextCtrl is updated from two places. The sample event I posted is called from the OnKey handler for the input window (I echo all commands t...
by Xangis
Wed Dec 02, 2009 2:08 am
Forum: C++ Development
Topic: What Is The Right Threading Strategy For This?
Replies: 11
Views: 1794

It feels like I'm so close, but just not quite there yet. Here are all of the variations I've tried and none have worked: this->AddPendingEvent(wxTextOutputEvent(inputbuf, true, clrWhite )); wxEvtHandler::AddPendingEvent(wxTextOutputEvent(inputbuf, true, clrWhite )); this->GetEventHandler()->AddPend...
by Xangis
Mon Nov 30, 2009 5:48 pm
Forum: C++ Development
Topic: What Is The Right Threading Strategy For This?
Replies: 11
Views: 1794

Thank you, that has been quite helpful. I'm having a bit of trouble with posting events, though. I've scoured the historical posts, but haven't found a clear solution -- When I call wxEvtHandler::ProcessEvent everything works. When I call wxEvtHandler::AddPendingEvent, the event disappears into the ...
by Xangis
Tue Nov 24, 2009 3:04 pm
Forum: C++ Development
Topic: What Is The Right Threading Strategy For This?
Replies: 11
Views: 1794

What Is The Right Threading Strategy For This?

I have an application that is basically a glorified telnet client. There is a wxThread that processes incoming messages and adds them to a wxRichTextBox. The UI can also cause that wxRichTextBox to be updated, mainly when the user issues commands that are echoed to that text box. The trouble with th...
by Xangis
Sun Dec 16, 2007 3:06 am
Forum: C++ Development
Topic: Can catch EVT_KEY_DOWN but not EVT_CHAR
Replies: 2
Views: 1159

Yes, I am calling event.GetKeyCode(). Thank you for trying -- I hadn't thought to look at the wxKeyboard sample again. It didn't help, but at least reassured me that I was doing the key handling right. The problem ended up being caused by my change of wxWidgets versions. I was using the default cons...
by Xangis
Thu Dec 13, 2007 8:20 pm
Forum: C++ Development
Topic: Best Way To Do Custom Window Borders?
Replies: 2
Views: 564

OK, I'll give that a try and report back with my results.
by Xangis
Thu Dec 13, 2007 8:19 pm
Forum: C++ Development
Topic: Can catch EVT_KEY_DOWN but not EVT_CHAR
Replies: 2
Views: 1159

Can catch EVT_KEY_DOWN but not EVT_CHAR

I have an application that I want to catch the translated character codes in. If I use this event table I get nothing in my OnKey handler: BEGIN_EVENT_TABLE(SDLPanel, wxPanel) EVT_CHAR(SDLPanel::OnKey ) END_EVENT_TABLE() If I use this event table I get keypress events in my OnKey handler: BEGIN_EVEN...