|
-
March 20th, 2012, 02:42 PM
#1
ScrollWindowEx not repeating
Hello,
I'm writing a screensaver that scrolls text horizontally. It works almost as expected except it does not repeat. The text will scroll once and then the screen shows nothing. The code is still running. I'm using a timer to control the speed. Is there a way to get it to repeat, reset or something like that? Code looks like this:
void MyWnd::OnPaint()
{
if (theTimer.Expired())
{
CRect test;
theTimer.Reset();
CFont font;
CPaintDC dc(this);
font.CreatePointFont(200,_T("Arial"),&dc);
dc.SelectObject(&font);
dc.SetTextColor(RGB(0,255,255));
dc.SetBkColor(RGB(0,0,255));
myView.left = rect.left + 400;
myView.top = rect.top + 50;
myView.bottom = myView.top + 100;
myView.right = 1000;
dc.DrawTextExA(str,myView,DT_NOCLIP|DT_MODIFYSTRING|DT_WORDBREAK,NULL);
this->ScrollWindowEx(-1,0,rect,rect,NULL,test,SW_INVALIDATE);
this->UpdateWindow();
}
Thanks in advance!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|