-
Notifications
You must be signed in to change notification settings - Fork 1
/
Show_TitleBar_HMG.prg
55 lines (33 loc) · 2.02 KB
/
Show_TitleBar_HMG.prg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
*-----------------------------------------------------------------------------*
#include "eib_hmg.ch"
*-----------------------------------------------------------------------------*
*-----------------------------------------------------------------------------*
PROCEDURE Show_TitleBar()
*-----------------------------------------------------------------------------*
LOCAL hDC
LOCAL BTstruct
LOCAL nTypeText
LOCAL nAlingText
LOCAL nOrientation
LOCAL hBMP
hDC = BT_CreateDC( "win_Main" , BT_HDC_INVALIDCLIENTAREA , @BTstruct )
nTypeText := BT_TEXT_TRANSPARENT
nAlingText := BT_TEXT_LEFT + BT_TEXT_TOP
nOrientation := 0
BT_DrawText ( hDC , 2 * APP_ADJUST_Y , 45 * APP_ADJUST_X , NAZWA_PR , fARIAL , ( 20 + 1 ) * APP_ADJUST_Y , WHITE , BLUE , nTypeText , nAlingText , nOrientation )
IF LEN( aDataBase ) > 0
BT_DrawText ( hDC , 2 * APP_ADJUST_Y , 540 * APP_ADJUST_X , STR( LEN( aDataBase ) ) , fCOURIER , 20 * APP_ADJUST_Y , BLACK , BLUE , nTypeText , nAlingText , nOrientation )
BT_DrawText ( hDC , 2 * APP_ADJUST_Y , 810 * APP_ADJUST_X , GetDateFile() , fCOURIER , 20 * APP_ADJUST_Y , BLACK , BLUE , nTypeText , nAlingText , nOrientation )
ELSE
BT_DrawText ( hDC , 2 * APP_ADJUST_Y , 540 * APP_ADJUST_X , "" , fCOURIER , 20 * APP_ADJUST_Y , BLACK , BLUE , nTypeText , nAlingText , nOrientation )
BT_DrawText ( hDC , 2 * APP_ADJUST_Y , 810 * APP_ADJUST_X , "Brak danych. Pobierz dane --->>>" , fCOURIER , 20 * APP_ADJUST_Y , BLACK , BLUE , nTypeText , nAlingText , nOrientation )
ENDIF
hBMP := BT_BitmapLoadFile ( "APP_MAIN" )
BT_DrawBitMap( hDC , 2 * APP_ADJUST_Y , 2 * APP_ADJUST_X , 32 * APP_ADJUST_Y , 32 * APP_ADJUST_X , BT_SCALE , hBMP )
BT_BitmapRelease( hBMP )
BTstruct [1] := BT_HDC_ALLCLIENTAREA
BT_DeleteDC( BTstruct )
RETURN
*-----------------------------------------------------------------------------*
*-----------------------------------------------------------------------------*
*-----------------------------------------------------------------------------*