Guidance Forums / wxWidgets (wxWindows) in C++ / Refreshing a canvas

Search 搜索
Home Home

Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Refreshing a canvas
Posted by: 2003-08-25 18:52:42
I have a canvas with some graphics on it on one page of a notebook object. The problem is that if I click on another page and then come back to the page with the graphics, every things was erased.
Is there any solution to make it permanent on the canvas ?
Message2. Window lost focus event
Posted by: 2003-08-25 22:18:04
I have found a solution to repaint the canvas when the user returns to the page with the graphics and when the window is maximized too. The last event during which the canvas is erased is when another window comes above the wx application, for example if the user opens an explorer window. This event is not EVT_SET_FOCUS and clicking on another window is not EVT_KILL_FOCUS too (these two events are called respectively on window maximized and minimized).
So I just want to know the events that could let me know that the user clicked on another window (i.e. my wx application is in the background) and when he goes back to it (with a mouse click or with the ALT-TAB combination).

Thanks for your help :D !!
Message3. Re: Window lost focus event
Posted by: 2003-08-28 15:52:09
nobody knows how to detect that the user clicks on another window? Pleeaaaase, I am sure you do! ;o)
Message4. Re: Window lost focus event
Posted by: guidance 2003-08-28 18:43:11
OnPaint doesn't work? Have you checked samples? For instance, this drawing.cpp:
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
© Fri 2024-6-21  Guidance Laboratory Inc. Hits:0