Added minimal Tab and ListView support to WinMessages.nsh and some COM helper macros
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6245 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
7cd38f2367
commit
27a82ca909
3 changed files with 96 additions and 10 deletions
|
@ -51,6 +51,18 @@ System::Call `${ptr}->${vtblidx}${decl}${params}`
|
|||
System::Call 'OLE32::CoCreateInstance(g "${clsid}",i 0,i ${CLSCTX_INPROC_SERVER},g "${iid}",*p.${sysoutvarIFacePtr})i${sysret}'
|
||||
!macroend
|
||||
|
||||
!macro ComHlpr_SafeRelease _p
|
||||
${If} ${_p} <> 0
|
||||
${IUnknown::Release} ${_p} ""
|
||||
${EndIf}
|
||||
!macroend
|
||||
!macro ComHlpr_SafeReleaseAndNull _p
|
||||
${If} ${_p} <> 0
|
||||
${IUnknown::Release} ${_p} ""
|
||||
StrCpy ${_p} 0
|
||||
${EndIf}
|
||||
!macroend
|
||||
|
||||
|
||||
!ifndef IID_IUnknown
|
||||
!define IID_IUnknown {00000000-0000-0000-C000-000000000046}
|
||||
|
@ -93,7 +105,7 @@ ${NSISCOMIFACEDECL}IShellLink GetWorkingDirectory 8 (t,i)i
|
|||
${NSISCOMIFACEDECL}IShellLink SetWorkingDirectory 9 (t)i
|
||||
${NSISCOMIFACEDECL}IShellLink GetArguments 10 (t,i)i
|
||||
${NSISCOMIFACEDECL}IShellLink SetArguments 11 (t)i
|
||||
${NSISCOMIFACEDECL}IShellLink GetHotkey 12 (*&i2)i
|
||||
${NSISCOMIFACEDECL}IShellLink GetHotkey 12 (*i0)i
|
||||
${NSISCOMIFACEDECL}IShellLink SetHotkey 13 (&i2)i
|
||||
${NSISCOMIFACEDECL}IShellLink GetShowCmd 14 (*i)i
|
||||
${NSISCOMIFACEDECL}IShellLink SetShowCmd 15 (i)i
|
||||
|
@ -118,8 +130,8 @@ ${NSISCOMIFACEDECL}IShellLinkDataList SetFlags 7 (i)i
|
|||
!define /ifndef EXP_SPECIAL_FOLDER_SIG 0xA0000005
|
||||
!define /ifndef EXP_DARWIN_ID_SIG 0xA0000006
|
||||
!define /ifndef EXP_SZ_ICON_SIG 0xA0000007
|
||||
!define /ifndef EXP_PROPERTYSTORAGE_SIG 0xA0000009
|
||||
;SHELL_LINK_DATA_FLAGS
|
||||
!define /ifndef SLDF_DEFAULT 0
|
||||
!define /ifndef SLDF_HAS_ID_LIST 0x00000001
|
||||
!define /ifndef SLDF_HAS_LINK_INFO 0x00000002
|
||||
!define /ifndef SLDF_HAS_NAME 0x00000004
|
||||
|
@ -147,6 +159,7 @@ ${NSISCOMIFACEDECL}IShellLinkDataList SetFlags 7 (i)i
|
|||
!define /ifndef SLDF_UNALIAS_ON_SAVE 0x01000000
|
||||
!define /ifndef SLDF_PREFER_ENVIRONMENT_PATH 0x02000000
|
||||
!define /ifndef SLDF_KEEP_LOCAL_IDLIST_FOR_UNC_TARGET 0x04000000
|
||||
!define /ifndef SLDF_PERSIST_VOLUME_ID_RELATIVE 0x08000000 ;[Eight+]
|
||||
|
||||
!ifndef IID_IShellItem
|
||||
!define IID_IShellItem {43826d1e-e718-42ee-bc55-a1e261c37bfe}
|
||||
|
|
|
@ -9,7 +9,7 @@ WTypes.h
|
|||
**************************************************/
|
||||
;NOTE: This list is incomplete
|
||||
!define VT_EMPTY 0
|
||||
!define VT_NULL 1
|
||||
!define VT_NULL 1
|
||||
!define VT_I4 3
|
||||
!define VT_BSTR 8
|
||||
!define VT_BOOL 11
|
||||
|
@ -36,8 +36,9 @@ PropIdl.h
|
|||
/**************************************************
|
||||
Propkey.h
|
||||
**************************************************/
|
||||
!define PKEY_AppUserModel_ID '"{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}",5'
|
||||
!define PKEY_AppUserModel_PreventPinning '"{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}",9'
|
||||
!define PKEY_AppUserModel_ID '"{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}",5'
|
||||
!define PKEY_AppUserModel_ExcludeFromShowInNewInstall '"{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}",8'
|
||||
!define PKEY_AppUserModel_PreventPinning '"{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}",9'
|
||||
|
||||
|
||||
!verbose pop
|
||||
|
|
|
@ -69,6 +69,15 @@ UDM Up-down control
|
|||
!verbose push
|
||||
!verbose 3
|
||||
|
||||
!define _NSIS_DEFAW '!insertmacro _NSIS_DEFAW '
|
||||
!macro _NSIS_DEFAW d
|
||||
!ifdef NSIS_UNICODE
|
||||
!define ${d} "${${d}W}"
|
||||
!else
|
||||
!define ${d} "${${d}A}"
|
||||
!endif
|
||||
!macroend
|
||||
|
||||
!define HWND_BROADCAST 0xFFFF
|
||||
|
||||
#ShowWindow Commands#
|
||||
|
@ -107,6 +116,7 @@ UDM Up-down control
|
|||
!define BM_SETIMAGE 0x00F7
|
||||
!define BM_SETSTATE 0x00F3
|
||||
!define BM_SETSTYLE 0x00F4
|
||||
!define BCM_SETSHIELD 0x160C ; WinVista + ComCtl32 v6
|
||||
|
||||
!define BST_UNCHECKED 0
|
||||
!define BST_CHECKED 1
|
||||
|
@ -555,7 +565,58 @@ UDM Up-down control
|
|||
!define HDM_FIRST 0x1200
|
||||
|
||||
#List view control#
|
||||
!define LVM_FIRST 0x1000
|
||||
!define LVS_SINGLESEL 4
|
||||
!define LVS_SHOWSELALWAYS 8
|
||||
!define LVS_SHAREIMAGELISTS 0x40
|
||||
!define LVS_EDITLABELS 0x200
|
||||
!define LVS_NOSCROLL 0x2000
|
||||
!define LVS_NOCOLUMNHEADER 0x4000
|
||||
!define LVS_NOSORTHEADER 0x8000
|
||||
!define LVS_ICON 0
|
||||
!define LVS_REPORT 1
|
||||
!define LVS_SMALLICON 2
|
||||
!define LVS_LIST 3
|
||||
!define LVS_EX_CHECKBOXES 4
|
||||
!define LVS_EX_FULLROWSELECT 0x20
|
||||
!define LVS_EX_INFOTIP 0x400
|
||||
!define LVS_EX_LABELTIP 0x4000
|
||||
!define LVS_EX_DOUBLEBUFFER 0x10000
|
||||
!define LVIF_TEXT 1
|
||||
!define LVIF_IMAGE 2
|
||||
!define LVIF_PARAM 4
|
||||
!define LVIF_STATE 8
|
||||
!define LVIS_STATEIMAGEMASK 0xF000
|
||||
!define LVCF_FMT 1
|
||||
!define LVCF_WIDTH 2
|
||||
!define LVCF_TEXT 4
|
||||
!define LVCF_SUBITEM 8
|
||||
!define SYSSTRUCT_LVITEM_V1 (i,i,i,i,i,t,i,i,p)
|
||||
!define SYSSTRUCT_LVITEM_V2 (i,i,i,i,i,t,i,i,p,i) ; IE3
|
||||
!define SYSSTRUCT_LVITEM_V3 (i,i,i,i,i,t,i,i,p,i,i,i,i) ; WinXP + ComCtl32 v6
|
||||
!define SYSSTRUCT_LVITEM_V4 (i,i,i,i,i,t,i,i,p,i,i,i,i,i,i) ; WinVista + ComCtl32 v6
|
||||
!define LVM_FIRST 0x00001000
|
||||
!define /math LVM_GETIMAGELIST ${LVM_FIRST} + 2
|
||||
!define /math LVM_SETIMAGELIST ${LVM_FIRST} + 3
|
||||
!define /math LVM_GETITEMCOUNT ${LVM_FIRST} + 4
|
||||
!define /math LVM_GETITEMA ${LVM_FIRST} + 5
|
||||
!define /math LVM_SETITEMA ${LVM_FIRST} + 6
|
||||
!define /math LVM_INSERTITEM ${LVM_FIRST} + 7
|
||||
!define /math LVM_DELETEITEM ${LVM_FIRST} + 8
|
||||
!define /math LVM_DELETEALLITEMS ${LVM_FIRST} + 9
|
||||
!define /math LVM_INSERTCOLUMNA ${LVM_FIRST} + 27
|
||||
!define /math LVM_SETCOLUMNWIDTH ${LVM_FIRST} + 30
|
||||
!define /math LVM_SETITEMSTATE ${LVM_FIRST} + 43
|
||||
!define /math LVM_GETITEMSTATE ${LVM_FIRST} + 44
|
||||
!define /math LVM_SETEXTENDEDLISTVIEWSTYLE ${LVM_FIRST} + 54
|
||||
!define /math LVM_GETEXTENDEDLISTVIEWSTYLE ${LVM_FIRST} + 55
|
||||
!define /math LVM_GETITEMW ${LVM_FIRST} + 75
|
||||
!define /math LVM_SETITEMW ${LVM_FIRST} + 76
|
||||
!define /math LVM_INSERTITEMW ${LVM_FIRST} + 77
|
||||
!define /math LVM_INSERTCOLUMNW ${LVM_FIRST} + 97
|
||||
${_NSIS_DEFAW} LVM_GETITEM
|
||||
${_NSIS_DEFAW} LVM_SETITEM
|
||||
${_NSIS_DEFAW} LVM_INSERTITEM
|
||||
${_NSIS_DEFAW} LVM_INSERTCOLUMN
|
||||
|
||||
#Status bar window#
|
||||
!define SB_CONST_ALPHA 0x00000001
|
||||
|
@ -588,7 +649,18 @@ UDM Up-down control
|
|||
!define STM_SETIMAGE 0x0172
|
||||
|
||||
#Tab control#
|
||||
!define TCM_FIRST 0x1300
|
||||
!define TCS_SCROLLOPPOSITE 0x0001
|
||||
!define TCIF_TEXT 1
|
||||
!define TCIF_PARAM 8
|
||||
!define SYSSTRUCT_TCITEM (i,i,i,t,i,i,p)
|
||||
!define TCM_FIRST 0x1300
|
||||
!define /math TCM_INSERTITEMA ${TCM_FIRST} + 7
|
||||
!define /math TCM_GETCURSEL ${TCM_FIRST} + 11
|
||||
!define /math TCM_ADJUSTRECT ${TCM_FIRST} + 40
|
||||
!define /math TCM_INSERTITEMW ${TCM_FIRST} + 62
|
||||
!define TCN_SELCHANGE -551
|
||||
!define TCN_SELCHANGING -552
|
||||
${_NSIS_DEFAW} TCM_INSERTITEM
|
||||
|
||||
#Progress bar control#
|
||||
!define PBM_SETRANGE 0x0401
|
||||
|
@ -596,12 +668,12 @@ UDM Up-down control
|
|||
!define PBM_DELTAPOS 0x0403
|
||||
!define PBM_SETSTEP 0x0404
|
||||
!define PBM_STEPIT 0x0405
|
||||
!define PBM_SETRANGE32 0x406 ; IE3 / ComCtl32 v4.70
|
||||
!define PBM_SETRANGE32 0x406 ; IE3 + ComCtl32 v4.70
|
||||
!define PBM_GETRANGE 0x407
|
||||
!define PBM_GETPOS 0x408
|
||||
!define PBM_SETBARCOLOR 0x409 ; IE4 / ComCtl32 v4.71
|
||||
!define PBM_SETBARCOLOR 0x409 ; IE4 + ComCtl32 v4.71
|
||||
!define PBM_SETBKCOLOR ${CCM_SETBKCOLOR}
|
||||
!define PBM_SETMARQUEE 0x40A ; WinXP / ComCtl32 v6
|
||||
!define PBM_SETMARQUEE 0x40A ; WinXP + ComCtl32 v6
|
||||
!define PBM_GETSTEP 0x40D ; WinVista
|
||||
!define PBM_GETBKCOLOR 0x40E
|
||||
!define PBM_GETBARCOLOR 0x40F
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue