device context

About this tag
The device context tag on WindowsForum.com covers topics related to the Windows GDI device context handle (HDC) used for drawing operations. Content includes code examples for drawing borders, background colors, and handling window procedures in C/C++ with the Windows API. Discussions involve obtaining and managing device contexts for custom controls, such as static controls and rich edit controls, as well as integrating OpenGL. The tag is relevant for developers working with low-level Windows graphics programming, including subclassing window procedures and managing device context handles for rendering.
  1. F

    Windows 11 Drawing a border and background color with a handle to a window.

    ``` #include <Windows.h> #include <Richedit.h> HWND hwnd; HWND panel; HWND richEdit; WNDPROC oldStaticProc; int WINAPI WinMain(HINSTANCE, HINSTANCE, PSTR, int); LRESULT CALLBACK WindowProcedure(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); LRESULT CALLBACK StaticProc(HWND hwnd, UINT...
Back
Top