Search found 186 matches

by geralds
Mon Dec 19, 2005 7:04 pm
Forum: C++ Development
Topic: wxFindReplaceDialog and wxStyledTextCtrl
Replies: 1
Views: 595

wxFindReplaceDialog and wxStyledTextCtrl

I want my wxStyledTextCtrl to handle EVT_FIND, EVT_FIND_NEXT, EVT_FIND_REPLACE and EVT_FIND_REPLACE_ALL as sent by a wxFindReplaceDialog.

I've added them to my main frame's event table and written basic member functions to handle EVT_FIND and EVT_FIND_NEXT, but I get unexpected results in some cases
by geralds
Wed Dec 14, 2005 1:07 pm
Forum: C++ Development
Topic: AcceleratorTable issue with wxMenu
Replies: 6
Views: 1167

Do you need to use an accelerator table? You could add handlers for EVT_CHAR (for 'a' or '<') or EVT_KEY_DOWN (for WXK_RETURN etc.) to your frame's event table. BEGIN_EVENT_TABLE(MainFrm, wxFrame) EVT_CHAR(MainFrm::OnChar) EVT_KEY_DOWN(MainFrm::OnKeyDown) END_EVENT_TABLE() void MainFrm::OnChar(wxKey...
by geralds
Sun Dec 11, 2005 9:46 pm
Forum: C++ Development
Topic: Querying width of toolbars
Replies: 2
Views: 713

Thanks prophet, I tried it but it didn't work. I need the width to arrange toolbars in a wxCoolBar (the default handler in wxCoolBar.cpp uses the win->GetSize().GetWidth() notation and produces inelegant layouts). I think I may start a separate thread under components to address some of the issues w...
by geralds
Fri Dec 09, 2005 8:29 pm
Forum: C++ Development
Topic: Querying width of toolbars
Replies: 2
Views: 713

Querying width of toolbars

Is there any way of querying the width of toolbars? If I use // toolBar is a pointer to wxToolBar toolBar->GetSize().GetWidth(); the value returned is always 392, regardless of the actual width of the toolbar. I'm not sure if this is relevant, but I'm using Dev-C++/Windows/wxW Unicode 2.6.1. I'd be ...
by geralds
Wed Dec 07, 2005 9:47 am
Forum: C++ Development
Topic: MDI and portability
Replies: 4
Views: 1181

I spent a fair bit of time getting my head round the event routes of the Doc/MDI framework. Although I started from the sample app there were lots of things I had to override to achieve the expected behaviour (e.g. the framework provides a default handler for wxID_OPEN, but the dialog that comes up ...
by geralds
Tue Dec 06, 2005 9:51 pm
Forum: C++ Development
Topic: Opening Word document from wxWidgets code
Replies: 6
Views: 1490

Alternatively, you could use automation to do this. See ...\Examples\wxWidgets\oleauto for details. #include <wx/msw/ole/automtn.h> void MyFrame::OnFileOpen() { wxAutomationObject wordObject; if (!wordObject.GetInstance(_T("Word.Application"))) { if (!wordObject.CreateInstance(_T("Word.Application")...
by geralds
Mon Dec 05, 2005 1:31 pm
Forum: C++ Development
Topic: Any questios about Wxwidgets!
Replies: 2
Views: 601

madjer, if you're using the Unicode build, you will need to specify a conversion class to get the correct multibyte string. For example: // myUnicodeWxString is a wxString std::string s(myUnicodeWxString.mb_str(wxConvUTF8)); That said, c_str is still useful if you don't want a conversion and you're ...
by geralds
Thu Dec 01, 2005 10:39 pm
Forum: C++ Development
Topic: wxCoolBar Sample
Replies: 5
Views: 1330

Has anyone found a workaround for menubar activation using the Alt+F etc.? The wxCoolBar documentation points out that this feature isn't yet available, but I was wondering if something could be done from outside wxCoolBar. If I define an accelerator table containing Alt+F and I handle the unused co...
by geralds
Thu Dec 01, 2005 12:38 pm
Forum: C++ Development
Topic: Alternatives to Document/View MDI
Replies: 8
Views: 1595

wxCoolBar works fine for me on Windows using Dev-C++. (I had to add _T()s around the literal strings to make it compile using the Unicode build of wxW, but apart from that it's fine and it does resize.) It won't work with the doc-view command processor -- at least not without tweaking -- but then I'...
by geralds
Thu Dec 01, 2005 9:59 am
Forum: C++ Development
Topic: Alternatives to Document/View MDI
Replies: 8
Views: 1595

Excellent article. Thanks for the link! (My choice is a master application window with a wxCoolBar for tools and a wxNotebook containing the documents.)
by geralds
Wed Nov 30, 2005 5:27 pm
Forum: C++ Development
Topic: Alternatives to Document/View MDI
Replies: 8
Views: 1595

Thanks Priyank and SnakeChomp, that's very helpful.
by geralds
Wed Nov 30, 2005 2:04 pm
Forum: C++ Development
Topic: Alternatives to Document/View MDI
Replies: 8
Views: 1595

Alternatives to Document/View MDI

I've run into so much trouble using the Document/View MDI framework that I've decided not to use it anymore. The issue list was growing every week: no File Open dialog accepting multiple files, mysterious trouble with keyboard shortcuts listed in menus, hard-to-follow event route, display error for ...
by geralds
Wed Nov 23, 2005 5:03 pm
Forum: C++ Development
Topic: Opening and closing menubar toggles keyboard shortcuts
Replies: 3
Views: 684

Just literally clicking on the menubar (thus opening, say, the File menu) and then clicking somewhere in the document, closing the menubar.

It's the kind of operation that I was expecting to do nothing at all, but the effect on the shortcuts is consistent.
by geralds
Wed Nov 23, 2005 1:03 pm
Forum: C++ Development
Topic: Opening and closing menubar toggles keyboard shortcuts
Replies: 3
Views: 684

I'm beginning to think this may just be a bug. The only workaround that I've been able to find is leaving out the "\tCtrl+S" part of the menu item string and defining the relevant shortcuts for the frame. (It's strange not having the shortcut shown next to the menu item, but then I think most people...
by geralds
Tue Nov 22, 2005 12:38 pm
Forum: C++ Development
Topic: Opening and closing menubar toggles keyboard shortcuts
Replies: 3
Views: 684

Opening and closing menubar toggles keyboard shortcuts

Something very odd is happening in my document-view MDI application (I'm using the Unicode version of the Windows port, but this may or may not be platform-specific). When I open and close the menubar (regardless of whether I select a menu option), some but not all of the keyboard shortcuts cease to...