finally!!!! I find why!!!!
The problom is not about the source rect, but the destination !!!
My old dest RECT was calculated as:
Code:
RECT rect;
GetWindowRect(m_hwnd,&rect);
rect.left += m_GSM_CXBORDER;
rect.top += m_GSM_CAPTION+m_GSM_CYBORDER+m_GSM_CYMENU;
rect.right -= m_GSM_CXBORDER;
rect.bottom -= m_GSM_CYBORDER;
Now I modify it to:
Code:
RECT rectDst;
POINT pt;
rectDst.left = 0;
rectDst.top = 0;
rectDst.right = m_nScreenWidth;
rectDst.bottom = m_nScreenHeight;
pt.x = pt.y = 0;
ClientToScreen(m_hwnd, &pt);
OffsetRect(&rectDst, pt.x, pt.y);
The two result is not the same! first one is not accurate! Now it works!
http://ershu.3q5.com/UUAuth/2006-6/67970237.bmp
But if I want to implement scale 2 (512*480), using DX blt function to stretch it still look paintness. Did everybody writes your own function to scale 2 ??