动态移动控件及鼠标响应

!include nsDialogs.nsh
!include LogicLib.nsh
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Name nsDialogs
OutFile nsDialogs.exe
#########################################
XPStyle on
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Var Dialog
Var Image
Var Button
;**************************************
Page custom nsDialogsPage
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Section
SectionEnd
;#########################################
Function .onInit
 InitPluginsDir
 File /ONAME=$PLUGINSDIRD87.bmp D87.bmp
FunctionEnd
#########################################
Function nsDialogsPage
nsDialogs::Create /NOUNLOAD 1018
 Pop $Dialog
 ${If} $Dialog == error
Abort
${EndIf}
 GetFunctionAddress $0 MainWndSubProc
 WndProc::onCallback /r=1 $Dialog $0
 ${NSd_CreateBitmap} 0 0 100% 100% ''
 Pop $Image
${NSD_SetImage} $Image '$PLUGINSDIRD87.bmp' $1
 GetFunctionAddress $0 ImgeSubProc
 WndProc::onCallback /r=1 $Image $0
${NSD_CreateButton} 200u 60 60 35 'Move'
 Pop $Button
 ${NSD_OnClick} $Button OnMove
${NSd_CreateBitmap} 0 90 100% 100% ''
 Pop $Image
${NSD_SetImage} $Image '$PLUGINSDIRD87.bmp' $1
 ShowWindow $Image 0
nsDialogs::show
FunctionEnd
############################################################
Function ImgeSubProc
 ${If} $2 = ${WM_NCHITTEST}
 ShowWindow $Image 1
 ${EndIf}
FunctionEnd
###########################################################
Function MainWndSubProc
 ${If} $2 = ${WM_NCHITTEST}
 ShowWindow $Image 0
 ${EndIf}
FunctionEnd
##########################################################
Function OnMove
 FindWindow $R0 "#32770" "" $HWNDPARENT
 GetDlgItem $0 $R0 1200
System::Call `user32::MoveWindow(ir0,i150,i0,i90,i90,i1)in`
 ;Pop $4
FunctionEnd
© 版权声明
THE END
喜欢就支持一下吧
点赞5 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容