File: port23.htm

package info (click to toggle)
wxwin2-doc 2.01-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 6,540 kB
  • ctags: 5,968
  • sloc: cpp: 15,157; makefile: 434; sh: 6
file content (18 lines) | stat: -rw-r--r-- 902 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<HTML>
<head><title>OnPaint</title></head>

<BODY BGCOLOR=#FFFFFF>
<A NAME="topic13"></A><CENTER>
<A HREF="port.htm"><img align=center src="contents.gif" BORDER=0 ALT="Contents"></A> <A HREF="port14.htm#quickreference"><img align=center src="up.gif" BORDER=0 ALT="Up"></A> <A HREF="port22.htm#topic12"><img align=center src="back.gif" BORDER=0 ALT="Previous"></A> <A HREF="port24.htm#topic14"><img align=center src="forward.gif" BORDER=0 ALT="Next"></A> </CENTER><HR>

<H2>OnPaint</H2>
<P>
This is now a non-virtual function, with a wxPaintEvent&amp; argument.
Add an EVT_PAINT macro to the event table
for your window.<P>
Your function <I>must</I> create a wxPaintDC object, instead of using GetDC to
obtain the device context.<P>
If you are using a wxScrolledWindow (formerly wxCanvas), you should call
PrepareDC(dc) to set the correct translation for the current scroll position.<P>

</BODY></HTML>