![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
12 years old
Join Date: Nov 2007
Posts: 94
Rep Power: 1
![]() |
[win32][gdi32] Copying HDC to another?
I've tried to do CreateCompatibleDC(source_device) but it contains a result the same height and size as source_device but every pixel as black. Any help?
const int SCREEN_WIDTH = GetSystemMetrics(SM_CXSCREEN) - 1;
const int SCREEN_HEIGHT = GetSystemMetrics(SM_CXSCREEN) - 1;
...
int x;
HDC screen_device = GetDC(NULL);
HDC copy = CreateCompatibleDC(screen_device);
for (x = 0; x <= SCREEN_WIDTH; ++x) {
for (int y = 0; y <= SCREEN_HEIGHT; ++y) {
SetPixel(screen_device, x, y, GetPixel(copy, SCREEN_WIDTH - x, y));
}
}
...EDIT: I see I have to use BitBlt? If so, may I have an example? I have an inefficiency in understanding win32 argument names. |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| more problems with copying from classes | cwl157 | Java | 0 | Sep 19th, 2007 4:17 PM |
| copying files | rwm | C++ | 8 | Apr 26th, 2007 2:39 AM |
| String to Morse Code - Copying from string to string | Xenon | C | 29 | Nov 10th, 2005 2:30 PM |
| Copying memory address values | rsnd | C++ | 4 | Jun 19th, 2005 7:41 AM |
| copying files first before deleting them | harjit | Visual Basic | 1 | May 15th, 2005 7:05 AM |