Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / Refreshing a canvas

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Refreshing a canvas
#2554
Posted by: 2003-08-25 18:52:42
Hello
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 ?
thanks!!
Message2. Window lost focus event
#2555
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
#2573
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)
thanks!
Message4. Re: Window lost focus event
#2574
Posted by: guidance 2003-08-28 18:43:11
OnPaint doesn't work? Have you checked samples? For instance, this drawing.cpp:
http://g.yi.org/_scripts/file.php?f=7835&r=106#5574
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Tue 2024-12-10  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0