Search found 58 matches

by jgeorgal
Thu Jul 10, 2008 12:15 am
Forum: C++ Development
Topic: Selecting a part of image and zoom
Replies: 4
Views: 1386

From the documentation of wxImage: // get the bitmap from somewhere wxBitmap initialBmp = ...; wxRect rect(...); wxBitmap bmp = initialBmp.GetSubBitmap(rect); // rescale it to have size of 32*32 if ( bmp.GetWidth() != 32 || bmp.GetHeight() != 32 ) { wxImage image = bmp.ConvertToImage(); bmp = wxBitm...
by jgeorgal
Wed Jul 02, 2008 2:03 pm
Forum: C++ Development
Topic: wxRichTextCtrl: Changing the selection color (style)
Replies: 1
Views: 694

Ok. I found the relevant code in "richtextbuffer.cpp:5275". It seems that you cannot change it. It just takes the color from the system's style. I'll probably edit the code to allow the optional definition of a different color. Do you think such a change would be accepted in the official d...
by jgeorgal
Mon Jun 30, 2008 8:03 pm
Forum: C++ Development
Topic: wxRichTextCtrl: Changing the selection color (style)
Replies: 1
Views: 694

wxRichTextCtrl: Changing the selection color (style)

Hello,

Is there a way to change the selection (wxRichTextCtrl::SetSelection) color or style of a wxrichtextctrl (e.g. to something different than the default blue)?

Thank you,
Giannis
by jgeorgal
Tue Dec 19, 2006 10:51 pm
Forum: C++ Development
Topic: 'Cancel' instead of 'Annuleren'
Replies: 9
Views: 2705

I don't mean to translate my whole application, I mean to translate the Cancel and Help button. But how do I do that? I already looked into that internat sample, but the Cancel button wasnt translated. If you want to change *all* the buttons then the only way to do it is to follow the i18n process ...
by jgeorgal
Tue Dec 19, 2006 10:29 pm
Forum: C++ Development
Topic: How to stop program termination ?
Replies: 7
Views: 1518

Hi, You can use the "signal" function to catch the abnormal termination of your application. Check the documentation at: http://msdn2.microsoft.com/en-gb/library/xdkz3x12(VS.80).aspx Note that the signal function is also available on Unix systems ... so this method is portable. Regards, Gi...
by jgeorgal
Tue Dec 19, 2006 12:49 pm
Forum: C++ Development
Topic: 'Cancel' instead of 'Annuleren'
Replies: 9
Views: 2705

Hi, Check the internationalization sample in your wx distribution: http://www.wxwidgets.org/manuals/2.6.3/wx_samples.html#sampleinternat Also, I recommend using poEdit (http://www.poedit.org/) for the translation of your application. Lastly, be sure to copy the corresponding "po" (is it da...
by jgeorgal
Tue Dec 19, 2006 9:33 am
Forum: C++ Development
Topic: compare ...wxImage or wxBitmap
Replies: 3
Views: 1399

In addition to the above suggestions, If you want to do a somewhat "fuzzy" matching of the images and be able to discover similar or the same images even if they have different sizes you can calculate and compare their color histograms: http://en.wikipedia.org/wiki/Color_histogram Regards,...
by jgeorgal
Tue Dec 19, 2006 9:27 am
Forum: C++ Development
Topic: Get the time zone
Replies: 5
Views: 2107

Hello,

Have a look at the wxDateTime class:
http://www.wxwidgets.org/manuals/2.6.3/ ... etime.html

Additionally, you can read the timezone overview at:
http://www.wxwidgets.org/manuals/2.6.3/ ... etimezones
by jgeorgal
Mon Dec 18, 2006 9:31 pm
Forum: C++ Development
Topic: Problem using wxFileConfig
Replies: 3
Views: 1346

I found that I had to add the line delete wxConfigBase::Set((wxConfigBase *) NULL); before creating the new wxFileConfig. This deletes any existing config, which otherwise will be used whether you want it to or not. Why should there already be one? I'm guessing, but I suspect it's to do with the st...
by jgeorgal
Sun Dec 17, 2006 8:04 pm
Forum: C++ Development
Topic: Editor Development with WxWidgets
Replies: 6
Views: 1998

Hmm... Now I noticed that you run the wxwidgets loop on a "secondary" thread ... Could you try running wxwidgets loop on the "main" thread and your engine on the other ??? I think wxwidgets is meant to run on the main thread. Also check: http://www.wxwidgets.org/manuals/2.6.3/wx_...
by jgeorgal
Sun Dec 17, 2006 6:56 pm
Forum: C++ Development
Topic: Editor Development with WxWidgets
Replies: 6
Views: 1998

Have you cleaned up wxwidgets before exiting ?

Code: Select all

wxTheApp->OnExit();
wxApp::CleanUp();
by jgeorgal
Sat Dec 16, 2006 11:59 pm
Forum: Platform Related Issues
Topic: Cross Compiling Beetween Linux and Windows
Replies: 1
Views: 899

by jgeorgal
Sat Dec 16, 2006 10:19 pm
Forum: C++ Development
Topic: wxFileDialog::SetStyle gone in 2.8.0?
Replies: 2
Views: 1078

this method is obviously gone. But you can pass all parameters to the ctor, you don't need the three additional calls. Yeah ... but obviously the guy creates the object once (when first needed) and then sets its parameters according to the arguments of the enclosing function. He probably doesn't wa...
by jgeorgal
Sat Dec 16, 2006 8:18 pm
Forum: C++ Development
Topic: Linux GDK Critical error running
Replies: 6
Views: 2312

Re: Linux GDK Critical error running

(WxWindplot:23165): Gdk-CRITICAL **: gdk_drawable_get_size: assertion `GDK_IS_DRAWABLE (drawable)' failed (WxWindplot:23165): Gdk-CRITICAL **: gdk_drawable_get_depth: assertion `GDK_IS_DRAWABLE (drawable)' failed (WxWindplot:23165): Gdk-CRITICAL **: gdk_drawable_get_size: assertion `GDK_IS_DRAWABLE...
by jgeorgal
Sat Dec 16, 2006 8:02 pm
Forum: C++ Development
Topic: Making a drag strictly internal
Replies: 8
Views: 1716

Are there any hidden platform-dependencies I've introduced in this code? Your code is fine! Using a wxString as a storage buffer as I suggested above would be easier and you wouldn't have to explicitly manage heap storage. However your implementation is correct in the context you want to use it. A ...