Search found 120 matches

by Cursor
Wed May 24, 2006 2:04 pm
Forum: C++ Development
Topic: wxMDIClientWindow Paint event
Replies: 5
Views: 882

I cant test here but something like thatshould work : class MyClient : public wxMDIClientWindow{ protected: DECLARE_EVENT_TABLE() void OnEraseBg(wxEraseEvent& event); ... }; void MyClient::OnEraseBg(wxEraseEvent& event){ event.GetDC().DrawImage(...); // Blit your image directly. } BEGIN_EVENT_TABLE(...
by Cursor
Wed May 24, 2006 12:21 pm
Forum: C++ Development
Topic: wxMDIClientWindow Paint event
Replies: 5
Views: 882

As said in the wxMDIParentFrame doc [1], you must derive wxMDIClientWindow to implement your background paint and override wxMDIParentFrame::OnCreateClient to explicitly use your own wxMDIClientWindow class. [1] : http://www.wxwidgets.org/manuals/2.6.3/wx_wxmdiparentframe.html#wxmdiparentframeoncrea...
by Cursor
Wed May 24, 2006 11:57 am
Forum: C++ Development
Topic: wxMDIClientWindow Paint event
Replies: 5
Views: 882

wxPaintEvent is sent to the window to repaint and not to its parent, so if you want to redraw child client area, you must intercept draw event for wxMDIClientWindow. You just have to overide wxMDIClientWindow and intercept wxPaintEvent as you do but for wxMDIClientWindow derived class. Note that wxP...
by Cursor
Wed May 24, 2006 11:31 am
Forum: C++ Development
Topic: wxdc::SelectObject + assertion
Replies: 3
Views: 665

What is your plateform and wx version ?

Please dump the code of the function where you use SelectObject call.
by Cursor
Wed May 24, 2006 10:14 am
Forum: C++ Development
Topic: wxdc::SelectObject + assertion
Replies: 3
Views: 665

Is it really wxDC::SelectObject or wxMemoryDC::SelectObject ?
Please dump the code of your function.
And if it is not shown in your code, precise the color mode of your bitmap.
by Cursor
Thu Feb 02, 2006 6:36 am
Forum: C++ Development
Topic: how to draw text symbols
Replies: 6
Views: 1670

Ok, I hadnt tested it on wxGTK (it must do it a day), I only use that on Windows and it work perfectly.
by Cursor
Wed Feb 01, 2006 5:28 pm
Forum: C++ Development
Topic: how to draw text symbols
Replies: 6
Views: 1670

When you create a wxFont object, you can set a font face like "webdings" or "wingdings" (or what you want).
This fonts are symbol-oriented, you can use it to draw such symbols.
by Cursor
Wed Feb 01, 2006 6:38 am
Forum: C++ Development
Topic: how to draw text symbols
Replies: 6
Views: 1670

Yes you can, but - as all text software - you must change the font you use. If you select a symbol font (1& 2) and use it with wxDC::DrawText, the text is writted with symbols. 1 : http://www.wxwidgets.org/manuals/2.6.2/wx_wxfont.html#wxfont 2 : http://www.wxwidgets.org/manuals/2.6.2/wx_wxdc.html#wx...
by Cursor
Wed Feb 01, 2006 6:34 am
Forum: C++ Development
Topic: How to use wxWindow::ConvertDialogToPixels
Replies: 2
Views: 992

The DPI (1) is a standard "density of point" measure. For the screen, we must speak about PPI (2) "Pixel per Inch" that is generally 72, 96 or 144.

1 : http://en.wikipedia.org/wiki/Dpi
2 : http://en.wikipedia.org/wiki/Pixels_per_inch
by Cursor
Sun Jan 29, 2006 9:57 am
Forum: C++ Development
Topic: wxTreeCtrl context menu
Replies: 2
Views: 1658

You can use the bool PopupMenu(wxMenu* menu, const wxPoint& pos = wxDefaultPosition) with the wxDefaultPosition at third param, it will automatically place the menu at mouse position. And if you really want to show your menu at the right side of the item, you can use wxTreeCtrl::GetBoundingRect [1] ...
by Cursor
Mon Jan 23, 2006 6:13 am
Forum: C++ Development
Topic: virtual bool OnInit()?
Replies: 6
Views: 1777

This is the normal C++ definition.
When a base-class function is declared as virtual, all overriden implementation are virtual. With or without the virtual keyword.

If you want a function with the same prototype but not virtual, you must change its name.
by Cursor
Wed Jan 18, 2006 5:51 pm
Forum: Component Writing
Topic: Thread Joinable
Replies: 4
Views: 1524

Oh, excuse-me, as I see you write thread1->Run(); thread2->Run(); I think you wana use many threads. What I want to say is you count all thread you run and when it finish, you decrement. When the count is zero, you can exit the app. The wait function can not work as you use it because wxThread::wait...
by Cursor
Tue Jan 17, 2006 6:15 am
Forum: General Development
Topic: Problem to convert into Bitmap from wxTextCtrl
Replies: 2
Views: 787

You probably can not capture all the wxTextCtrl canva because, it probably dont store it completly.

IMHO, the wxTextCtrl (and all its specific implementation) use a local drawing function so if you want to draw it, you must paint it yourself based on the wxTextCtrl text-style infos.
by Cursor
Tue Jan 17, 2006 6:11 am
Forum: Component Writing
Topic: Thread Joinable
Replies: 4
Views: 1524

Hello.

As thread are based on the same class, why don't you put a static counter of running thread with one or two functions to access it (with mutexes) in order to count how many thread is running and you can wait (while) until all thread have returned.
by Cursor
Tue Jan 10, 2006 6:04 am
Forum: C++ Development
Topic: wxString to double
Replies: 9
Views: 1757

What about use a wxStringTokenizer [1] to separate substrings and use wxString::ToDouble [2] to translate on double.


1 : http://www.wxwidgets.org/manuals/2.6.2/ ... gtokenizer
2 : http://www.wxwidgets.org/manuals/2.6.2/ ... ngtodouble