OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
uipart.cpp
Go to the documentation of this file.
1//----------------------------------------------------------------------------
2// ObjectWindows
3// Copyright (c) 1995, 1996 by Borland International, All Rights Reserved
4//
5//----------------------------------------------------------------------------
6#include <owl/pch.h>
7#include <owl/defs.h>
8#include <owl/uihelper.h>
9#include <owl/gdiobjec.h>
10
11namespace owl {
12
14
15//
16/// Empty constructor.
17//
21
22//
23/// Draw the part onto a DC.
24/// The type and state control how the part should be painted.
25//
26bool
28{
29 return DrawFrameControl(dc, rect, type, state);
30}
31
32//
33/// Wrapper for the DrawFrameControl API.
34//
35#if !defined(BI_COMP_GNUC)
36#pragma warn -par
37#endif
38bool
40{
41 static bool hasDrawFrameControl = true;
42
43 // Try once to see if the API call is available. If not, do ourselves.
44 //
46 if (::DrawFrameControl(dc, &rect, type, state))
47 return true;
48 if (::GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
49 hasDrawFrameControl = false;
50 else
51 return false;
52 }
53
54 // !BB Emulate call
55 //
56 //
57 return false;
58}
59#if !defined(BI_COMP_GNUC)
60#pragma warn .par
61#endif
62
63} // OWL namespace
64/* ========================================================================== */
65
TDC is the root class for GDI DC wrappers.
Definition dc.h:64
TRect is a mathematical class derived from tagRect.
Definition geometry.h:308
bool DrawFrameControl(TDC &dc, TRect &rect, TType type, TState state)
Wrapper for the DrawFrameControl API.
Definition uipart.cpp:39
bool Paint(TDC &dc, TRect &rect, TType type, TState state)
Draw the part onto a DC.
Definition uipart.cpp:27
TState
Enumeration describing the various glyphs available for buttons, captions, menus and scrollbar parts.
Definition uihelper.h:465
TType
Enumeration describing the part to be drawn.
Definition uihelper.h:455
TUIPart()
Empty constructor.
Definition uipart.cpp:18
Definition of abstract GDI object class and derived classes.
Object Windows Library (OWLNext Core)
Definition animctrl.h:22
OWL_DIAGINFO
Definition animctrl.cpp:14
General definitions used by all ObjectWindows programs.
Definition of the UI Helper Classes: TUIHandle, TUIBorder, TUIFace, TUIPart.