FillWorkspace Method
Description
Draws the workspace background color when using the Ribbon bar.
Syntax
Public Sub FillWorkspace( _
ByVal hDC As Integer, _
ByVal x As Integer, _
ByVal y As Integer, _
ByVal cx As Integer, _
ByVal cy As Integer _
)
Parameters
- hDC: A handle to the destination device context.
- x: The x-coordinate of the upper left corner of the destination rectangle. This is the location at which to draw within the specified device context.
- y: The y-coordinate of the upper left corner of the destination rectangle. This is the location at which to draw within the specified device context.
- cx: Width of workspace to fill.
- cy: Height of workspace to fill.
Remarks
If the Ribbon is not used, then the workspace will be filled with the default system color.
Example
FillWorkspace Sample (Visual Basic)
This sample illustrates how to use the FillWorkspace method to fill in the CommandBars workspace. This is mainly used to draw the themed background color of the different Ribbon themes (blue, aqua, black). All other themes will draw the system default.
Private Sub Form_Paint()
On Error Resume Next
Dim Left As Long
Dim Top As Long
Dim Right As Long
Dim Bottom As Long
CommandBars.GetClientRect Left, Top, Right, Bottom
CommandBars.PaintManager.FillWorkspace Me.hDC, Left, Top, Right - Left, Bottom - Top
End Sub
See Also
Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.