Hi
I have created a function with the following prototype:
CDC* GetSquares();
This function needs to create a CDC with is 100 by 100 pixels large. In this CDC the function needs to to draw a single square. Once the sqaure the is drawn the function should return the CDC.
How can I create a CDC 100 by 100 pixels large within this function?
The function returns the CDC to OnDraw and then the CDC is BitBlt directly to the screen.
I have been trying to use CreateCompatibleBitmap() and then selecting this into my CDC. But this does not work.
Any help on this would be great.
Thank you.
I have created a function with the following prototype:
CDC* GetSquares();
This function needs to create a CDC with is 100 by 100 pixels large. In this CDC the function needs to to draw a single square. Once the sqaure the is drawn the function should return the CDC.
How can I create a CDC 100 by 100 pixels large within this function?
The function returns the CDC to OnDraw and then the CDC is BitBlt directly to the screen.
I have been trying to use CreateCompatibleBitmap() and then selecting this into my CDC. But this does not work.
Any help on this would be great.
Thank you.