Search found 45 matches

by bertolino
Fri Jul 20, 2018 5:59 pm
Forum: Component Writing
Topic: Question about skinned wxMessageBox
Replies: 7
Views: 1851

Re: Question about skinned wxMessageBox

Thanks for your advice that offers a solution but that doesn't fully answer my expectation: Actually, until now I'm used to call wxMessageBox like this: wxMessageBox(_("bla bla")), i.e, with just one parameter and the message box is always well centered. I'd like to keep on doing the same with myMes...
by bertolino
Fri Jul 20, 2018 5:22 pm
Forum: Component Writing
Topic: Question about skinned wxMessageBox
Replies: 7
Views: 1851

Re: Question about skinned wxMessageBox

Screen Shot 2018-07-20 at 19.17.49.png Thanks to you Doublemax, the implementation was quite straightforward. But I still have troubles with automatically centering the message box on the app frame: Calling myMessageBox (my function that replaces wxMessageBox) does not mention the parent window. On...
by bertolino
Fri Jul 20, 2018 1:10 pm
Forum: Component Writing
Topic: Question about skinned wxMessageBox
Replies: 7
Views: 1851

Re: Question about skinned wxMessageBox

Great, I'll get right on it. Thanks!
by bertolino
Fri Jul 20, 2018 11:08 am
Forum: Component Writing
Topic: Question about skinned wxMessageBox
Replies: 7
Views: 1851

Question about skinned wxMessageBox

I plan to make a skinned version of wxMessageBox. I wonder about some aspects:
- Should a class to do that be a good idea (since wxMessageBox is a function)?
- If so, which should be the best base class to derive?
- How to get the modal behavior?

Many thanks for any suggestion,

Pascal
by bertolino
Fri Jul 20, 2018 9:42 am
Forum: Component Writing
Topic: Dark skinned application that flashes when started
Replies: 13
Views: 2916

Re: Dark skinned application that flashes when started

Was your EVT_ERASE_BACKGROUND event handler completely empty (that's how it should be) ? Yes Do you use double buffering (wx[Auto]BufferedPaintDC) in the paint event handlers? There is still some noticeable (but different kind of) flicker when resizing the main frame. Not yet, but I will check it, ...
by bertolino
Thu Jul 19, 2018 8:29 pm
Forum: Component Writing
Topic: Dark skinned application that flashes when started
Replies: 13
Views: 2916

Re: Dark skinned application that flashes when started

I have investigated and remarked that the flicker didn't happen in the class where the EVT_ERASE_BACKGROUND event was not bound. I also remarked that all my OnPaint methods started with the right dc.Clear() that ensures to erase with the right color. So I removed the EVT_ERASE_BACKGROUND binds and t...
by bertolino
Thu Jul 19, 2018 7:39 pm
Forum: Component Writing
Topic: Dark skinned application that flashes when started
Replies: 13
Views: 2916

Re: Dark skinned application that flashes when started

Doublemax, you have done the right test! Great! With this, what happens is quite clear. To me, the middle figure shows an EVT_ERASE_BACKGROUND event that either erases with the right colour (dark) or the unwanted color (white). As you suggest, I'm going to check what are the differences in those cla...
by bertolino
Thu Jul 19, 2018 3:43 pm
Forum: Component Writing
Topic: Dark skinned application that flashes when started
Replies: 13
Views: 2916

Re: Dark skinned application that flashes when started

Please find below the address where you can download the exe. Actually, this is the installer of the application, since it was simpler than extracting the minimalist code. Please, tell me when I can remove it (it's a working version that should not be available yet). *link removed* Many thanks for y...
by bertolino
Thu Jul 19, 2018 10:24 am
Forum: Component Writing
Topic: Dark skinned application that flashes when started
Replies: 13
Views: 2916

Re: Dark skinned application that flashes when started

I already catch wxEVT_ERASE_BACKGROUND. I checked with or without the wxBG_STYLE_PAINT style without any success.
I'm going to extract the necessary piece of code into a minimalist application so that you can see. Thank you!
by bertolino
Thu Jul 19, 2018 9:22 am
Forum: Component Writing
Topic: Dark skinned application that flashes when started
Replies: 13
Views: 2916

Re: Dark skinned application that flashes when started

It happens just once at the start, and for the panes each time they are docked or undocked.
No flicker at all when covering / uncovering my window with another application.
by bertolino
Thu Jul 19, 2018 8:11 am
Forum: Component Writing
Topic: Dark skinned application that flashes when started
Replies: 13
Views: 2916

Dark skinned application that flashes when started

Hi, I am developing a dark "skinned" application with buttons, check boxes, ... each derived form wxPanel or wxWindow. Everything works fine but when the application starts and the main frame is displayed, all the skinned objects flash once (it's very fast) as white rectangles just before been displ...
by bertolino
Wed Apr 18, 2018 7:03 am
Forum: C++ Development
Topic: From wxMemoryDC to wxGraphicsContext with a small issue
Replies: 8
Views: 770

Re: From wxMemoryDC to wxGraphicsContext with a small issue

Hi Doublemax, So, as you proposed, I created my graphics context from the image and of course it works pretty well: wxGraphicsContext *gc = wxGraphicsContext::Create(myWxImage) ; My comments about this version: - The process is not faster (I'm on Windows) - The code is more readable / lighter - Don'...
by bertolino
Tue Apr 17, 2018 9:17 pm
Forum: C++ Development
Topic: From wxMemoryDC to wxGraphicsContext with a small issue
Replies: 8
Views: 770

Re: From wxMemoryDC to wxGraphicsContext with a small issue

You're right, it will be more simple and faster!
I'm going to try (tomorrow morning) and will let you know.
Many thanks for your advice and your very fast availability!

Pascal
by bertolino
Tue Apr 17, 2018 9:04 pm
Forum: C++ Development
Topic: From wxMemoryDC to wxGraphicsContext with a small issue
Replies: 8
Views: 770

Re: From wxMemoryDC to wxGraphicsContext with a small issue

Our posts crossed.
Thanks Doublemax for your help.
Regards,

Pascal
by bertolino
Tue Apr 17, 2018 9:02 pm
Forum: C++ Development
Topic: From wxMemoryDC to wxGraphicsContext with a small issue
Replies: 8
Views: 770

Re: From wxMemoryDC to wxGraphicsContext with a small issue

OOps, I have understood my error:
I must keep on using wxMemoryDC::SelectObject
and do all the rest with the wxGraphicsContext.
It works well like this.
Thanks,

Pascal