gdi Questions
3
I need to get the current display resolution of all monitors attached to the computer.
I can succesfully enum the display devices using the EnumDisplayDevicesA API but for an unknown reason I can...
8
Solved
Question:
Is there an easy way to get a list of types of resources that leak in a running application? IOW by connecting to an application ?
I know memproof can do it, but it slows down so much ...
Retrospective asked 1/2, 2010 at 21:53
3
I need to enumerate the postsript names of all the installed fonts.
for example:
foreach (FontFamily item in FontFamily.Families)
{
listBox1.Items.Add(item.Name);
}
This will give only the ...
1
I'm using BitBlt winapi function to take a screenshot of a given window, even if the window is partially overlapped.
I have everything working fine already, except that, on Windows 10, for some win...
Countermove asked 30/5, 2019 at 23:43
3
I need some help with drawing a text to a texture with GDI and D3D11. I tried using D2D/DirectWrite, but it supports just D3D10 and not D3D11 as I need. Everything I tried failed so far...
Now I wa...
Silvey asked 12/5, 2011 at 14:33
1
Solved
I was able to find the following method of determining if a Unicode-16 character is supported by a font. Unfortunately that doesn't work for surrogate pair Unicode characters, since WCRANGE struct ...
1
Solved
The Windows API function GetDC() accepts a single parameter:
hWnd
A handle to the window whose DC is to be retrieved. If this value is NULL, GetDC retrieves the DC for the entire screen.
...
2
Solved
In an attempt to improve this answer, I am looking for a way to determine, whether a bitmap referenced through an HBITMAP contains an alpha channel.
I understand, that I can call GetObject, and re...
2
I recently got a problem in a program that used to work fine. I tracked it down to the following code:
using System.Drawing;
using System.Runtime.InteropServices;
namespace Foo
{
static class CP...
1
In WPF we would like to use ttf fonts as embedded resources without copying or installing these to the system and without actually writing these to disk. Without memory leak issues.
None of the so...
2
Solved
I'm struggling to figure out the proper way of dumping an array of plain RGBA values into the client area of a Win32 window during WM_PAINT. I have the following code but it already seems convolute...
4
I am working on an Win32 C++ application where I want to ignore the mouse events and let is pass through to the window beneath my window. Basically the window below mine will handle the mouse event...
3
Solved
4
Solved
I can compute horizontal and vertical points, but I cant figure out how to compute distance using diagonal points. Can someone help me with this.
here's the code for my horizontal and vertical mea...
Altercation asked 29/9, 2010 at 6:52
4
Solved
Context: I'm trying to take a screenshot of another window to feed it into OpenCV. I found some code on the web that should be able to convert a BITMAP to something OpenCV can work with. Unfortunat...
1
Solved
Background
I have written a function, which creates a custom cursor, based on the bitmap associated with a given Device Context. I use this to create drag-and-drop cursors that appear as "tear-off...
Proprietress asked 23/11, 2017 at 1:10
0
The code provided at the end draws a grid of red 3x3px rectangles with a random constant alpha value using AlphaBlend(). The output however, turns out not "quite" random:
Notice runs of constant...
2
Solved
1
I'm currently updating a Windows GDI application to use Direct2D rendering and I need to support "transparent" bitmaps via color-keying for backwards compatibility.
Right now I'm working with a HW...
Urogenital asked 30/1, 2013 at 18:22
1
using Visual Studio 2017, vc141, the following code should got a screenshot from front game window but now it return a black and blank image.
only issue with games(tried OpenGL and Vulkan, ogl ret...
1
Solved
I ran an overnight stress test of my application, and when i came in this morning the software had crashed from a Windows error.
The error occurred because the process was obviously out of GDI hand...
Jukebox asked 29/12, 2016 at 15:20
2
Solved
I'm coding in c++ on windows 10 - straight win32 API.
I wanted to make a window show up in the top right of the screen.
As I was doing this, I noticed that screen coordinates for a maximized windo...
Ventre asked 26/2, 2017 at 20:2
2
Solved
I'm debugging a potential GDI Handle Leak. Thanks to @Alois Kraus, there is a WinDbg script which performs a handle count.
From my debugging sessions, especially for .NET, I find that usually, it'...
Rounce asked 1/12, 2016 at 21:41
1
Solved
1
Solved
I am trying to create an OpenGL application on windows. As far as I can understand, one of the first things I must acquire is a Device Context, which must be passed on to a couple of functions that...
© 2022 - 2025 — McMap. All rights reserved.