From: AliR on
Hi All,

Has anyone come up with a good way to eliminate the flicker when you resize
a CHTMLView?

AliR.


From: Ajay Kalra on
Did you try removing CS_HREDRAW/CS_VREDRAW from its parent window
class. That should do it.

--------
Ajay Kalra
ajaykalra(a)yahoo.com

From: AliR on
Hey Ajay,

I think this is what you ment:

BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
{
cs.style &= ~(CS_HREDRAW|CS_VREDRAW);

if( !CMDIChildWnd::PreCreateWindow(cs) )
return FALSE;

return TRUE;
}

It didn't help.

AliR.


"Ajay Kalra" <ajaykalra(a)yahoo.com> wrote in message
news:1139432784.849745.100710(a)g14g2000cwa.googlegroups.com...
> Did you try removing CS_HREDRAW/CS_VREDRAW from its parent window
> class. That should do it.
>
> --------
> Ajay Kalra
> ajaykalra(a)yahoo.com
>
>


From: "TerryFei" on
Hi AliR,
Welcome to MSDN Newsgroup!

In the current situation, please help me to confirm some information on
your side: is your project type MDI?

Based on my knowledge, you could try to use the following ways to solve
flick issue:
1. Override PreCreateWindow method, just like:
BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
cs.style = WS_CHILD | WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU
| FWS_ADDTOTITLE | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX
| WS_MAXIMIZE;
//set the window style to Maximize, but don't show it as first
cs.cx = 1024; cs.cy = 768;
// Set windows's size to full screen's size
if( !CMDIChildWndEx::PreCreateWindow(cs) )
return FALSE;
cs.style |= WS_VISIBLE;
//Show windows only afer finish
return TRUE;
}

2??In order to update window,redraw operation occurs at frequently. If
redraw operation is not so fast, flick will happen. So if we forbid
window's redraw operation properly and restore to redraw at proper time, it
could solve the flick issue.We could handle WM_WINDOWPOSCHANGING and
WM_WINDOWPOSCHANGED to achieve this goal.

I hope the above information is helpful for you. If you have any questions
or concerns, please let me know. Thanks for your understanding and have a
nice day!

Best Regards,

Terry Fei [MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security

--------------------
>From: "AliR" <AliR(a)online.nospam>
>Newsgroups: microsoft.public.vc.mfc
>References: <9_sGf.28413$F_3.4848(a)newssvr29.news.prodigy.net>
<1139432784.849745.100710(a)g14g2000cwa.googlegroups.com>
>Subject: Re: CHTMLView and Flicker
>Lines: 31
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
>Message-ID: <XptGf.28422$F_3.9695(a)newssvr29.news.prodigy.net>
>NNTP-Posting-Host: 66.196.199.81
>X-Complaints-To: abuse(a)prodigy.net
>X-Trace: newssvr29.news.prodigy.net 1139434231 ST000 66.196.199.81 (Wed,
08 Feb 2006 16:30:31 EST)
>NNTP-Posting-Date: Wed, 08 Feb 2006 16:30:31 EST
>Organization: SBC http://yahoo.sbc.com
>X-UserInfo1:
TSU[@IONTBUABQA[ORJV_T@@USXB(a)DTMNHWB_EYLJZ]BGIELNVUEAE[YETZPIWWI[FCIZA^NBFXZ
_D[BFNTCNVPDTNTKHWXKB@X^B_OCJLPZ(a)ET_O[G\XSG@E\G[ZKVLBL^CJINM(a)I_KVIOR\T_M_AW_
M[_BWU_HFA_]@A_A^SGFAUDE_DFTMQPFWVW[QPJN
>Date: Wed, 08 Feb 2006 21:30:31 GMT
>Path:
TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onli
ne.de!news.glorb.com!newscon02.news.prodigy.com!prodigy.net!newsmst01b.news.
prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr29.news.prodigy.n
et.POSTED!c813ebc2!not-for-mail
>Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.vc.mfc:466343
>X-Tomcat-NG: microsoft.public.vc.mfc
>
>Hey Ajay,
>
>I think this is what you ment:
>
>BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
>{
> cs.style &= ~(CS_HREDRAW|CS_VREDRAW);
>
> if( !CMDIChildWnd::PreCreateWindow(cs) )
> return FALSE;
>
> return TRUE;
>}
>
>It didn't help.
>
>AliR.
>
>
>"Ajay Kalra" <ajaykalra(a)yahoo.com> wrote in message
>news:1139432784.849745.100710(a)g14g2000cwa.googlegroups.com...
>> Did you try removing CS_HREDRAW/CS_VREDRAW from its parent window
>> class. That should do it.
>>
>> --------
>> Ajay Kalra
>> ajaykalra(a)yahoo.com
>>
>>
>
>
>

From: AliR on
It's an MDI application.

Try for yourself: Create an MDI application using the Wizard, change the
view from CView to CHTMLView. Build and run project, resize the view and
notice the flicker.

I have tried a couple of solutions I found on CodeProject, but none make the
flicker go away.

AliR.

""TerryFei"" <v-terryf(a)online.microsoft.com> wrote in message
news:n2paNwSLGHA.668(a)TK2MSFTNGXA01.phx.gbl...
> Hi AliR,
> Welcome to MSDN Newsgroup!
>
> In the current situation, please help me to confirm some information on
> your side: is your project type MDI?
>
> Based on my knowledge, you could try to use the following ways to solve
> flick issue:
> 1. Override PreCreateWindow method, just like:
> BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
> {
> // TODO: Modify the Window class or styles here by modifying
> // the CREATESTRUCT cs
> cs.style = WS_CHILD | WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU
> | FWS_ADDTOTITLE | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX
> | WS_MAXIMIZE;
> //set the window style to Maximize, but don't show it as first
> cs.cx = 1024; cs.cy = 768;
> // Set windows's size to full screen's size
> if( !CMDIChildWndEx::PreCreateWindow(cs) )
> return FALSE;
> cs.style |= WS_VISIBLE;
> //Show windows only afer finish
> return TRUE;
> }
>
> 2??In order to update window,redraw operation occurs at frequently. If
> redraw operation is not so fast, flick will happen. So if we forbid
> window's redraw operation properly and restore to redraw at proper time,
it
> could solve the flick issue.We could handle WM_WINDOWPOSCHANGING and
> WM_WINDOWPOSCHANGED to achieve this goal.
>
> I hope the above information is helpful for you. If you have any questions
> or concerns, please let me know. Thanks for your understanding and have a
> nice day!
>
> Best Regards,
>
> Terry Fei [MSFT]
> Microsoft Community Support
> Get Secure! www.microsoft.com/security
>
> --------------------
> >From: "AliR" <AliR(a)online.nospam>
> >Newsgroups: microsoft.public.vc.mfc
> >References: <9_sGf.28413$F_3.4848(a)newssvr29.news.prodigy.net>
> <1139432784.849745.100710(a)g14g2000cwa.googlegroups.com>
> >Subject: Re: CHTMLView and Flicker
> >Lines: 31
> >X-Priority: 3
> >X-MSMail-Priority: Normal
> >X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
> >Message-ID: <XptGf.28422$F_3.9695(a)newssvr29.news.prodigy.net>
> >NNTP-Posting-Host: 66.196.199.81
> >X-Complaints-To: abuse(a)prodigy.net
> >X-Trace: newssvr29.news.prodigy.net 1139434231 ST000 66.196.199.81 (Wed,
> 08 Feb 2006 16:30:31 EST)
> >NNTP-Posting-Date: Wed, 08 Feb 2006 16:30:31 EST
> >Organization: SBC http://yahoo.sbc.com
> >X-UserInfo1:
>
TSU[@IONTBUABQA[ORJV_T@@USXB(a)DTMNHWB_EYLJZ]BGIELNVUEAE[YETZPIWWI[FCIZA^NBFXZ
>
_D[BFNTCNVPDTNTKHWXKB@X^B_OCJLPZ(a)ET_O[G\XSG@E\G[ZKVLBL^CJINM(a)I_KVIOR\T_M_AW_
> M[_BWU_HFA_]@A_A^SGFAUDE_DFTMQPFWVW[QPJN
> >Date: Wed, 08 Feb 2006 21:30:31 GMT
> >Path:
>
TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onli
>
ne.de!news.glorb.com!newscon02.news.prodigy.com!prodigy.net!newsmst01b.news.
>
prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr29.news.prodigy.n
> et.POSTED!c813ebc2!not-for-mail
> >Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.vc.mfc:466343
> >X-Tomcat-NG: microsoft.public.vc.mfc
> >
> >Hey Ajay,
> >
> >I think this is what you ment:
> >
> >BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
> >{
> > cs.style &= ~(CS_HREDRAW|CS_VREDRAW);
> >
> > if( !CMDIChildWnd::PreCreateWindow(cs) )
> > return FALSE;
> >
> > return TRUE;
> >}
> >
> >It didn't help.
> >
> >AliR.
> >
> >
> >"Ajay Kalra" <ajaykalra(a)yahoo.com> wrote in message
> >news:1139432784.849745.100710(a)g14g2000cwa.googlegroups.com...
> >> Did you try removing CS_HREDRAW/CS_VREDRAW from its parent window
> >> class. That should do it.
> >>
> >> --------
> >> Ajay Kalra
> >> ajaykalra(a)yahoo.com
> >>
> >>
> >
> >
> >
>