flipflop98
June 21st, 2007, 04:25 PM
Originally, I renewed lines which were visualized according to the user’s keyboard input with MFC GDI(Graphic Device Interface)functions, such as LineTo() and MoveTo().
a. Symptom(Detail)
When the application program is hidden behind other program or out of screen, lines, which should be appeared, go away partly or entirely according to the hidden area. So I tested with double buffering
b. Test – “Double buffering”
•For using the Memory Device Context, there should be also bitmap Device Context which has the compatibility with screen device context.. I learned it empirically.Q1) Am I right?
•BitBlt function presents MemDC to screenDC. I used this function with SRCPAINT option. In this case, it seems that the MemDC doesn't work.If I use this function with other options such as SRCAND or SRCCOPY, there are black background color error on the application program. But it seems that MemDC works.
For more information, SRCCOPY mode ignores background color but SRCPAINT mode computer bitwise-or operation between bkColor and Pen color.
So I tested two cases as follows;
When I used SetROP2(R2_XORPEN), then I used SRCPAINT mode in BitBlt function and When I used SetROP2(R2_COPYPEN), then I used SRCCOPY mode. Q2)Isn't it correct? or aren't they related with each other? Cause I still have the black background error. Could you give me help?
Thank you in advance.
a. Symptom(Detail)
When the application program is hidden behind other program or out of screen, lines, which should be appeared, go away partly or entirely according to the hidden area. So I tested with double buffering
b. Test – “Double buffering”
•For using the Memory Device Context, there should be also bitmap Device Context which has the compatibility with screen device context.. I learned it empirically.Q1) Am I right?
•BitBlt function presents MemDC to screenDC. I used this function with SRCPAINT option. In this case, it seems that the MemDC doesn't work.If I use this function with other options such as SRCAND or SRCCOPY, there are black background color error on the application program. But it seems that MemDC works.
For more information, SRCCOPY mode ignores background color but SRCPAINT mode computer bitwise-or operation between bkColor and Pen color.
So I tested two cases as follows;
When I used SetROP2(R2_XORPEN), then I used SRCPAINT mode in BitBlt function and When I used SetROP2(R2_COPYPEN), then I used SRCCOPY mode. Q2)Isn't it correct? or aren't they related with each other? Cause I still have the black background error. Could you give me help?
Thank you in advance.