Archive: .onMouseOverSection with XPUI


.onMouseOverSection with XPUI


OutFile MultiLang.exe
Name "$MultiLang"

SetCompressor /final /solid lzma

!define XPUI_WANSIS
!define XPUI_WANSIS_SKIN LCD
!define XPUI_WANSIS_HEADERIMAGE


!include "UsefulLib.nsh"
!include "LogicLib.nsh"
!include "XPUI.nsh"
!verbose 4

!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH

Section "1600" SEC01
SectionEnd

Section "6310" SEC02
SectionEnd


!insertmacro XPUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro XPUI_DESCRIPTION_TEXT ${SEC01} "Description text goes here."
!insertmacro XPUI_DESCRIPTION_TEXT ${SEC02} "222"
!insertmacro XPUI_FUNCTION_DESCRIPTION_END

Function .onMouseOverSection
FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $0 $0 1043
CreateFont $1 "Times New Roman" 12 400
SetCtlColors $0 0x000000 0xd4d0c8
SendMessage $0 ${WM_SETFONT} $1 0
FunctionEnd



if i used !include "MUI.nsh" , the Script has not any trouble.
now i must used "!include "XPUI.nsh" ,but the Script Error.


Please tall me how to do it ?

What error?


Command line:
"C:\Program Files\NSIS\makensis.exe" /NOTIFYHWND 1048932 "d:\My Documents\Untitled02.nsi"

MakeNSIS v2.28 - Copyright 1995-2007 Contributors
See the file COPYING for license details.
Credits can be found in the Users Manual.

Processing config:
Processing plugin dlls: "C:\Program Files\NSIS\Plugins\*.dll"
- AdvSplash::show
- Banner::destroy
- Banner::getWindow
- Banner::show
- BgImage::AddImage
- BgImage::AddText
- BgImage::Clear
- BgImage::Destroy
- BgImage::Redraw
- BgImage::SetBg
- BgImage::SetReturn
- BgImage::Sound
- DcryptDll::Decrypt
- DcryptDll::HexDecoder
- DcryptDll::HexEncoder
- DcryptDll::LoadStr
- DcryptDll::MD5Hash
- Dialer::AttemptConnect
- Dialer::AutodialHangup
- Dialer::AutodialOnline
- Dialer::AutodialUnattended
- Dialer::GetConnectedState
- ExecDos::exec
- ExecDos::isdone
- ExecDos::wait
- FindProcDLL::FindProc
- InetLoad::load
- InstallOptions::dialog
- InstallOptions::initDialog
- InstallOptions::show
- InstallOptionsEx::dialog
- InstallOptionsEx::initDialog
- InstallOptionsEx::setFocus
- InstallOptionsEx::show
- KillProcDLL::KillProc
- LangDLL::LangDialog
- Locate::_Close
- Locate::_Find
- Locate::_GetSize
- Locate::_Open
- Locate::_RMDirEmpty
- Locate::_Unload
- Math::Script
- NSISArray::ArrayCount
- NSISArray::ArrayExists
- NSISArray::Clear
- NSISArray::Concat
- NSISArray::Copy
- NSISArray::Cut
- NSISArray::Debug
- NSISArray::Delete
- NSISArray::ErrorStyle
- NSISArray::Exists
- NSISArray::ExistsI
- NSISArray::FreeUnusedMem
- NSISArray::Join
- NSISArray::New
- NSISArray::Pop
- NSISArray::Push
- NSISArray::Put
- NSISArray::ReDim
- NSISArray::Read
- NSISArray::ReadToStack
- NSISArray::Reverse
- NSISArray::Search
- NSISArray::SearchI
- NSISArray::SetSize
- NSISArray::Shift
- NSISArray::SizeOf
- NSISArray::Sort
- NSISArray::Splice
- NSISArray::Swap
- NSISArray::Unload
- NSISArray::Unshift
- NSISArray::Write
- NSISArray::WriteList
- NSISArray::WriteListC
- NSISdl::download
- NSISdl::download_quiet
- Processes::FindDevice
- Processes::FindProcess
- Processes::KillProcess
- Splash::show
- StartMenu::Init
- StartMenu::Select
- StartMenu::Show
- System::Alloc
- System::Call
- System::Copy
- System::Free
- System::Get
-System::Int64Op
- System::Store
- TypeLib::GetLibVersion
- TypeLib::Register
- TypeLib::UnRegister
- UserInfo::GetAccountType
- UserInfo::GetName
- UserInfo::GetOriginalAccountType
- VPatch::vpatchfile
- WAnsis::config
- WAnsis::setskin
- WAnsis::skinit
- WAnsis::unskinit
- ZipDLL::extractall
- ZipDLL::extractfile
- inetc::get
- inetc::head
- inetc::post
- inetc::put
- md5dll::GetFileMD5
- md5dll::GetMD5
- md5dll::GetMD5File
- md5dll::GetMD5Random
- md5dll::GetMD5String
- newadvsplash::hwnd
- newadvsplash::play
- newadvsplash::show
- newadvsplash::stop
- newadvsplash::wait
- nsDialogs::Create
- nsDialogs::CreateItem
- nsDialogs::OnBack
- nsDialogs::OnChange
- nsDialogs::OnClick
- nsDialogs::Show
- nsExec::Exec
- nsExec::ExecToLog
- nsExec::ExecToStack
- nsislog::Log
- skinnedbutton::setskin
- skinnedbutton::skinit
- skinnedbutton::unskinit

!define: "MUI_INSERT_NSISCONF"=""

Changing directory to: "d:\My Documents"

Processing script file: "d:\My Documents\Untitled02.nsi"
OutFile: "MultiLang.exe"
Name: "$MultiLang"
SetCompressor: /FINAL /SOLID lzma
!define: "XPUI_WANSIS"=""
!define: "XPUI_WANSIS_SKIN"="LCD"
!define: "XPUI_WANSIS_HEADERIMAGE"=""
!include: "C:\Program Files\NSIS\Include\UsefulLib.nsh"
!define: "USEFUL_FUNC"="常用的的函数头文件"
!include: closed: "C:\Program Files\NSIS\Include\UsefulLib.nsh"
!include: "C:\Program Files\NSIS\Include\LogicLib.nsh"
!include: closed: "C:\Program Files\NSIS\Include\LogicLib.nsh"
!include: "C:\Program Files\NSIS\Include\XPUI.nsh"
!define: "XPUI_SYSDIR"="C:\Program Files\NSIS\Contrib\ExperienceUI"
!include: "C:\Program Files\NSIS\Contrib\ExperienceUI\XPUI.nsh"
!define: "XPUI_VERBOSE"="1"
+-------------------------------------------------------------------------------------------------+
| /| /| /| |
| |瘄 _ |瘄 |瘄 |瘄 / / | / / | / / | |
| | |? |_| | | | | | | 瘄 | 瘄 | 瘄 | |
| | 瘄 _ _ ___ ___ _ ___ ____ ____ ___ | | | | | | | | | | | | |
| | |? \\// |痋 / __\ | _| | | / __\ | _ \ / __/ / __\| |__| | | | | | | | | | |
| | 瘄 //\\ | __/ \___/ |_| |_| \___/ |_| |_| \___\ \___/\______/ |_| |_| O |_| |_| |
| ? ? ?|_| [ A better installer ] |
+-------------------------------------------------------------------------------------------------+
(C:\Program Files\NSIS\Contrib\ExperienceUI\XPUI.nsh:57)
NSIS ExperienceUI User Interface version 1.11
Copyright ?2004-2005 Dan Fuhry

Portions written by Joost Verburg
Copyright ?2002-2004 Joost Verburg

XPUI: Processing XPUI code...
(C:\Program Files\NSIS\Contrib\ExperienceUI\XPUI.nsh:65)
XPUI Processing Complete.

(C:\Program Files\NSIS\Contrib\ExperienceUI\XPUI.nsh:3215)
!include: closed: "C:\Program Files\NSIS\Contrib\ExperienceUI\XPUI.nsh"
!include: closed: "C:\Program Files\NSIS\Include\XPUI.nsh"
!insertmacro: MUI_PAGE_COMPONENTS
!insertmacro: XPUI_PAGE_COMPONENTS
!insertmacro: XPUI_PAGECHECKS
!insertmacro: end of XPUI_ENDPAGECHECKS
!insertmacro: end of XPUI_PAGE_COMPONENTS
!insertmacro: end of MUI_PAGE_COMPONENTS
!insertmacro: MUI_PAGE_INSTFILES
!insertmacro: XPUI_PAGE_INSTFILES
!insertmacro: XPUI_PAGECHECKS
!insertmacro: end of XPUI_ENDPAGECHECKS
!insertmacro: end of XPUI_PAGE_INSTFILES
!insertmacro: end of MUI_PAGE_INSTFILES
!insertmacro: MUI_PAGE_FINISH
!insertmacro: XPUI_PAGE_FINISH
!insertmacro: XPUI_PAGECHECKS
!insertmacro: end of XPUI_PAGE_FINISH
!insertmacro: end of MUI_PAGE_FINISH
Section: "1600" ->(SEC01)
SectionEnd
Section: "6310" ->(SEC02)
SectionEnd
!insertmacro: XPUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro: XPUI_FUNCTION_DESCRIPTION_BEGIN (Start Description Function) (macro:XPUI_FUNCTION_DESCRIPTION_BEGIN:4)
!insertmacro: end of XPUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro: XPUI_DESCRIPTION_TEXT
XPUI Section Description Text: Section 0, Text "Description text goes here." (macro:XPUI_DESCRIPTION_TEXT:4)
!insertmacro: end of XPUI_DESCRIPTION_TEXT
!insertmacro: XPUI_DESCRIPTION_TEXT
XPUI Section Description Text: Section 1, Text "222" (macro:XPUI_DESCRIPTION_TEXT:4)
!insertmacro: end of XPUI_DESCRIPTION_TEXT
!insertmacro: XPUI_FUNCTION_DESCRIPTION_END
!insertmacro: XPUI_FUNCTION_DESCRIPTION_END (End Description Function) (macro:XPUI_FUNCTION_DESCRIPTION_END:4)
!insertmacro: end of XPUI_FUNCTION_DESCRIPTION_END
Function: ".onMouseOverSection"
Error: Function named ".onMouseOverSection" already exists.
Error in script "d:\My Documents\Untitled02.nsi" on line 32 -- aborting creation process


Please attach large texts in the future. It makes the topic very hard to read with large pasted blocks.

XPUI already uses .onMouseOverSection and so you must tell it to call your own function as well. Look in the XPUI documentation for the define you need to set in order to tell it to use your function. In the MUI, the same happens with .onGUIInit. There you must define MUI_CUSTOMFUNCTION_GUIINIT.


if i not use .onMouseOverSection
when i move the mouse,the info color not black!

MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO
"Position your mouse over a component to see its description."

Maybe someone can help you in XPUI forums. I don't know why the text would be black in XPUI.

http://xpui.sourceforge.net/forum/


modify the original macros

Error: Function named ".onMouseOverSection" already exists

1.Open XPUI.nsh

2.Go near line 2987, between '; END SECTION DESCRIPTION CODE''; WRITTEN BY JOOST VERBURG' modify:


!macro XPUI_DESCRIPTION_BEGIN
FindWindow $XPUI_TEMP1 `#32770` `` $HWNDPARENT
GetDlgItem $XPUI_TEMP1 $XPUI_TEMP1 1043
StrCmp $0 -1 0 XPUI.description_begin_done
SendMessage $XPUI_TEMP1 0xC 0 `STR:$XPUI_HWND`
EnableWindow $XPUI_TEMP1 0

Goto XPUI.description_done
XPUI.description_begin_done:
!macroend

!macro XPUI_DESCRIPTION_TEXT VAR TEXT
!verbose push
!verbose 4
!ifndef XPUI_SILENT
!echo `XPUI Section Description Text: Section ${VAR}, Text "${TEXT}"`
!endif
!verbose ${XPUI_VERBOSE}
StrCmp $0 ${VAR} 0 XPUI.description_${VAR}_done
SendMessage $XPUI_TEMP1 0xC 0 `STR:`
EnableWindow $XPUI_TEMP1 1
SendMessage $XPUI_TEMP1 0xC 0 `STR:${TEXT}`
Goto XPUI.description_done
XPUI.description_${VAR}_done:
!verbose pop
!macroend

!macro XPUI_DESCRIPTION_END
XPUI.description_done:
!macroend
;==========================================
!macro XPUI_FUNCTION_DESCRIPTION_BEGIN
!verbose push
!verbose 4
!ifndef XPUI_SILENT
!echo `!insertmacro: XPUI_FUNCTION_DESCRIPTION_END (End Description Function)`
!endif
!verbose ${XPUI_VERBOSE}
Function un.onMouseOverSection
FindWindow $XPUI_TEMP1 `#32770` `` $HWNDPARENT
GetDlgItem $XPUI_TEMP1 $XPUI_TEMP1 1042
SendMessage $XPUI_TEMP1 0xC 0 `STR:$XPUI_TEMP2`
!insertmacro XPUI_DESCRIPTION_BEGIN
!verbose pop
!macroend

!macro XPUI_FUNCTION_DESCRIPTION_END
!verbose push
!verbose 4
!verbose ${XPUI_VERBOSE}
!ifndef XPUI_SILENT
!echo `!insertmacro: XPUI_FUNCTION_DESCRIPTION_END (End Description Function)`
!endif
!verbose ${XPUI_VERBOSE}
!insertmacro XPUI_DESCRIPTION_END
FunctionEnd
!verbose pop
!macroend
;===========================================
!macro XPUI_UNFUNCTION_DESCRIPTION_BEGIN
!verbose push
!verbose 4
!ifndef XPUI_SILENT
!echo `!insertmacro: XPUI_UNFUNCTION_DESCRIPTION_END (End Description Function)`
!endif
!verbose ${XPUI_VERBOSE}
Function un.onMouseOverSection
FindWindow $XPUI_TEMP1 `#32770` `` $HWNDPARENT
GetDlgItem $XPUI_TEMP1 $XPUI_TEMP1 1042
SendMessage $XPUI_TEMP1 0xC 0 `STR:$XPUI_TEMP2`
!insertmacro XPUI_DESCRIPTION_BEGIN
!verbose pop
!macroend

!macro XPUI_UNFUNCTION_DESCRIPTION_END
!verbose push
!verbose 4
!verbose ${XPUI_VERBOSE}
!ifndef XPUI_SILENT
!echo `!insertmacro: XPUI_UNFUNCTION_DESCRIPTION_END (End Description Function)`
!endif
!verbose ${XPUI_VERBOSE}
!insertmacro XPUI_DESCRIPTION_END
FunctionEnd
!verbose pop
!macroend

; END SECTION DESCRIPTION CODE