gdi

Any good tutorials / resources to learn Win32 GDI? [closed]

走远了吗. 提交于 2019-12-12 08:59:43
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . So far i have been searching on google and haven't fount a single good tutorial which is comprehensive. Does any one know of any good site or book which teaches Win32 GDI? 回答1: Petzold (Programming Windows, now in its >=5th edition) has good coverage. GDI has been replaced by Direct2D and DirectWrite, which are

Do I need a WOW64 dump for GDI Handle analysis?

邮差的信 提交于 2019-12-12 08:38:42
问题 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's better to have 32-bit dumps of 32-bit processes and 64-bit dumps of 64-bit processes. Unfortunately, with 2 crash dumps I received, the script does not work. Looking deeper into it, I found out that the GdiSharedHandleTable is null in those dumps: 0:000> dt ntdll!_PEB GdiSharedHandleTable @$peb

Is GDI+ just a layer on top of GDI, or something new?

那年仲夏 提交于 2019-12-12 07:49:42
问题 When GDI+ came out, I remember all the brouhaha about how it was the "new, faster, better" way to display stuff in Windows. But everytime I looked at it, it seemed to me that it was really just a COM wrapper around GDI. Is that true? Or is GDI+ really an independent graphical library that simply shares some paradigms with GDI? Personally, I'm not sure how it could be independent, but I never saw a definite statement one way or another. 回答1: Many GDI functions are accelerated by the graphics

What is the HDC for in GetDIBits?

此生再无相见时 提交于 2019-12-12 07:18:44
问题 I was using GetDIBits to get bitmap data from a screen compatible device context into a DIB of a certain format. I was under the impression that the DC was necessary only for synthesizing a color table when the source bitmap is 8 bits-per-pixel or less. Since my source bitmap was a full 32-bit color image and this was a one-off program and I didn't have the screen DC handy, I set the HDC parameter to NULL. This didn't work. Once I grabbed the screen DC and passed it in, it did start working.

How do I force a repaint of only the background so a control doesn't repaint over it again?

倾然丶 夕夏残阳落幕 提交于 2019-12-12 06:57:33
问题 This question was generated by a response to another question: Common Controls on a Transparent Window?. Apparently, there is a way to only paint the background without a control painting itself again This would solve the problem of having common control buttons on a transparent background. So my question is, how do I paint only the background around a common control after the common control has painted itself? 回答1: About how to redraw visible borders. The rounded rectangle drawn by RoundRect

Unable to access buffer data after screen capture

折月煮酒 提交于 2019-12-12 04:42:58
问题 We are trying to develop a solution where a Desktop screen from a Windows XP machine needs to be monitored remotely. From our experience, we have identified that GDI based approach is faster than that of DirectX front buffer capture. In GDI we are getting the handle to the screen as follows. // Get the Desktop windows handle and device context hDesktopWnd=GetDesktopWindow(); hDesktopDC=GetDC(hDesktopWnd); // Get the handle to the existing DC and create a bitmap file object HDC hBmpFileDC

Position images along a Bézier curve

有些话、适合烂在心里 提交于 2019-12-12 04:18:11
问题 We currently have a dynamic image, which holds on it text which is created from user input. This text follows a Bézier curve to define its position and rotation. For various reasons, the text needs to be changed to be a set of images as the font needs to be very specific. We will therefore have one PNG for every allowable character of the alphabet. So if the user enters the word "TEST", the system will pull out the letters T, E, S and T and position them next to each other. This part isn't an

GDI+ erroneous drawing under Windows explorer window

痴心易碎 提交于 2019-12-12 04:06:32
问题 I am using GDI* plus to do custom drawing, but I have a drawing error when my window gets drawn under a windows explorer window, it looks like this: As u can see just under the explorer window.. the colors are weird.. the top right are buttons and the checkbox is also a button .. "Are you.." is a static control.. they are all inherited and implemented as custom controls.. when receiving WM_PAINT. I also use a buffered image in WM_PAINT.. anyway.. I can't explain this, any ideas? It works fine

Delphi/C++Builder TBitmap: How to determinine scanline order?

…衆ロ難τιáo~ 提交于 2019-12-12 03:48:48
问题 Delphi's TBitmap type is basically a wrapper over a GDI BITMAP and PALETTE, and can support both top-down and bottom-up scanline ordering. I have a TBitmap which I need to convert to GDI+ Bitmap, in order to rotate and composite it. My bitmap is 32-bit ARGB, which windows supports, but VCL doesn't natively 'understand'. TBitmap *bmp; ... When I use the following constructor, the alpha channel doesn't work for compositing, but otherwise everything works. Gdiplus::Bitmap b(bmp->Handle, NULL);

Unable to implement DIB printing with GDI (MFC)

瘦欲@ 提交于 2019-12-12 02:48:46
问题 MFC doc/view architecture, GDI drawing/printing. I have a DIB backbuffer I need to display and print. After the long and painful road I came to the conclusion than I need to use DIB created with CreateDIBSection (rather than DDB created with CreateCompatibleBitmap), and I have to blit it onto printer dc with StretchDIBits (rather than StretchBlt). But i'm not able to get this thing to work. Here is what I do: In my initialization routine, I setup the backbuffer, like this: // Prepare device