Hello coders
I am trying to get a snapshot of my desktop. This is the API help file code but it is in c. Could someone help translate it to ASM. I can do some very small type translation but nothing like this. I want to capture the image, save it amd start building a desktop saver and changer program, I think this is where i have to begin... Are there any here in ASM at the board. I can't seem to find anything about it other than this file. The hbmScreen = CreateCompatibleBitmap and stuff like that i can't seem to understand...
Thanks in advance.
--------------------------------------------------
/* Create a compatible bitmap for hdcScreen. */
hbmScreen = CreateCompatibleBitmap(hdcScreen,
GetDeviceCaps(hdcScreen, HORZRES),
GetDeviceCaps(hdcScreen, VERTRES));
if (hbmScreen == 0)
errhandler("hbmScreen", hwnd);
/* Select the bitmaps into the compatible DC. */
if (!SelectObject(hdcCompatible, hbmScreen))
errhandler("Compatible Bitmap Selection", hwnd);
/* Hide the application window. */
ShowWindow(hwnd, SW_HIDE);
I am trying to get a snapshot of my desktop. This is the API help file code but it is in c. Could someone help translate it to ASM. I can do some very small type translation but nothing like this. I want to capture the image, save it amd start building a desktop saver and changer program, I think this is where i have to begin... Are there any here in ASM at the board. I can't seem to find anything about it other than this file. The hbmScreen = CreateCompatibleBitmap and stuff like that i can't seem to understand...
Thanks in advance.
--------------------------------------------------
/* Create a compatible bitmap for hdcScreen. */
hbmScreen = CreateCompatibleBitmap(hdcScreen,
GetDeviceCaps(hdcScreen, HORZRES),
GetDeviceCaps(hdcScreen, VERTRES));
if (hbmScreen == 0)
errhandler("hbmScreen", hwnd);
/* Select the bitmaps into the compatible DC. */
if (!SelectObject(hdcCompatible, hbmScreen))
errhandler("Compatible Bitmap Selection", hwnd);
/* Hide the application window. */
ShowWindow(hwnd, SW_HIDE);
invoke GetDeviceCaps, hdcScreen, HORZRES
invoke CreateCompatibleBitmap, hdcScreen, eax
mov hbmScreen, eax
invoke GetDeviceCaps, hdcScreen, VERTRES
or eax, eax
jnz @F
invoke errHandler, OFFSET hbmScreenText, hWnd
@@:
invoke SelectObject, hdcCompatible, hbmScreen
or eax, eax
jnz @F
invoke errHandler, OFFSET CompatibleBitmapSelectionText, hWNd
@@:
invoke ShowWindow, hWnd, SW_HIDE
Not tested but I *think* this should work. :)