In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article will explain in detail how to define the use of fillrect. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
The FillRect function fills the rectangle with the specified brush, which includes the upper-left boundary of the rectangle, but not the lower-right boundary of the rectangle.
FillRect function prototype
IntFillRect (HDChdc,CONSTRECT*lprc,HBRUSHhbr)
Parameters.
Hdc: device environment handle.
Lprc: a pointer to the RECT structure that contains the logical coordinates of the rectangle to be filled.
Hbr: a handle to a brush that fills a rectangle.
Return value
If the function call succeeds, the return value is non-zero; if the function call fails, the return value is 0.
WindowsNT: for more error messages, call the GetLastError function.
Remarks
The brush defined by the parameter hbr can be either a logical brush handle or a color value. If you specify a logical brush handle, call one of the following functions to get the handle; CreateHatchBrush, CreatePatternBrush, or CreateSolidBrush. In addition, you can use GetStockObject to get a stock brush handle. If you specify a color value, it must be a standard system color (the selected color must be added by 1) such as FillRect (hdc,&rect, (HBRUSH) (COLOR_ENDCOLORS+1)). See GetSysColor for a list of all standard system colors.
When filling a specified rectangle, FillRect does not include the right and lower boundaries of the rectangle. Regardless of the current mapping mode, GDI fills a rectangle that does not include the columns on the right and the rows below.
WindowsCE: in the WindowsCE1.0 version, the parameter hbr cannot be a color brush. In the WindowsCE2.0 version, this function is the same as on the Windows desktop platform.
Quick check: WindowsNT:3.1 and above; Windows:95 and above; WindowsCE:1.0 and above; header file: wingdi.h; library file: gdi32.lib.
The use of FillRect in VC++
/ / get the equipment environment variables in the customer area
CDC*pDC=CDC::FromHandle (lpDrawItemStruct- > hDC)
GetClientRect (& m_ClientRect); / / get the customer area rectangle
If (m_Btntype==0) / / determines whether the current button type is an advanced color button
{
Switch (m_State)
{
Case0:
PDC- > FillRect (& masked ClientRectMagneNewCBrush (RGB (255255255)
Break
Case1:
PDC- > FillRect (& masked ClientRectMagneNewCBrush (RGB (192192255)
}
This is the end of the article on "how to define the use of fillrect". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.