Talk:Header file for Listview: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
(Fix for Ansi/Unicode message define bugs)
 
(→‎Buggy defines: Fix LVM_GETITEMTEXT)
 
Line 7: Line 7:
<highlight-nsis>
<highlight-nsis>
!include WinMessages.nsh ; Hopefully defines some of the LVM_ messages correctly
!include WinMessages.nsh ; Hopefully defines some of the LVM_ messages correctly
!ifndef LVM_GETITEMTEXT
!define /math LVM_GETITEMTEXTA ${LVM_FIRST} + 45
!define /math LVM_GETITEMTEXTW ${LVM_FIRST} + 115
${_NSIS_DEFAW} LVM_GETITEMTEXT
!endif
!include "CommCtrl.nsh"
!include "CommCtrl.nsh"
!define /ifndef _COMMCTRL_NSH_VERBOSE 3 ; Fix another bug in the .nsh
!define /ifndef _COMMCTRL_NSH_VERBOSE 3 ; Fix another bug in the .nsh

Latest revision as of 17:40, 11 December 2017

Buggy defines

Defines like LVM_INSERTCOLUMN should depend on the Ansi/Unicode target.

To make sure this is done correctly you should include WinMessages.nsh first:

!include WinMessages.nsh ; Hopefully defines some of the LVM_ messages correctly
!ifndef LVM_GETITEMTEXT
!define /math LVM_GETITEMTEXTA ${LVM_FIRST} + 45
!define /math LVM_GETITEMTEXTW ${LVM_FIRST} + 115
${_NSIS_DEFAW} LVM_GETITEMTEXT
!endif
!include "CommCtrl.nsh"
!define /ifndef _COMMCTRL_NSH_VERBOSE 3 ; Fix another bug in the .nsh

This will only fix recent versions, anything released before 20120805 (v2.x) needs to be manually fixed.

Anders (talk) 17:12, 11 December 2017 (UTC)