where rect is the rectangle on which the edge should be drawn, nEdge specifies the type of edge to draw, and nFlags specifies the drawing options. Examples: 1. To draw a raised border on a dialog box:C++
In this example, the GetClientRect function is used to obtain the size of the client area of the dialog box, which is then passed as the rect parameter to DrawEdge. The EDGE_RAISED identifier specifies a raised edge, while BF_RECT option indicates that the edge should be drawn around the entire rectangle. 2. To draw a sunken border on a button:C++ CRect rect; btn.GetClientRect(&rect); pDC->DrawEdge(rect, EDGE_SUNKEN, BF_RECT); ``` In this example, the GetClientRect method is used to obtain the dimensions of the client area of the button, which is passed as the rect parameter to DrawEdge. The EDGE_SUNKEN identifier specifies that the edge should be recessed, while BF_RECT option indicates that the edge should be drawn around the entire rectangle. Package library: The DrawEdge function is a part of the Windows API and is therefore included in the Windows SDK (Software Development Kit) for C++, which provides all the necessary libraries and headers to create Windows-based applications.