mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-26 20:35:09 +08:00
85 lines
3.6 KiB
Plaintext
85 lines
3.6 KiB
Plaintext
.\" This manpage is Copyright (C) 2000 Wei Yongming
|
|
.\" 2000 BluePoint Software
|
|
.\"
|
|
.\" Permission is granted to make and distribute verbatim copies of this
|
|
.\" manual provided the copyright notice and this permission notice are
|
|
.\" preserved on all copies.
|
|
.\"
|
|
.\" Permission is granted to copy and distribute modified versions of this
|
|
.\" manual under the conditions for verbatim copying, provided that the
|
|
.\" entire resulting derived work is distributed under the terms of a
|
|
.\" permission notice identical to this one.
|
|
.\"
|
|
.\" Since MiniGUI is constantly changing, this
|
|
.\" manual page may be incorrect or out-of-date. The author(s) assume no
|
|
.\" responsibility for errors or omissions, or for damages resulting from
|
|
.\" the use of the information contained herein. The author(s) may not
|
|
.\" have taken the same level of care in the production of this manual,
|
|
.\" which is licensed free of charge, as they might when working
|
|
.\" professionally.
|
|
.\"
|
|
.\" Formatted or processed versions of this manual, if unaccompanied by
|
|
.\" the source, must acknowledge the copyright and authors of this work.
|
|
.TH "DC" "3" "August 2000" "MiniGUI"
|
|
|
|
.SH "NAME"
|
|
DC \- get and release display context.
|
|
|
|
.SH "SYNOPSIS"
|
|
.B #include <minigui/gdi.h>
|
|
.PP
|
|
.BI "HDC GUIAPI GetDC" "(HWND hwnd);"
|
|
.br
|
|
.BI "HDC GUIAPI GetClientDC" "(HWND hwnd);"
|
|
.br
|
|
.BI "void GUIAPI ReleaseDC" "(HDC hdc);"
|
|
.PP
|
|
.BI "HDC GUIAPI CreateCompatibleDC" "(HDC hdc);"
|
|
.br
|
|
.BI "void GUIAPI DeleteCompatibleDC" "(HDC hdc);"
|
|
.PP
|
|
.BI "HDC GUIAPI CreatePrivateDC" "(HWND hwnd);"
|
|
.br
|
|
.BI "HDC GUIAPI CreatePrivateClientDC" "(HWND hwnd);"
|
|
.br
|
|
.BI "HDC GUIAPI GetPrivateClientDC" "(HWND hwnd);"
|
|
.br
|
|
.BI "void GUIAPI DeletePrivateDC" "(HDC hdc);"
|
|
|
|
.SH "DESCRIPTION"
|
|
.PP
|
|
\fBGetDC\fP function gets a window DC of the specified \fBhwnd\fP, and returns the handle of the DC.
|
|
.PP
|
|
\fBGetClientDC\fP function gets a client DC of the specified \fBhwnd\fP, and returns the handle of the DC.
|
|
.PP
|
|
\fBReleaseDC\fP function releases the DC returned by \fBGetDC\fP or \fBGetClientDC\fP.
|
|
.PP
|
|
\fBCreateCompatibleDC\fP function creates a DC which is compatible with specified \fBhdc\fP, and returns the handle of the DC.
|
|
.PP
|
|
\fBDeleteCompatibleDC\fP function deletes the DC created by \fBCreateCompatibleDC\fP.
|
|
.PP
|
|
\fBCreatePrivateDC\fP function creates a private window DC of the window \fBhwnd\fP and returns the handle of the DC. This DC is created in system heap, rather than allocated from DC pool.
|
|
.PP
|
|
\fBCreatePrivateClientDC\fP function creates a private client DC of the window \fBhwnd\fP and returns the handle of the DC. This DC is created in system heap, rather than allocated from DC pool.
|
|
.PP
|
|
\fBGetPrivateClientDC\fP function returns the private client DC of the window \fBhwnd\fP with style WS_EX_USEPRIVATECDC.
|
|
.PP
|
|
\fBDeletePrivateDC\fP function deletes the DC returned by \fBCreatePrivateDC\fP or \fBCreatePrivateClientDC\fP.
|
|
|
|
.SH "RETURN VALUE"
|
|
.PP
|
|
For the \fBCreate...\fP or \fBGet...\fP functions, the functions will return the handle of the DC. The functions will return HDC_INVALID when an error occurred.
|
|
|
|
.SH "NOTE"
|
|
.PP
|
|
MiniGUI uses \fBCreatePrivateDC\fP and \fBCreatePrivateClientDC\fP to create private DC for the window with style WS_EX_USEPRIVATECDC. You can create a private DC to avoid invorking \fBGetDC\fP or \fBGetClientDC\fP to get DC when you receive a MSG_CREATE message. Note that you should call \fBDeletePrivateDC\fP to delete the private DC.
|
|
|
|
.SH "SEE ALSO"
|
|
.BR BeginPaint (3),
|
|
.BR EndPaint (3)
|
|
|
|
.SH "AUTHOR"
|
|
.PP
|
|
This manual page was edited by WEI Yongming <ymwei@minigui.org>.
|
|
If you have any problems, comments or found some bugs, please send messages to me.
|