Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


A question about DrawText

In the following simple drawing code (handles the WM_PAINT message):

hdc = BeginPaint(hwnd, &ps);
GetClientRect(hwnd, &rect);
DrawText(hdc, "Hello world!", -1, &rect, 0);
ReleaseDC(hwnd, hdc);

The DrawText takes the client window &rect as an argument, on the other hand, the BeginPaint function sets the clipping region of the hdc to exclude any area outside the update region. So both hdc and &rect carry information about "area", which one is in real control of what area should be painted? Thanks for help.


  • Andre YoungAndre Young USAMember Posts: 0

    ____ \ \ free ebooks and video tutorials about \ Swift JavaScript Java C# Go MATLAB Visual Basic Scratch Visual Basic .NET Assembly Objective-C PL/SQL Delphi Python R C Perl PHP C++ Ruby ABAP Alice Prolog COBOL Kotlin LabVIEW D FoxPro Erlang Fortran Lisp Apex Hack Ada ML SAS Lua F# Julia Awk Clojure Scheme Crystal Rust Logo Transact-SQL Scala VBScript Dart Bash \ _____

Sign In or Register to comment.