The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.2.34 (Linux)
File Line Function
/showthread.php 895 errorHandler->error




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Transparent background for SysTabControl32
#1
Hi Gintaras,
I was wondering if it is possible to make transparent background for SysTabControl32 i.e. for part that are not buttons (See attached screenshot).
When I give background of whole dialog a background color using DT_SetBackgroundColor, it makes the non-button part of TabControl visible. I tried to find a version of WM_CTLCOLORXX for tab control but couldn't. Any thoughts?
Thanks,


Function dlg_multipage_with_tab_control
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

if(!ShowDialog("dlg_multipage_with_tab_control" &dlg_multipage_with_tab_control)) ret

;BEGIN DIALOG
;0 "" 0x10C80A48 0x100 0 0 488 163 "Form"
;1001 Static 0x44020000 0x4 94 60 48 13 "Page0"
;1101 Static 0x44020000 0x4 104 62 48 13 "Page1"
;1201 Static 0x44020000 0x4 110 70 48 13 "Page2"
;1 Button 0x54030001 0x4 142 146 48 14 "OK"
;2 Button 0x54030000 0x4 192 146 48 14 "Cancel"
;4 Button 0x54032000 0x4 242 146 18 14 "?"
;3 SysTabControl32 0x54000040 0x20 0 2 114 13 ""
;5 Static 0x54000010 0x20004 4 138 257 1 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2030605 "" "" "" ""

ret
;messages
sel message
,case WM_INITDIALOG
,int DlgBackColor=0xF0F0F0
,int hbrush_Background=CreateSolidBrush(DlgBackColor)
,DT_SetBackgroundColor(hDlg 0 0xEAD2BA) ;;blue 70 130 180
,int htb=id(3 hDlg)
,TCITEM ti.mask=WINAPI.TCIF_TEXT
,ti.pszText="A"
,SendMessage htb WINAPI.TCM_INSERTITEMA 0 &ti
,ti.pszText="B"
,SendMessage htb WINAPI.TCM_INSERTITEMA 1 &ti
,ti.pszText="C"
,SendMessage htb WINAPI.TCM_INSERTITEMA 2 &ti
,goto g11
,case WM_DESTROY
,,DeleteObject hbrush_Background
,case WM_COMMAND goto messages2
,case WM_NOTIFY goto messages3
,case WM_CTLCOLORDLG
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
;messages3
NMHDR* nh=+lParam
sel nh.code
,case WINAPI.TCN_SELCHANGE
,_i=SendMessage(nh.hwndFrom WINAPI.TCM_GETCURSEL 0 0)
,;g11
,DT_Page hDlg _i


Attached Files Image(s)
   


Messages In This Thread
Transparent background for SysTabControl32 - by stupomer - 03-30-2018, 02:01 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)