Questions tagged [bitblt]

BitBlt WinAPI function performs a bit-block transfer of the color data corresponding to a rectangle of pixels from the specified source device context into a destination device context.

BitBlt is a Windows API function, which performs a bit-block transfer of the color data corresponding to a rectangle of pixels from the specified source device context into a destination device context.

A raster operation code is also passed to the BitBlt function, which affects how the source DC and destination DC are merged together. For example, bits can be ANDed, ORed, XORed, etc.. together for different effects.

162 questions
2
votes
0 answers

Using a screen capture without saving to disk in c++

I am attempting to capture images from the screen. I currently have code which takes a screenshot and saves it to disk but I would prefer to not save it each time. After several hours of reading over other examples online I still feel I do not…
Corbin
  • 21
  • 4
2
votes
0 answers

BitBlt not working for Office 2013

I'm using BitBlt to get screenshots of windows on a user's desktop. I've found that all works well for windows from most programs. However, BitBlt returns blank pixels for any Office 2013 windows (Word, Powerpoint, etc). PrintWindow does work…
Daktor
  • 41
  • 2
2
votes
1 answer

Can I take a screenshot on a windows machine that is running without a monitor?

I have a bank of virtual machines (running windows) that I remote into. As such, none of these machines have a monitor attached, they are only accessed by Remote Desktop. I want to get a screenshot of an application that is running on the…
Brynn McCullagh
  • 4,083
  • 2
  • 17
  • 12
2
votes
1 answer

SRCCOPY removes transparancy from BITBLITTED IMAGE

BitBlt(meteor.main, 0, 0, meteor.img_width, meteor.img_height, meteor.image, meteor.mask_x, meteor.mask_y, SRCAND); BitBlt(meteor.main, 0, 0, meteor.img_width, meteor.img_height, meteor.image, meteor.img_x, meteor.img_y, …
Anonymous
  • 628
  • 2
  • 6
  • 12
2
votes
2 answers

How to clean up after myself when drawing directly to the screen

I'm drawing directly to the screen using BitBlt and GetDC(IntPtr.Zero). Is there some way to call Refresh or Invalidate on the whole screen when I'm done, so that I don't leave big chunks of paint everywhere (digitally speaking)? Update: when you…
MusiGenesis
  • 74,184
  • 40
  • 190
  • 334
2
votes
2 answers

Win32 C++ BitBlt Transparency

UPDATED LOOK AT BOTTOM OF THIS POST What I am doing is trying to use one Black and White bitmap, to lay a background bitmap on the white, and the tile overlay on the black. The problem I am having is adding the overlay. and this is my BitBlt()…
Evan Carslake
  • 2,267
  • 15
  • 38
  • 56
2
votes
1 answer

How do I perform BitBlt() to copy a screen region that contains Windows Media Player in win32 C++ programming?

I've a program that captures a screen region via BitBlt. I was testing it today and discovered that when the screen region contains parts of Windows Media Player then those parts are gray. The rest of the region gets successfully copied to a…
bodacydo
  • 75,521
  • 93
  • 229
  • 319
2
votes
1 answer

BitBlt Printer.Canvas to a TBitMap displays as solid white

I am trying to capture Printer.Canvas as a Bitmap using BitBlt. I want to then take that Bitmap and display it on a paintbox. However, when I attempt this I am given only a white rectangle proportionate to the values I entered for Bitmap.SetSize. My…
CodeMonkey
  • 135
  • 2
  • 13
2
votes
4 answers

Bitblt blackness

I am running this following code, HDC hdc; HDC hdcMem; HBITMAP bitmap; RECT c; GetClientRect(viewHandle, &c); // instead of BeginPaint use GetDC or GetWindowDC hdc = GetDC(viewHandle); hdcMem = CreateCompatibleDC(hdc); // always create the bitmap…
asyncwait
  • 4,457
  • 4
  • 40
  • 53
2
votes
0 answers

Using BitBlt to mask background of bitmap C++

I am making a small game with bitmaps representing objects and I am trying to mask the background using a bitmap mask. I looked it up on google and made two bitmaps. One of the ship and one as a mask. For the mask, I colored everything I wanted…
Iowa15
  • 3,027
  • 6
  • 28
  • 35
2
votes
5 answers

Cursor disappears on bitblt

I have a windows application that scrapes pixels from the screen for recording (in the form of a video) to a custom screen-sharing format. The problem is that on machines using a software cursor, blitting from the screen with SRCCOPY|CAPTUREBLIT…
Joshua Warner
1
vote
1 answer

VB.NET BitBlt copy bitmap to screen

Edit: Fixed, I created a compatibleDC for the graphics object, and a handle for the bitmap (using b.gethbitmap), then used the SelectObject function inside GDI to select those two, and used the compatibleDC instead of hDc in the BitBlt function I've…
raVensc2
  • 11
  • 1
  • 4
1
vote
1 answer

Capturing image in client window win32 c++

This code is attempting to capture the image painted on the window in a box of up to 100x100 around the cursor. BitBlt is not returning 0 in either location here, and I'm pretty sure the issue is with the first function call of BitBlt, where I am…
Aaron K
  • 437
  • 4
  • 10
1
vote
0 answers

BitBlting with Windows Aero

For months now, I have been trying to solve a problem regarding rendering images properly onto Aero glass. From what I have gathered so far, to do this you need to render the graphics object as a bitmap, because the Aero requires an alpha channel.…
1
vote
1 answer

How to display a pixel vector on screen?

I create a screenshot from the desktop and receive a vector with the pixel data, but I am having problems when trying to draw the pixel data on my screen. CODE TO CREATE SCREENSHOT SNIPPET std::vector recvScreenSnippet(int x, int y, int…
Lenarolla
  • 17
  • 5