dineth
asked on
Using BitBlt() Function !!
Hello Experts !!
I developed an SDI application which displays a Bitmap !! I call UpdateAllViews(NULL) very frequently when a MOUSE_MOVE message is sent. The problem is that the bitmap flickers a lot. I wanna reduce or simple avoid flickering, which is why I'm using BitBlt() function. but still It seems to flicker.
This is the code I've written;
CPaintDC dc(this);
CDC memDC;
memDC.CreateCompatibleDC(& dc);
CBitmap bm;
bm.LoadBitmap(IDB_BITMAP1) ;
memDC.SelectObject(bm);
CRect rc;
GetClientRect(&rc);
OnDraw(&dc);
dc.BitBlt(0,0,rc.Width(), rc.Height(), &memDC,0,0,BLACKNESS);
Can somebody tell me why this does not work as expected.
--Din--
I developed an SDI application which displays a Bitmap !! I call UpdateAllViews(NULL) very frequently when a MOUSE_MOVE message is sent. The problem is that the bitmap flickers a lot. I wanna reduce or simple avoid flickering, which is why I'm using BitBlt() function. but still It seems to flicker.
This is the code I've written;
CPaintDC dc(this);
CDC memDC;
memDC.CreateCompatibleDC(&
CBitmap bm;
bm.LoadBitmap(IDB_BITMAP1)
memDC.SelectObject(bm);
CRect rc;
GetClientRect(&rc);
OnDraw(&dc);
dc.BitBlt(0,0,rc.Width(), rc.Height(), &memDC,0,0,BLACKNESS);
Can somebody tell me why this does not work as expected.
--Din--
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.