Category : gdi

I have to print JPG on default printer. I use winapi and gdi+. My image isn’t draw on whole page. How can I do this? Somebody helps? for ( UINT i = 0; i < frameCount; i++ ) { StartPage(hDC); image.SelectActiveFrame(&pageGuid, i); graphics.SetPageUnit(UnitInch); width = image.GetWidth() / image.GetHorizontalResolution(); height = image.GetHeight() / image.GetVerticalResolution(); graphics.DrawImage(&image, 0.f, ..

Read more

I like the old-style, slow rendering of SetPixel() and I was wondering if there was a small script (Batchfile/VBS preferably) that could output something like this: SetPixel(hdc_suitcaseGeneral, 42, 0, RGB(54, 0, 0)); SetPixel(hdc_suitcaseGeneral, x, y, RGB(r, g, b); SetPixel(hdc_suitcaseGeneral, x, y, RGB(r, g, b); SetPixel(hdc_suitcaseGeneral, x, y, RGB(r, g, b); SetPixel(hdc_suitcaseGeneral, x, y, RGB(r, g, ..

Read more

Is it possible to take a screenshot of a partially hidden window without brining it to front? I know this is possible because the Screen Capture API already does this. https://developer.mozilla.org/en-US/docs/Web/API/Screen_Capture_API/Using_Screen_Capture The picture shows the popup when you initiate a capture process. You can see the same popup on Discord or Slack whenever you would ..

Read more

I’m trying to save the content of a hdc to a bitmap file, I’m currently using the code above, it does save an image, but I can’t open it. Looks like it’s corrupted, and it always has the same size (54bytes). I might be doing something wrong in the HDCTofile function. #include <vector> // HDCToFile ..

Read more

I am trying to implement an application that can manipulate the background screen color attributes through a transparent window. Basically trying to recreate Color Oracle. I am progressing here through C++:GDI+ resources. This GDI has a Color Matrix concept. I am able to create filters for greyscale(as shown in the example in the last hyperlink), ..

Read more