Questions tagged [gdi]

Graphics Device Interface (GDI) is a device-independent, pure software graphics API under the Windows operating system for drawing graphic primitives and text. It is the underlying base used to render the Windows GUI elements.

Graphics Device Interface (GDI) is a device-independent, pure software graphics API under the Windows operating system for drawing graphic primitives and text. It is the underlying base used to render the Windows GUI elements.

More information at http://en.wikipedia.org/wiki/Graphics_Device_Interface

2158 questions
5
votes
1 answer

Static controls slightly flicker when main window is resized

INTRODUCTION AND RELEVANT INFORMATION: I have a complex painting to implement in my main window’s WM_PAINT handler. I have submitted a picture bellow to illustrate it: Main window has static controls, instead of buttons, which have style…
AlwaysLearningNewStuff
  • 2,939
  • 3
  • 31
  • 84
5
votes
1 answer

Determine number of GDI handles and USER objects

We developed a small test suite for our Windows Forms UI rendering engine which allows to measure performance and detect memory leaks while running test cases in an automated manner. Now we would like to check for handle leaks as well. On the…
Gene
  • 4,192
  • 5
  • 32
  • 56
5
votes
1 answer

Detect game hack through screenshot analysis C#

I'm trying to write some code to detect a wallhack for a game. Basically, some hacks exist which create a windows aero transparent window, and they draw the hack onto this external window, so it can't be detected by taking a screenshot of the game…
DaManJ
  • 373
  • 2
  • 15
5
votes
2 answers

how to get a native GDI bitmap from a .net bitmap

i would like to use a .net Bitmap in a native library using Pinvoke Technology, the native function has the following prototype , int cropImage( bool aBlocking,Gdiplus::Bitmap *aInputImage, ) I worte the following pinvoke public extern int…
Yamen Ajjour
  • 1,422
  • 13
  • 32
5
votes
2 answers

WMF / EMF File Format conversion C#

In my program, I have a requirement to "playback" or "parse" windows metafiles (WMF and EMF). I have dug through MSDN and Google, and the closest I have come is the Graphics. EnumerateMetafile method. I can get it to work, in that my…
FlaCracker
  • 51
  • 1
  • 2
5
votes
1 answer

Double buffering in WPF?

I'm developing a graph control in WPF. I have previously developed it using GDI and C#. i've used double buffering in previous control to avoid some issues related to redrawing of the graph control. Now when i've developed the Graph Control in WPF i…
Rangana Sampath
  • 1,447
  • 3
  • 32
  • 57
5
votes
1 answer

How to perform high quality bitmap scaling in Direct2D?

I am trying to move an application from GDI+ to Direct2D for performance reasons. Perviously I was using StretchBlt() in HALFTONE mode which gives great, but slow results. Now I am drawing in Direct2D with RenderTarget->DrawBitmap() but it only has…
Ian Smith
  • 51
  • 1
  • 2
5
votes
2 answers

Fast way to get screenshot of Windows application in C++ (Win32)?

I'm facing a problem when my application needs to get screenshots of other Windows applications. I'm using the function in win32api 'PrintWindow', but this doesn't work well. It is slow and some components inside other applications' windows shown as…
jondinham
  • 8,271
  • 17
  • 80
  • 137
5
votes
1 answer

GDI line spacing in Delphi?

I am trying to add character spacing to letters while drawing on a canvas in Delphi. The horizontal spacing works fine by using the SetTextCharacterExtra API, but if I draw text on a canvas using DrawText and there is a line break in it, how would I…
Junaid Noor
  • 474
  • 9
  • 24
5
votes
1 answer

Simulating highlight pen on delphi canvas

I have a project to make digital whiteboard. I have done with ordinary pen, and I must simulate work of highlight pen. if drawingNow then Image1.Canvas.LineTo(x, y); There is no transparency setting in delphi. I found AlphaBlend function in GDI…
Niyoko
  • 7,512
  • 4
  • 32
  • 59
5
votes
2 answers

Alphablend and TransparentBlt

This question is related to my earlier question on SO. I want to combine two layers with alpha applied only to a specific portion of the source layer. One way I tried was to set SourceConstantAlpha to $ff (and have the function use the alpha channel…
wmercer
  • 1,102
  • 2
  • 11
  • 24
5
votes
2 answers

How to draw a lightened border(outer glow effect)?

How can i draw a lightened border like this with gdi/gdi+: Anyone can give me a train of thought?Thanks.
toki
  • 411
  • 4
  • 14
5
votes
8 answers

Why does windows let you draw on the whole screen?

I've been playing a big with the DC obtained with CreateDC(L"DISPLAY",NULL,NULL,NULL) and I've been wondering why does windows let you draw on the whole screen that easily, cause I think you could do some pretty evil stuff with that like putting a…
Razvi
  • 2,808
  • 5
  • 31
  • 39
5
votes
2 answers

Draw mouse pointer icon?

I am coding little fun gadget. I want to be able to draw second (or more) mouse pointer icons at different location than the original mouse but to move it according to move of original mouse. I know how to track movement of the mouse but I dunno how…
VisaToHell
  • 508
  • 1
  • 12
  • 29
5
votes
5 answers

"Exclusive" DirectDraw palette isn't actually exclusive

We're maintaining an old video game that uses a full-screen 256-color graphics mode with DirectDraw. The problem is, some applications running in the background sometimes try to change the system palette while the game is running, which results in…
Vladimir Panteleev
  • 24,651
  • 6
  • 70
  • 114