Even easier paging system, no more Abort and Quit from custom pages creator functions, NSIS does it all!

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1636 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2002-11-09 12:50:00 +00:00
parent 35b45db225
commit 297e981d32
17 changed files with 123 additions and 335 deletions

View file

@ -1,6 +1,6 @@
#include <Windows.h>
#include <Mmsystem.h>
#include "exdll.h"
#include "../exdll/exdll.h"
int x, y;
char temp[MAX_PATH];

View file

@ -67,7 +67,7 @@ SOURCE=.\BgImage.cpp
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\exdll.h
SOURCE=..\ExDLL\exdll.h
# End Source File
# End Group
# Begin Group "Resource Files"

View file

@ -1,49 +0,0 @@
#ifndef _EXDLL_H_
#define _EXDLL_H_
// only include this file from one place in your DLL.
// (it is all static, if you use it in two places it will fail)
#define EXDLL_INIT() { \
g_hwndParent=hwndParent; \
g_stringsize=string_size; \
g_stacktop=stacktop; \
/*g_variables=variables;*/ }
typedef struct _stack_t {
struct _stack_t *next;
char text[1]; // this should be the length of string_size
} stack_t;
static int g_stringsize;
static stack_t **g_stacktop;
static HWND g_hwndParent;
static int popstring(char *str); // 0 on success, 1 on empty stack
static void pushstring(char *str);
// utility functions (not required but often useful)
static int popstring(char *str)
{
stack_t *th;
if (!g_stacktop || !*g_stacktop) return 1;
th=(*g_stacktop);
lstrcpy(str,th->text);
*g_stacktop = th->next;
GlobalFree((HGLOBAL)th);
return 0;
}
static void pushstring(char *str)
{
stack_t *th;
if (!g_stacktop) return;
th=(stack_t*)GlobalAlloc(GPTR,sizeof(stack_t)+g_stringsize);
lstrcpyn(th->text,str,g_stringsize);
th->next=*g_stacktop;
*g_stacktop=th;
}
#endif//_EXDLL_H_