Click here to Skip to main content
15,922,309 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionIs this possible? Pin
moliate26-Feb-02 22:40
moliate26-Feb-02 22:40 
AnswerRe: Is this possible? Pin
Mazdak26-Feb-02 23:10
Mazdak26-Feb-02 23:10 
GeneralRe: Is this possible? Pin
moliate27-Feb-02 3:34
moliate27-Feb-02 3:34 
AnswerRe: Is this possible? Pin
Shog927-Feb-02 6:34
sitebuilderShog927-Feb-02 6:34 
GeneralRe: Is this possible? Pin
moliate27-Feb-02 10:36
moliate27-Feb-02 10:36 
GeneralRich Edit Control Pin
Diabolo26-Feb-02 22:10
Diabolo26-Feb-02 22:10 
GeneralCDC -- the killer Pin
26-Feb-02 20:30
suss26-Feb-02 20:30 
GeneralRe: CDC -- the killer Pin
567890123426-Feb-02 21:12
567890123426-Feb-02 21:12 
The reason: you draw something in other place than OnDraw, but when window is updated, OnDraw makes something else. Solution:
1) You keep some data which defines what should be drawn in the window (in Doc-View application this data is kept in CDocument class, in general case it can be in any place you want).
2) OnDraw draws window according to this data. Every time window is updated (for example, user minimizes and restores window), OnDraw redraws window according to current data state.
3) When data is changed as result of some user actions (such as scrolling or something else), you never redraw window directly. Instead of this you change your data and call:
Invalidate();
UpdateWindow();
After this Window calls your OnDraw() function and it redraws window in new state.
GeneralRe: CDC -- the killer Pin
peterchen27-Feb-02 5:52
peterchen27-Feb-02 5:52 
GeneralAccessing data in views Pin
26-Feb-02 20:23
suss26-Feb-02 20:23 
GeneralRe: Accessing data in views Pin
26-Feb-02 20:37
suss26-Feb-02 20:37 
GeneralRe: Accessing data in views Pin
26-Feb-02 20:51
suss26-Feb-02 20:51 
GeneralRe: Accessing data in views Pin
26-Feb-02 21:02
suss26-Feb-02 21:02 
GeneralRe: Accessing data in views Pin
26-Feb-02 21:12
suss26-Feb-02 21:12 
GeneralRe: Accessing data in views Pin
Steen Krogsgaard26-Feb-02 21:13
Steen Krogsgaard26-Feb-02 21:13 
GeneralRe: Accessing data in views Pin
26-Feb-02 21:42
suss26-Feb-02 21:42 
Generaltype casting a struct to LPARAM in SendMessage(...) Pin
26-Feb-02 20:23
suss26-Feb-02 20:23 
GeneralRe: type casting a struct to LPARAM in SendMessage(...) Pin
moliate26-Feb-02 20:51
moliate26-Feb-02 20:51 
Generaljust typing error Pin
26-Feb-02 21:06
suss26-Feb-02 21:06 
GeneralRe: just typing error Pin
Steen Krogsgaard26-Feb-02 21:20
Steen Krogsgaard26-Feb-02 21:20 
GeneralRe: just typing error Pin
moliate26-Feb-02 22:02
moliate26-Feb-02 22:02 
Generalfile not found Pin
26-Feb-02 20:01
suss26-Feb-02 20:01 
GeneralRe: file not found Pin
Nish Nishant26-Feb-02 20:24
sitebuilderNish Nishant26-Feb-02 20:24 
GeneralHelp with OnKillFocus Pin
John Cruz26-Feb-02 19:39
John Cruz26-Feb-02 19:39 
GeneralRe: Help with OnKillFocus Pin
Derek Waters26-Feb-02 20:03
Derek Waters26-Feb-02 20:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.