mirror of
https://github.com/AppleWin/AppleWin.git
synced 2024-05-28 17:41:37 +00:00
Bumped version to 1.23.0.1
Added About dialog asking for confirmation about GPL. . About dialog shown whenever the version changes (stored in Registry). . Currently no other way to display About dialog (todo: add way to trigger About from within app). Fixed buffer overrun spotted by Nick in buttonbitmap[] and removed unused BTN_P8CAPS constant.
This commit is contained in:
parent
f3f89bd383
commit
7a00f8656d
|
@ -30,6 +30,7 @@
|
|||
<ClInclude Include="source\CommonVICE\interrupt.h" />
|
||||
<ClInclude Include="source\CommonVICE\mem.h" />
|
||||
<ClInclude Include="source\CommonVICE\types.h" />
|
||||
<ClInclude Include="source\Configuration\About.h" />
|
||||
<ClInclude Include="source\Configuration\Config.h" />
|
||||
<ClInclude Include="source\Configuration\IPropertySheet.h" />
|
||||
<ClInclude Include="source\Configuration\IPropertySheetPage.h" />
|
||||
|
@ -111,6 +112,7 @@
|
|||
<ClCompile Include="source\6821.cpp" />
|
||||
<ClCompile Include="source\Applewin.cpp" />
|
||||
<ClCompile Include="source\AY8910.cpp" />
|
||||
<ClCompile Include="source\Configuration\About.cpp" />
|
||||
<ClCompile Include="source\Configuration\PageAdvanced.cpp" />
|
||||
<ClCompile Include="source\Configuration\PageConfig.cpp" />
|
||||
<ClCompile Include="source\Configuration\PageConfigTfe.cpp" />
|
||||
|
|
|
@ -78,6 +78,9 @@
|
|||
<ClInclude Include="source\CommonVICE\types.h">
|
||||
<Filter>Source Files\CommonVICE</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\Configuration\About.h">
|
||||
<Filter>Source Files\Configuration</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\Configuration\Config.h">
|
||||
<Filter>Source Files\Configuration</Filter>
|
||||
</ClInclude>
|
||||
|
@ -310,6 +313,9 @@
|
|||
<ClCompile Include="source\StdAfx.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\Configuration\About.cpp">
|
||||
<Filter>Source Files\Configuration</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\Configuration\PageAdvanced.cpp">
|
||||
<Filter>Source Files\Configuration</Filter>
|
||||
</ClCompile>
|
||||
|
|
|
@ -364,6 +364,7 @@
|
|||
<ClCompile Include="source\Harddisk.cpp" />
|
||||
<ClCompile Include="source\Frame.cpp" />
|
||||
<ClCompile Include="source\Video.cpp" />
|
||||
<ClCompile Include="source\Configuration\About.cpp" />
|
||||
<ClCompile Include="source\Configuration\PageAdvanced.cpp" />
|
||||
<ClCompile Include="source\Configuration\PageConfig.cpp" />
|
||||
<ClCompile Include="source\Configuration\PageConfigTfe.cpp" />
|
||||
|
@ -439,6 +440,7 @@
|
|||
<ClInclude Include="source\Harddisk.h" />
|
||||
<ClInclude Include="source\Frame.h" />
|
||||
<ClInclude Include="source\Video.h" />
|
||||
<ClInclude Include="source\Configuration\About.h" />
|
||||
<ClInclude Include="source\Configuration\Config.h" />
|
||||
<ClInclude Include="source\Configuration\IPropertySheet.h" />
|
||||
<ClInclude Include="source\Configuration\IPropertySheetPage.h" />
|
||||
|
|
|
@ -182,6 +182,9 @@
|
|||
<ClCompile Include="source\Video.cpp">
|
||||
<Filter>Source\Video</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\Configuration\About.cpp">
|
||||
<Filter>Source\Configuration</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\Configuration\PageAdvanced.cpp">
|
||||
<Filter>Source\Configuration</Filter>
|
||||
</ClCompile>
|
||||
|
@ -403,6 +406,9 @@
|
|||
<ClInclude Include="source\Video.h">
|
||||
<Filter>Source\Video</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\Configuration\About.h">
|
||||
<Filter>Source\Configuration</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\Configuration\Config.h">
|
||||
<Filter>Source\Configuration</Filter>
|
||||
</ClInclude>
|
||||
|
|
|
@ -671,6 +671,14 @@
|
|||
<Filter
|
||||
Name="Configuration"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\source\Configuration\About.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\source\Configuration\About.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\source\Configuration\Config.h"
|
||||
>
|
||||
|
|
|
@ -846,6 +846,14 @@
|
|||
<Filter
|
||||
Name="Configuration"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\source\Configuration\About.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\source\Configuration\About.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\source\Configuration\Config.h"
|
||||
>
|
||||
|
@ -1110,6 +1118,30 @@
|
|||
RelativePath=".\resource\LATON.BMP"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\resource\LED_CAPS_OFF.BMP"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\resource\LED_CAPS_OFF_LAT.BMP"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\resource\LED_CAPS_OFF_P8.BMP"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\resource\LED_CAPS_ON.BMP"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\resource\LED_CAPS_ON_LAT.BMP"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\resource\LED_CAPS_ON_P8.BMP"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\resource\Mockingboard-D.rom"
|
||||
>
|
||||
|
|
|
@ -64,19 +64,12 @@ DISKOFF_BITMAP BITMAP "DISKOFF.BMP"
|
|||
DISKREAD_BITMAP BITMAP "DISKREAD.BMP"
|
||||
DISKWRITE_BITMAP BITMAP "DISKWRIT.BMP"
|
||||
DISKPROT_BITMAP BITMAP "DISKPROT.BMP"
|
||||
//CAPSOFF_BITMAP BITMAP "CAPSOFF.BMP"
|
||||
//CAPSON_BITMAP BITMAP "CAPSON.BMP"
|
||||
//LATOFF_BITMAP BITMAP "LATOFF.BMP"
|
||||
//LATON_BITMAP BITMAP "LATON.BMP"
|
||||
//CAPSOFF_P8_BITMAP BITMAP "CAPSOFF_P8.BMP"
|
||||
//CAPSON_P8_BITMAP BITMAP "CAPSON_P8.BMP"
|
||||
LED_CAPSOFF_BITMAP BITMAP "LED_CAPS_OFF.BMP"
|
||||
LED_CAPSON_BITMAP BITMAP "LED_CAPS_ON.BMP"
|
||||
LED_CAPSOFF_P8_BITMAP BITMAP "LED_CAPS_OFF_P8.BMP"
|
||||
LED_CAPSON_P8_BITMAP BITMAP "LED_CAPS_ON_P8.BMP"
|
||||
LED_LATOFF_BITMAP BITMAP "LED_CAPS_OFF_LAT.BMP"
|
||||
LED_LATON_BITMAP BITMAP "LED_CAPS_ON_LAT.BMP"
|
||||
|
||||
LED_CAPSOFF_BITMAP BITMAP "LED_CAPS_OFF.BMP"
|
||||
LED_CAPSON_BITMAP BITMAP "LED_CAPS_ON.BMP"
|
||||
LED_CAPSOFF_P8_BITMAP BITMAP "LED_CAPS_OFF_P8.BMP"
|
||||
LED_CAPSON_P8_BITMAP BITMAP "LED_CAPS_ON_P8.BMP"
|
||||
LED_LATOFF_BITMAP BITMAP "LED_CAPS_OFF_LAT.BMP"
|
||||
LED_LATON_BITMAP BITMAP "LED_CAPS_ON_LAT.BMP"
|
||||
CHARSET82 BITMAP "CHARSET82.BMP"
|
||||
CHARSET8M BITMAP "CHARSET8C.BMP"
|
||||
CHARSET8C BITMAP "CHARSET8C.BMP"
|
||||
|
@ -142,7 +135,7 @@ BEGIN
|
|||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,123,121,10
|
||||
LTEXT "Microsoft CP/M SoftCard:",IDC_STATIC,5,138,122,10
|
||||
COMBOBOX IDC_CPM_CONFIG,90,136,55,60,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "Paste &From Clipboard",IDC_PASTE_FROM_CLIPBOARD,5,160,81,14
|
||||
PUSHBUTTON "Paste &From Clipboard",IDC_PASTE_FROM_CLIPBOARD,5,160,81,14
|
||||
LTEXT "(Shift+Insert during emulation)",IDC_STATIC,90,163,111,8
|
||||
END
|
||||
|
||||
|
@ -253,8 +246,8 @@ DISK_ICON ICON "DISK.ICO"
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,23,0,0
|
||||
PRODUCTVERSION 1,23,0,0
|
||||
FILEVERSION 1,23,0,1
|
||||
PRODUCTVERSION 1,23,0,1
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -272,12 +265,12 @@ BEGIN
|
|||
VALUE "Comments", "http://applewin.berlios.de"
|
||||
VALUE "CompanyName", "AppleWin"
|
||||
VALUE "FileDescription", "Apple //e Emulator for Windows"
|
||||
VALUE "FileVersion", "1, 23, 0, 0"
|
||||
VALUE "FileVersion", "1, 23, 0, 1"
|
||||
VALUE "InternalName", "APPLEWIN"
|
||||
VALUE "LegalCopyright", " 1994-2013 Michael O'Brien, Oliver Schmidt, Tom Charlesworth, Michael Pohoreski, Nick Westgate, Linards Ticmanis"
|
||||
VALUE "OriginalFilename", "APPLEWIN.EXE"
|
||||
VALUE "ProductName", "Apple //e Emulator"
|
||||
VALUE "ProductVersion", "1, 23, 0, 0"
|
||||
VALUE "ProductVersion", "1, 23, 0, 1"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
@ -389,6 +382,56 @@ END
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.K.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_ABOUT DIALOGEX 0, 0, 240, 183
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION
|
||||
CAPTION "About AppleWin"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
ICON "",IDC_APPLEWIN_ICON,15,10,21,20
|
||||
LTEXT "Static",IDC_APPLEWIN_VERSION,46,17,81,8
|
||||
GROUPBOX "GNU General Public License",IDC_GPL_BORDER,7,37,226,111,BS_CENTER | WS_TABSTOP
|
||||
EDITTEXT IDC_GPL_TEXT,11,57,213,88,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | NOT WS_BORDER | WS_VSCROLL
|
||||
DEFPUSHBUTTON "I accept",IDOK,63,159,48,14
|
||||
PUSHBUTTON "I decline",IDCANCEL,123,159,67,14
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO
|
||||
BEGIN
|
||||
IDD_ABOUT, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 233
|
||||
TOPMARGIN, 6
|
||||
BOTTOMMARGIN, 176
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#endif // English (U.K.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by Applewin.rc
|
||||
// Used by APPLEWIN.RC
|
||||
//
|
||||
#define IDC_COMPUTER 101
|
||||
#define IDC_JOYSTICK0 102
|
||||
|
@ -45,6 +45,7 @@
|
|||
#define IDR_PRAVETS_8C_ROM 142
|
||||
#define IDR_MENU_DISK_POPUP 143
|
||||
#define IDR_MENU_DISK_CFG_POPUP 144
|
||||
#define IDD_ABOUT 145
|
||||
#define IDC_KEYB_BUFFER_ENABLE 1005
|
||||
#define IDC_SAVESTATE 1006
|
||||
#define IDC_SAVESTATE_ON_EXIT 1007
|
||||
|
@ -96,6 +97,10 @@
|
|||
#define IDC_PRINTER_APPEND 1057
|
||||
#define IDC_SPIN_PRINTER_IDLE 1058
|
||||
#define IDC_CHECK_HALF_SCAN_LINES 1059
|
||||
#define IDC_GPL_TEXT 1061
|
||||
#define IDC_GPL_BORDER 1063
|
||||
#define IDC_APPLEWIN_VERSION 1064
|
||||
#define IDC_APPLEWIN_ICON 1065
|
||||
#define IDM_EXIT 40001
|
||||
#define IDM_HELP 40002
|
||||
#define IDM_ABOUT 40003
|
||||
|
@ -113,9 +118,9 @@
|
|||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NO_MFC 1
|
||||
#define _APS_NEXT_RESOURCE_VALUE 145
|
||||
#define _APS_NEXT_RESOURCE_VALUE 146
|
||||
#define _APS_NEXT_COMMAND_VALUE 40012
|
||||
#define _APS_NEXT_CONTROL_VALUE 1060
|
||||
#define _APS_NEXT_CONTROL_VALUE 1066
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -34,6 +34,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
#ifdef USE_SPEECH_API
|
||||
#include "Speech.h"
|
||||
#endif
|
||||
#include "Configuration\About.h"
|
||||
#include "Configuration\PropertySheet.h"
|
||||
#include "Tfe\Tfe.h"
|
||||
|
||||
|
@ -897,9 +898,8 @@ int APIENTRY WinMain(HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int)
|
|||
unsigned long minor = pFixedFileInfo->dwFileVersionMS & 0xffff;
|
||||
unsigned long fix = pFixedFileInfo->dwFileVersionLS >> 16;
|
||||
unsigned long fix_minor = pFixedFileInfo->dwFileVersionLS & 0xffff;
|
||||
|
||||
sprintf(VERSIONSTRING, "%d.%d.%d.%d", major, minor, fix, fix_minor); // potential buffer overflow
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LogFileOutput("AppleWin version: %s\n", VERSIONSTRING);
|
||||
|
@ -990,9 +990,21 @@ int APIENTRY WinMain(HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int)
|
|||
LogFileOutput("Main: VideoInitialize()\n");
|
||||
|
||||
LogFileOutput("Main: FrameCreateWindow() - pre\n");
|
||||
FrameCreateWindow();
|
||||
FrameCreateWindow(); // g_hFrameWindow is now valid
|
||||
LogFileOutput("Main: FrameCreateWindow() - post\n");
|
||||
|
||||
char szOldAppleWinVersion[sizeof(VERSIONSTRING)] = {0};
|
||||
RegLoadString(TEXT(REG_CONFIG), TEXT(REGVALUE_VERSION), 1, szOldAppleWinVersion, sizeof(szOldAppleWinVersion));
|
||||
|
||||
const bool bShowAboutDlg = strcmp(szOldAppleWinVersion, VERSIONSTRING) != 0;
|
||||
if (bShowAboutDlg)
|
||||
{
|
||||
if (!AboutDlg())
|
||||
PostMessage(g_hFrameWindow, WM_DESTROY, 0, 0); // Close everything down
|
||||
else
|
||||
RegSaveString(TEXT(REG_CONFIG), TEXT(REGVALUE_VERSION), 1, VERSIONSTRING); // Only save version after user accepts license
|
||||
}
|
||||
|
||||
// PrintScrn support
|
||||
AppleWin_RegisterHotKeys(); // needs valid g_hFrameWindow
|
||||
LogFileOutput("Main: AppleWin_RegisterHotKeys()\n");
|
||||
|
|
|
@ -52,7 +52,6 @@ enum AppMode_e
|
|||
#define BTN_FULLSCR 5
|
||||
#define BTN_DEBUG 6
|
||||
#define BTN_SETUP 7
|
||||
#define BTN_P8CAPS 9
|
||||
|
||||
// TODO: Move to StringTable.h
|
||||
#define TITLE_APPLE_2 TEXT("Apple ][ Emulator")
|
||||
|
@ -109,6 +108,7 @@ enum AppMode_e
|
|||
#define REGVALUE_SLOT6 "Slot 6"
|
||||
#define REGVALUE_SLOT7 "Slot 7"
|
||||
#define REGVALUE_SLOTAUX "Slot Auxilary"
|
||||
#define REGVALUE_VERSION "Version"
|
||||
|
||||
// Preferences
|
||||
#define REG_PREFS "Preferences"
|
||||
|
|
57
AppleWin/source/Configuration/About.cpp
Normal file
57
AppleWin/source/Configuration/About.cpp
Normal file
|
@ -0,0 +1,57 @@
|
|||
#include "stdafx.h"
|
||||
#include "..\resource\resource.h"
|
||||
|
||||
static const char g_szGPL[] =
|
||||
"This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\
|
||||
\r\n\
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\
|
||||
\r\n\
|
||||
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.";
|
||||
|
||||
|
||||
static BOOL CALLBACK DlgProcAbout(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam)
|
||||
{
|
||||
switch (message)
|
||||
{
|
||||
case WM_NOTIFY:
|
||||
{
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_COMMAND:
|
||||
switch (LOWORD(wparam))
|
||||
{
|
||||
case IDOK:
|
||||
EndDialog(hWnd, 1);
|
||||
return TRUE;
|
||||
case IDCANCEL:
|
||||
EndDialog(hWnd, 0);
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_CLOSE:
|
||||
//EndDialog(hWnd, 0);
|
||||
return TRUE;
|
||||
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
HICON hIcon = LoadIcon(g_hInstance, TEXT("APPLEWIN_ICON"));
|
||||
SendDlgItemMessage(hWnd, IDC_APPLEWIN_ICON, STM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
|
||||
|
||||
char szAppleWinVersion[50];
|
||||
sprintf(szAppleWinVersion, "AppleWin v%s", VERSIONSTRING);
|
||||
SendDlgItemMessage(hWnd, IDC_APPLEWIN_VERSION, WM_SETTEXT, 0, (LPARAM)szAppleWinVersion);
|
||||
|
||||
SendDlgItemMessage(hWnd, IDC_GPL_TEXT, WM_SETTEXT, 0, (LPARAM)g_szGPL);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool AboutDlg(void)
|
||||
{
|
||||
return DialogBox(g_hInstance, (LPCTSTR)IDD_ABOUT, g_hFrameWindow, DlgProcAbout) ? true : false;
|
||||
}
|
1
AppleWin/source/Configuration/About.h
Normal file
1
AppleWin/source/Configuration/About.h
Normal file
|
@ -0,0 +1 @@
|
|||
bool AboutDlg(void);
|
|
@ -244,86 +244,98 @@ static void RevealCursor()
|
|||
|
||||
//===========================================================================
|
||||
|
||||
static void CreateGdiObjects () {
|
||||
ZeroMemory(buttonbitmap,BUTTONS*sizeof(HBITMAP));
|
||||
#define LOADBUTTONBITMAP(bitmapname) LoadImage(g_hInstance,bitmapname, \
|
||||
IMAGE_BITMAP,0,0, \
|
||||
LR_CREATEDIBSECTION | \
|
||||
LR_LOADMAP3DCOLORS | \
|
||||
LR_LOADTRANSPARENT);
|
||||
buttonbitmap[BTN_HELP ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("HELP_BUTTON"));
|
||||
buttonbitmap[BTN_RUN ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("RUN_BUTTON"));
|
||||
switch (g_Apple2Type)
|
||||
{
|
||||
case A2TYPE_APPLE2: buttonbitmap[BTN_RUN ] =(HBITMAP)LOADBUTTONBITMAP(TEXT("RUN_BUTTON")); break;
|
||||
case A2TYPE_APPLE2PLUS: buttonbitmap[BTN_RUN ] =(HBITMAP)LOADBUTTONBITMAP(TEXT("RUN_BUTTON")); break;
|
||||
case A2TYPE_APPLE2E: buttonbitmap[BTN_RUN ] =(HBITMAP)LOADBUTTONBITMAP(TEXT("RUN_BUTTON")); break;
|
||||
case A2TYPE_APPLE2EENHANCED:buttonbitmap[BTN_RUN ] =(HBITMAP)LOADBUTTONBITMAP(TEXT("RUN_BUTTON")); break;
|
||||
case A2TYPE_PRAVETS82: buttonbitmap[BTN_RUN ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("RUNP_BUTTON")); break;
|
||||
case A2TYPE_PRAVETS8M: buttonbitmap[BTN_RUN ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("RUNP_BUTTON")); break;
|
||||
case A2TYPE_PRAVETS8A: buttonbitmap[BTN_RUN ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("RUNP_BUTTON")); break;
|
||||
}
|
||||
|
||||
buttonbitmap[BTN_DRIVE1 ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DRIVE1_BUTTON"));
|
||||
buttonbitmap[BTN_DRIVE2 ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DRIVE2_BUTTON"));
|
||||
buttonbitmap[BTN_DRIVESWAP] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DRIVESWAP_BUTTON"));
|
||||
buttonbitmap[BTN_FULLSCR] = (HBITMAP)LOADBUTTONBITMAP(TEXT("FULLSCR_BUTTON"));
|
||||
buttonbitmap[BTN_DEBUG ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DEBUG_BUTTON"));
|
||||
buttonbitmap[BTN_SETUP ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("SETUP_BUTTON"));
|
||||
buttonbitmap[BTN_P8CAPS ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("CAPSON_BITMAP"));
|
||||
static void CreateGdiObjects(void)
|
||||
{
|
||||
ZeroMemory(buttonbitmap, BUTTONS*sizeof(HBITMAP));
|
||||
|
||||
g_hCapsLockBitmap[0] = (HBITMAP)LOADBUTTONBITMAP(TEXT("LED_CAPSOFF_BITMAP"));
|
||||
g_hCapsLockBitmap[1] = (HBITMAP)LOADBUTTONBITMAP(TEXT("LED_CAPSON_BITMAP"));
|
||||
//Pravets8 only
|
||||
g_hCapsBitmapP8[0] = (HBITMAP)LOADBUTTONBITMAP(TEXT("LED_CAPSOFF_P8_BITMAP"));
|
||||
g_hCapsBitmapP8[1] = (HBITMAP)LOADBUTTONBITMAP(TEXT("LED_CAPSON_P8_BITMAP"));
|
||||
g_hCapsBitmapLat[0] = (HBITMAP)LOADBUTTONBITMAP(TEXT("LED_LATOFF_BITMAP"));
|
||||
g_hCapsBitmapLat[1] = (HBITMAP)LOADBUTTONBITMAP(TEXT("LED_LATON_BITMAP"));
|
||||
buttonbitmap[BTN_HELP] = (HBITMAP)LOADBUTTONBITMAP(TEXT("HELP_BUTTON"));
|
||||
|
||||
/*charsetbitmap[0] = (HBITMAP)LOADBUTTONBITMAP(TEXT("CHARSET_APPLE_BITMAP"));
|
||||
charsetbitmap[1] = (HBITMAP)LOADBUTTONBITMAP(TEXT("CHARSET_82_BITMAP"));
|
||||
charsetbitmap[2] = (HBITMAP)LOADBUTTONBITMAP(TEXT("CHARSET_8A_BITMAP"));
|
||||
charsetbitmap[3] = (HBITMAP)LOADBUTTONBITMAP(TEXT("CHARSET_8M_BITMAP"));
|
||||
*/
|
||||
//===========================
|
||||
g_hDiskWindowedLED[ DISK_STATUS_OFF ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DISKOFF_BITMAP"));
|
||||
g_hDiskWindowedLED[ DISK_STATUS_READ ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DISKREAD_BITMAP"));
|
||||
g_hDiskWindowedLED[ DISK_STATUS_WRITE] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DISKWRITE_BITMAP"));
|
||||
g_hDiskWindowedLED[ DISK_STATUS_PROT ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DISKPROT_BITMAP"));
|
||||
|
||||
// Full Screen Drive LED
|
||||
// g_hDiskFullScreenLED[ DISK_STATUS_OFF ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DISK_FULLSCREEN_O")); // Full Screen Off
|
||||
// g_hDiskFullScreenLED[ DISK_STATUS_READ ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DISK_FULLSCREEN_R")); // Full Screen Read Only
|
||||
// g_hDiskFullScreenLED[ DISK_STATUS_WRITE] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DISK_FULLSCREEN_W")); // Full Screen Write
|
||||
// g_hDiskFullScreenLED[ DISK_STATUS_PROT ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DISK_FULLSCREEN_P")); // Full Screen Write Protected
|
||||
switch (g_Apple2Type)
|
||||
{
|
||||
case A2TYPE_PRAVETS82:
|
||||
case A2TYPE_PRAVETS8M:
|
||||
case A2TYPE_PRAVETS8A:
|
||||
buttonbitmap[BTN_RUN] = (HBITMAP)LOADBUTTONBITMAP(TEXT("RUNP_BUTTON"));
|
||||
break;
|
||||
default:
|
||||
buttonbitmap[BTN_RUN] = (HBITMAP)LOADBUTTONBITMAP(TEXT("RUN_BUTTON"));
|
||||
break;
|
||||
}
|
||||
|
||||
btnfacebrush = CreateSolidBrush(GetSysColor(COLOR_BTNFACE));
|
||||
btnfacepen = CreatePen(PS_SOLID,1,GetSysColor(COLOR_BTNFACE));
|
||||
btnhighlightpen = CreatePen(PS_SOLID,1,GetSysColor(COLOR_BTNHIGHLIGHT));
|
||||
btnshadowpen = CreatePen(PS_SOLID,1,GetSysColor(COLOR_BTNSHADOW));
|
||||
smallfont = CreateFont(11,6,0,0,FW_NORMAL,0,0,0,ANSI_CHARSET,
|
||||
OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,
|
||||
DEFAULT_QUALITY,VARIABLE_PITCH | FF_SWISS,
|
||||
TEXT("Small Fonts"));
|
||||
buttonbitmap[BTN_DRIVE1 ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DRIVE1_BUTTON"));
|
||||
buttonbitmap[BTN_DRIVE2 ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DRIVE2_BUTTON"));
|
||||
buttonbitmap[BTN_DRIVESWAP] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DRIVESWAP_BUTTON"));
|
||||
buttonbitmap[BTN_FULLSCR ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("FULLSCR_BUTTON"));
|
||||
buttonbitmap[BTN_DEBUG ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DEBUG_BUTTON"));
|
||||
buttonbitmap[BTN_SETUP ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("SETUP_BUTTON"));
|
||||
|
||||
//
|
||||
|
||||
g_hCapsLockBitmap[0] = (HBITMAP)LOADBUTTONBITMAP(TEXT("LED_CAPSOFF_BITMAP"));
|
||||
g_hCapsLockBitmap[1] = (HBITMAP)LOADBUTTONBITMAP(TEXT("LED_CAPSON_BITMAP"));
|
||||
//Pravets8 only
|
||||
g_hCapsBitmapP8[0] = (HBITMAP)LOADBUTTONBITMAP(TEXT("LED_CAPSOFF_P8_BITMAP"));
|
||||
g_hCapsBitmapP8[1] = (HBITMAP)LOADBUTTONBITMAP(TEXT("LED_CAPSON_P8_BITMAP"));
|
||||
g_hCapsBitmapLat[0] = (HBITMAP)LOADBUTTONBITMAP(TEXT("LED_LATOFF_BITMAP"));
|
||||
g_hCapsBitmapLat[1] = (HBITMAP)LOADBUTTONBITMAP(TEXT("LED_LATON_BITMAP"));
|
||||
|
||||
/*charsetbitmap[0] = (HBITMAP)LOADBUTTONBITMAP(TEXT("CHARSET_APPLE_BITMAP"));
|
||||
charsetbitmap[1] = (HBITMAP)LOADBUTTONBITMAP(TEXT("CHARSET_82_BITMAP"));
|
||||
charsetbitmap[2] = (HBITMAP)LOADBUTTONBITMAP(TEXT("CHARSET_8A_BITMAP"));
|
||||
charsetbitmap[3] = (HBITMAP)LOADBUTTONBITMAP(TEXT("CHARSET_8M_BITMAP"));
|
||||
*/
|
||||
//===========================
|
||||
g_hDiskWindowedLED[ DISK_STATUS_OFF ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DISKOFF_BITMAP"));
|
||||
g_hDiskWindowedLED[ DISK_STATUS_READ ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DISKREAD_BITMAP"));
|
||||
g_hDiskWindowedLED[ DISK_STATUS_WRITE] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DISKWRITE_BITMAP"));
|
||||
g_hDiskWindowedLED[ DISK_STATUS_PROT ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DISKPROT_BITMAP"));
|
||||
|
||||
// Full Screen Drive LED
|
||||
// g_hDiskFullScreenLED[ DISK_STATUS_OFF ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DISK_FULLSCREEN_O")); // Full Screen Off
|
||||
// g_hDiskFullScreenLED[ DISK_STATUS_READ ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DISK_FULLSCREEN_R")); // Full Screen Read Only
|
||||
// g_hDiskFullScreenLED[ DISK_STATUS_WRITE] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DISK_FULLSCREEN_W")); // Full Screen Write
|
||||
// g_hDiskFullScreenLED[ DISK_STATUS_PROT ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DISK_FULLSCREEN_P")); // Full Screen Write Protected
|
||||
|
||||
btnfacebrush = CreateSolidBrush(GetSysColor(COLOR_BTNFACE));
|
||||
btnfacepen = CreatePen(PS_SOLID,1,GetSysColor(COLOR_BTNFACE));
|
||||
btnhighlightpen = CreatePen(PS_SOLID,1,GetSysColor(COLOR_BTNHIGHLIGHT));
|
||||
btnshadowpen = CreatePen(PS_SOLID,1,GetSysColor(COLOR_BTNSHADOW));
|
||||
smallfont = CreateFont(11,6,0,0,FW_NORMAL,0,0,0,ANSI_CHARSET,
|
||||
OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,
|
||||
DEFAULT_QUALITY,VARIABLE_PITCH | FF_SWISS,
|
||||
TEXT("Small Fonts"));
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
static void DeleteGdiObjects () {
|
||||
int loop;
|
||||
for (loop = 0; loop < BUTTONS; loop++)
|
||||
DeleteObject(buttonbitmap[loop]);
|
||||
for (loop = 0; loop < 2; loop++)
|
||||
DeleteObject(g_hCapsLockBitmap[loop]);
|
||||
for (loop = 0; loop < NUM_DISK_STATUS; loop++)
|
||||
{
|
||||
DeleteObject(g_hDiskWindowedLED[loop]);
|
||||
//DeleteObject(g_hDiskFullScreenLED[loop]);
|
||||
}
|
||||
DeleteObject(btnfacebrush);
|
||||
DeleteObject(btnfacepen);
|
||||
DeleteObject(btnhighlightpen);
|
||||
DeleteObject(btnshadowpen);
|
||||
DeleteObject(smallfont);
|
||||
static void DeleteGdiObjects(void)
|
||||
{
|
||||
for (int loop = 0; loop < BUTTONS; loop++)
|
||||
_ASSERT(DeleteObject(buttonbitmap[loop]));
|
||||
|
||||
for (int loop = 0; loop < 2; loop++)
|
||||
{
|
||||
_ASSERT(DeleteObject(g_hCapsLockBitmap[loop]));
|
||||
_ASSERT(DeleteObject(g_hCapsBitmapP8[loop]));
|
||||
_ASSERT(DeleteObject(g_hCapsBitmapLat[loop]));
|
||||
}
|
||||
|
||||
for (int loop = 0; loop < NUM_DISK_STATUS; loop++)
|
||||
{
|
||||
_ASSERT(DeleteObject(g_hDiskWindowedLED[loop]));
|
||||
//_ASSERT(DeleteObject(g_hDiskFullScreenLED[loop]));
|
||||
}
|
||||
|
||||
_ASSERT(DeleteObject(btnfacebrush));
|
||||
_ASSERT(DeleteObject(btnfacepen));
|
||||
_ASSERT(DeleteObject(btnhighlightpen));
|
||||
_ASSERT(DeleteObject(btnshadowpen));
|
||||
_ASSERT(DeleteObject(smallfont));
|
||||
}
|
||||
|
||||
// Draws an 3D box around the main apple screen
|
||||
|
@ -1671,6 +1683,11 @@ void ProcessDiskPopupMenu(HWND hwnd, POINT pt, const int iDrive)
|
|||
else
|
||||
if (iCommand == ID_DISKMENU_SENDTO_CIDERPRESS)
|
||||
{
|
||||
static char szCiderpressNotFoundCaption[] = "CiderPress not found";
|
||||
static char szCiderpressNotFoundText[] = "CiderPress not found!\n"
|
||||
"Please install CiderPress.\n"
|
||||
"Otherwise set the path to CiderPress from Configuration->Disk.";
|
||||
|
||||
//if(!filename1.compare("\"\"") == false) //Do not use this, for some reason it does not work!!!
|
||||
if(!filename1.compare(sFileNameEmpty) )
|
||||
{
|
||||
|
@ -1683,11 +1700,7 @@ void ProcessDiskPopupMenu(HWND hwnd, POINT pt, const int iDrive)
|
|||
}
|
||||
else
|
||||
{
|
||||
MessageBox( NULL,
|
||||
"CiderPress not found!\n"
|
||||
"Please install CiderPress in case it is not \n"
|
||||
"or set the path to it from Configuration/Disk otherwise."
|
||||
, "CiderPress not found" ,MB_ICONINFORMATION|MB_OK);
|
||||
MessageBox(NULL, szCiderpressNotFoundText, szCiderpressNotFoundCaption, MB_ICONINFORMATION|MB_OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1699,11 +1712,7 @@ void ProcessDiskPopupMenu(HWND hwnd, POINT pt, const int iDrive)
|
|||
}
|
||||
else
|
||||
{
|
||||
MessageBox( NULL,
|
||||
"CiderPress not found!\n"
|
||||
"Please install CiderPress in case it is not \n"
|
||||
"or set the path to it from Configuration/Disk otherwise."
|
||||
, "CiderPress not found" ,MB_ICONINFORMATION|MB_OK);
|
||||
MessageBox(NULL, szCiderpressNotFoundText, szCiderpressNotFoundCaption, MB_ICONINFORMATION|MB_OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user