System.dll does all that ShowWin.dll does and more
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1626 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
a1d7155dfb
commit
b2261023af
6 changed files with 0 additions and 291 deletions
|
@ -1,107 +0,0 @@
|
|||
#include <windows.h>
|
||||
#include "../exdll/exdll.h"
|
||||
|
||||
//cleaned up by JF 9/21/02
|
||||
|
||||
int my_atoi(char *s);
|
||||
|
||||
|
||||
HINSTANCE g_hInstance;
|
||||
|
||||
HWND mygetwnd()
|
||||
{
|
||||
if (g_stacktop && *g_stacktop)
|
||||
{
|
||||
HWND h=(HWND)my_atoi((*g_stacktop)->text);
|
||||
popstring(NULL);
|
||||
return h;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __declspec(dllexport) Show(HWND hwndParent, int string_size,
|
||||
char *variables, stack_t **stacktop)
|
||||
{
|
||||
EXDLL_INIT()
|
||||
{
|
||||
HWND hwnd_ctrl=mygetwnd();
|
||||
if (hwnd_ctrl && IsWindow(hwnd_ctrl)) ShowWindow(hwnd_ctrl,1);
|
||||
}
|
||||
}
|
||||
|
||||
void __declspec(dllexport) Hide(HWND hwndParent, int string_size, char *variables, stack_t **stacktop){
|
||||
EXDLL_INIT()
|
||||
{
|
||||
HWND hwnd_ctrl=mygetwnd();
|
||||
if (hwnd_ctrl && IsWindow(hwnd_ctrl)) ShowWindow(hwnd_ctrl,0);
|
||||
}
|
||||
}
|
||||
|
||||
void __declspec(dllexport) Enable(HWND hwndParent, int string_size, char *variables, stack_t **stacktop){
|
||||
EXDLL_INIT()
|
||||
{
|
||||
HWND hwnd_ctrl=mygetwnd();
|
||||
if (hwnd_ctrl && IsWindow(hwnd_ctrl)) EnableWindow(hwnd_ctrl,TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
void __declspec(dllexport) Disable(HWND hwndParent, int string_size, char *variables, stack_t **stacktop){
|
||||
EXDLL_INIT()
|
||||
{
|
||||
HWND hwnd_ctrl=mygetwnd();
|
||||
if (hwnd_ctrl && IsWindow(hwnd_ctrl)) EnableWindow(hwnd_ctrl,0);
|
||||
}
|
||||
}
|
||||
|
||||
BOOL WINAPI _DllMainCRTStartup(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
|
||||
{
|
||||
g_hInstance=hInst;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int my_atoi(char *s)
|
||||
{
|
||||
unsigned int v=0;
|
||||
if (*s == '0' && (s[1] == 'x' || s[1] == 'X'))
|
||||
{
|
||||
s+=2;
|
||||
for (;;)
|
||||
{
|
||||
int c=*s++;
|
||||
if (c >= '0' && c <= '9') c-='0';
|
||||
else if (c >= 'a' && c <= 'f') c-='a'-10;
|
||||
else if (c >= 'A' && c <= 'F') c-='A'-10;
|
||||
else break;
|
||||
v<<=4;
|
||||
v+=c;
|
||||
}
|
||||
}
|
||||
else if (*s == '0' && s[1] <= '7' && s[1] >= '0')
|
||||
{
|
||||
s++;
|
||||
for (;;)
|
||||
{
|
||||
int c=*s++;
|
||||
if (c >= '0' && c <= '7') c-='0';
|
||||
else break;
|
||||
v<<=3;
|
||||
v+=c;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
int sign=0;
|
||||
if (*s == '-') { s++; sign++; }
|
||||
for (;;)
|
||||
{
|
||||
int c=*s++ - '0';
|
||||
if (c < 0 || c > 9) break;
|
||||
v*=10;
|
||||
v+=c;
|
||||
}
|
||||
if (sign) return -(int) v;
|
||||
}
|
||||
return (int)v;
|
||||
}
|
||||
|
||||
|
|
@ -1,111 +0,0 @@
|
|||
# Microsoft Developer Studio Project File - Name="ShowWin" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
|
||||
CFG=ShowWin - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "ShowWin.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "ShowWin.mak" CFG="ShowWin - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "ShowWin - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "ShowWin - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "ShowWin - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ShowWin_EXPORTS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ShowWin_EXPORTS" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /entry:"_DllMainCRTStartup" /dll /machine:I386 /nodefaultlib /opt:nowin98
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ELSEIF "$(CFG)" == "ShowWin - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ShowWin_EXPORTS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ShowWin_EXPORTS" /YX /FD /GZ /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "ShowWin - Win32 Release"
|
||||
# Name "ShowWin - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ShowWin.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\ExDLL\exdll.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
|
@ -1,29 +0,0 @@
|
|||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "ShowWin"=.\ShowWin.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
;ShowWin Example
|
||||
|
||||
Name "ShowWin Example"
|
||||
OutFile "ShowWin.exe"
|
||||
|
||||
LicenseText "Hide Richedit Control and disable the 'I agree' button."
|
||||
LicenseData "ShowWin.txt"
|
||||
|
||||
Section ""
|
||||
SectionEnd
|
||||
|
||||
Function .onInitDialog
|
||||
;hide richedit control
|
||||
FindWindow $R1 "#32770" "" $HWNDPARENT
|
||||
GetDlgItem $R1 $R1 1000
|
||||
ShowWin::Hide $R1
|
||||
|
||||
;disable the 'I Agree' button
|
||||
GetDlgItem $R1 $HWNDPARENT 1
|
||||
ShowWin::Disable $R1
|
||||
FunctionEnd
|
|
@ -1,23 +0,0 @@
|
|||
ShowWin Plugin
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Description:
|
||||
ShowWin is a small plugin which will allow you to hide, show, enable
|
||||
and disable controls.
|
||||
|
||||
Usage:
|
||||
ShowWin::Show hwnd
|
||||
ShowWin::Hide hwnd
|
||||
ShowWin::Enable hwnd
|
||||
ShowWin::Disable hwnd
|
||||
|
||||
Example:
|
||||
Hide the version label
|
||||
|
||||
GetDlgItem $R1 $HWNDPARENT 1028
|
||||
ShowWin::Hide $R1
|
||||
|
||||
Also see ShowWin.nsi.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Copyright (c) 2002 Don Selkirk
|
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue