Search found 54 matches

by bertolino
Thu Jul 19, 2018 7:39 pm
Forum: Component Writing
Topic: Dark skinned application that flashes when started
Replies: 13
Views: 3875

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: 3875

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: 3875

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: 3875

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: 3875

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: 1021

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: 1021

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: 1021

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: 1021

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
by bertolino
Tue Apr 17, 2018 8:43 pm
Forum: C++ Development
Topic: From wxMemoryDC to wxGraphicsContext with a small issue
Replies: 8
Views: 1021

Re: From wxMemoryDC to wxGraphicsContext with a small issue

Sorry, I was not clear. I want to draw some text over an image, so I use a bitmap for it. With the wxMemoryDC dc, I used to attach the dc to the bitmap: wxBitmap myBitmap = wxBitmap(myWxImage, -1) ; wxMemoryDC dc ; dc.SelectObject(myBitmap) ; ... dc.DrawText(...) ; ... myWxImage = myBitmap.ConvertTo...
by bertolino
Tue Apr 17, 2018 8:10 pm
Forum: C++ Development
Topic: From wxMemoryDC to wxGraphicsContext with a small issue
Replies: 8
Views: 1021

From wxMemoryDC to wxGraphicsContext with a small issue

Hello, I recently changed my code that used wxMemoryDC to use wxGraphicsContext and get anti-aliasing support. It works great and the change from wxMemoryDC to wxGraphicsContext is quite simple since the methods are rather similar. Everything was fine until I made the changes on text drawing: My pro...
by bertolino
Thu Apr 12, 2018 7:01 am
Forum: C++ Development
Topic: Is Control key down?
Replies: 11
Views: 2131

Re: Is Control key down?

Hi,
I use Parallels and yes, there are hooks for several keys.
I have to look into this.
Thanks for your suggestion,

Pascal
by bertolino
Wed Apr 11, 2018 8:26 pm
Forum: C++ Development
Topic: Is Control key down?
Replies: 11
Views: 2131

Re: Is Control key down?

Hello OneEyeMan, BootCamp : Windows 7 Pro / Visual Studio Pro 2012. VM (Parallels): Windows 10 Pro / Visual Studio Pro 2015. The program that works correctly on a regular PC was compiled in the VM, so it seems that the problem doesn't come from the compiler itself but from the execution environment....
by bertolino
Wed Apr 11, 2018 7:53 am
Forum: C++ Development
Topic: Is Control key down?
Replies: 11
Views: 2131

Re: Is Control key down?

What a good question you asked! It allowed me to find the origin of the problem: I'm developing Windows applications using 2 MacBook Pro , one with BootCamp , the other one with a virtual Windows machine and the issue I encountered was with both of them (until now, I never had any strange behavior i...
by bertolino
Tue Apr 10, 2018 4:01 pm
Forum: C++ Development
Topic: Is Control key down?
Replies: 11
Views: 2131

Re: Is Control key down?

Thanks for your answer Doublemax. Actually, I didn't mention it in my post but I already tested wxGetKeyState(WXK_CONTROL) and wxGetKeyState(WXK_RAW_CONTROL) without any success. That is, the behavior is still the same that I described in my previous post. I wonder what I'm doing wrong or maybe ther...