Click here to Skip to main content
14,923,486 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionOverride afx msg box (pop up) Pin
AeJai6-Sep-07 10:04
MemberAeJai6-Sep-07 10:04 
AnswerRe: Override afx msg box (pop up) Pin
Mark Salsbery6-Sep-07 13:53
MemberMark Salsbery6-Sep-07 13:53 
QuestionConsole redirection Pin
Waldermort6-Sep-07 9:22
MemberWaldermort6-Sep-07 9:22 
AnswerRe: Console redirection Pin
Waldermort6-Sep-07 11:59
MemberWaldermort6-Sep-07 11:59 
QuestionIs there an equivalent to SuspendLayout/ResumeLayout for a MFC Dialog ? Pin
abiemann6-Sep-07 7:00
Memberabiemann6-Sep-07 7:00 
QuestionRe: Is there an equivalent to SuspendLayout/ResumeLayout for a MFC Dialog ? Pin
David Crow6-Sep-07 7:09
MemberDavid Crow6-Sep-07 7:09 
AnswerRe: Is there an equivalent to SuspendLayout/ResumeLayout for a MFC Dialog ? Pin
abiemann6-Sep-07 7:36
Memberabiemann6-Sep-07 7:36 
GeneralRe: Is there an equivalent to SuspendLayout/ResumeLayout for a MFC Dialog ? [modified] Pin
abiemann6-Sep-07 8:03
Memberabiemann6-Sep-07 8:03 
The controls still flicker Frown | :-(

my overall process is:

<br />
//Dialog - prevent changes from being redrawn<br />
this->SetRedraw(FALSE);<br />
<br />
//invert parts of static image onthe Dialog, behind the controls<br />
pDC = this->GetDC();<br />
targetDC.CreateCompatibleDC(pDC);<br />
pOldTargetBmp = targetDC.SelectObject(&m_BmpTarget);<br />
targetDC.PatBlt(X,Y,iWidth,iHeight,DSTINVERT);<br />
targetDC.SelectObject(pOldTargetBmp);<br />
targetDC.DeleteDC();<br />
ReleaseDC(pDC);<br />
m_DialogStaticImage.SetBitmap(HBITMAP(m_BmpTarget));<br />
<br />
//redraw all controls to put them into foreground<br />
m_staticText.RedrawWindow(NULL,NULL,RDW_UPDATENOW);<br />
m_editBox.RedrawWindow(NULL,NULL,RDW_FRAME+RDW_INVALIDATE+RDW_UPDATENOW);<br />
.<br />
. about 15 controls<br />
.<br />
<br />
//Dialog - allow changes to be redrawn<br />
this->SetRedraw(TRUE);<br />
<br />
//no need to erase background since SetBitmap covered everything up<br />
this->Invalidate(FALSE);<br />
<br />
//show updated Dialog<br />
this->UpdateWindow();<br />



I was surprised that it would still flicker; I was hoping that all the graphics operations were done in memory, then simply shown when UpdateWindow was called - thus avoiding flicker.
GeneralRe: Is there an equivalent to SuspendLayout/ResumeLayout for a MFC Dialog ? Pin
Mark Salsbery6-Sep-07 8:22
MemberMark Salsbery6-Sep-07 8:22 
GeneralRe: Is there an equivalent to SuspendLayout/ResumeLayout for a MFC Dialog ? Pin
Mark Salsbery6-Sep-07 8:27
MemberMark Salsbery6-Sep-07 8:27 
GeneralRe: Is there an equivalent to SuspendLayout/ResumeLayout for a MFC Dialog ? [modified] Pin
abiemann6-Sep-07 8:33
Memberabiemann6-Sep-07 8:33 
QuestionRe: Is there an equivalent to SuspendLayout/ResumeLayout for a MFC Dialog ? Pin
David Crow6-Sep-07 8:41
MemberDavid Crow6-Sep-07 8:41 
AnswerRe: Is there an equivalent to SuspendLayout/ResumeLayout for a MFC Dialog ? Pin
abiemann6-Sep-07 8:52
Memberabiemann6-Sep-07 8:52 
QuestionRe: Is there an equivalent to SuspendLayout/ResumeLayout for a MFC Dialog ? Pin
David Crow6-Sep-07 8:56
MemberDavid Crow6-Sep-07 8:56 
AnswerRe: Is there an equivalent to SuspendLayout/ResumeLayout for a MFC Dialog ? Pin
abiemann6-Sep-07 9:00
Memberabiemann6-Sep-07 9:00 
GeneralRe: Is there an equivalent to SuspendLayout/ResumeLayout for a MFC Dialog ? Pin
David Crow6-Sep-07 10:20
MemberDavid Crow6-Sep-07 10:20 
GeneralRe: Is there an equivalent to SuspendLayout/ResumeLayout for a MFC Dialog ? [modified] Pin
abiemann6-Sep-07 13:08
Memberabiemann6-Sep-07 13:08 
GeneralRe: Is there an equivalent to SuspendLayout/ResumeLayout for a MFC Dialog ? Pin
Mark Salsbery6-Sep-07 14:31
MemberMark Salsbery6-Sep-07 14:31 
GeneralRe: Is there an equivalent to SuspendLayout/ResumeLayout for a MFC Dialog ? Pin
David Crow6-Sep-07 17:30
MemberDavid Crow6-Sep-07 17:30 
QuestionRe: Is there an equivalent to SuspendLayout/ResumeLayout for a MFC Dialog ? Pin
Hamid_RT6-Sep-07 7:33
MemberHamid_RT6-Sep-07 7:33 
AnswerRe: Is there an equivalent to SuspendLayout/ResumeLayout for a MFC Dialog ? Pin
abiemann6-Sep-07 7:39
Memberabiemann6-Sep-07 7:39 
AnswerRe: Is there an equivalent to SuspendLayout/ResumeLayout for a MFC Dialog ? Pin
Waldermort6-Sep-07 9:31
MemberWaldermort6-Sep-07 9:31 
GeneralRe: Is there an equivalent to SuspendLayout/ResumeLayout for a MFC Dialog ? Pin
Mark Salsbery6-Sep-07 9:45
MemberMark Salsbery6-Sep-07 9:45 
GeneralRe: Is there an equivalent to SuspendLayout/ResumeLayout for a MFC Dialog ? Pin
abiemann7-Sep-07 11:03
Memberabiemann7-Sep-07 11:03 
QuestionInfinity Symbol Pin
paper676-Sep-07 6:05
Memberpaper676-Sep-07 6:05 

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.