Win32 - Debugger - added "Restore original size" button

This commit is contained in:
adelikat 2008-12-16 16:08:42 +00:00
parent 35ea920c3c
commit cf78b188ad
4 changed files with 24 additions and 6 deletions

View File

@ -1,4 +1,5 @@
---version 2.0.4 yet to be released---
16-dec-2008 - adelikat - win32 - debugger - added "Restore original window size" button
16-dec-2008 - adelikat - win32 - debugger - fixed SF2073113 - Debugger now has a minimum valid size
15-dec-2008 - adelikat - win32 - cheats - number of active cheats listed, freezing ram addresses in hex editor automatically updates cheats dialog
15-dec-2008 - adelikat - win32 - hexeditor - added minimize & maximize buttons

View File

@ -65,6 +65,16 @@ static SCROLLINFO si;
#define MAX_NAME_SIZE 200
#define MAX_CONDITION_SIZE 200
void RestoreSize(HWND hwndDlg)
{
//As of the writing of this function (revision 1053) the Debugger default width = 821 and height of 523
//If the dialog dimensions are changed those changes need to be reflected here. - adelikat
const int DEFAULT_WIDTH = 821; //Original width
const int DEFAULT_HEIGHT = 523; //Original height
SetWindowPos(hwndDlg,HWND_TOPMOST,DbgPosX,DbgPosY,DEFAULT_WIDTH,DEFAULT_HEIGHT,SWP_SHOWWINDOW);
}
unsigned int NewBreakWindows(HWND hwndDlg, unsigned int num, bool enable)
{
char startOffsetBuffer[5] = {0};
@ -1192,6 +1202,9 @@ BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
switch(HIWORD(wParam)) {
case BN_CLICKED:
switch(LOWORD(wParam)) {
case IDC_DEBUGGER_RESTORESIZE:
RestoreSize(hwndDlg);
break;
case IDC_DEBUGGER_BP_ADD:
childwnd = 1;
if (DialogBox(fceu_hInstance,"ADDBP",hwndDlg,AddbpCallB)) AddBreakList();
@ -1285,7 +1298,7 @@ BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
case IDC_DEBUGGER_ENABLE_SYMBOLIC: UpdateDebugger(); break;
// ################################## End of SP CODE ###########################
case IDC_DEBUGGER_ROM_PATCHER: DoPatcher(-1,hwndDlg); break;
}
//UpdateDebugger();

View File

@ -942,7 +942,7 @@ BEGIN
PUSHBUTTON "<",MEMW_EXPANDCOLLAPSE,1,259,11,10
END
DEBUGGER DIALOGEX 54, 74, 548, 305
DEBUGGER DIALOGEX 54, 74, 542, 305
STYLE DS_SETFONT | DS_3DLOOK | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
CAPTION "6502 Debugger"
FONT 8, "MS Sans Serif", 0, 0, 0x0
@ -967,7 +967,7 @@ BEGIN
PUSHBUTTON "Step Into",IDC_DEBUGGER_STEP_IN,389,7,38,14
PUSHBUTTON "Step Out",IDC_DEBUGGER_STEP_OUT,349,23,37,14
PUSHBUTTON "Step Over",IDC_DEBUGGER_STEP_OVER,389,23,38,14
LTEXT "A:",-1,349,83,10,8
LTEXT "A:",IDC_STATIC,349,83,10,8
LTEXT "X:",65534,376,83,10,8
LTEXT "Y:",65533,404,83,10,8
LTEXT "PC:",65532,349,65,13,8
@ -995,8 +995,10 @@ BEGIN
EDITTEXT IDC_DEBUGGER_BOOKMARK,421,223,40,14,ES_AUTOHSCROLL
PUSHBUTTON "Add",IDC_DEBUGGER_BOOKMARK_ADD,421,239,40,14
PUSHBUTTON "Delete",IDC_DEBUGGER_BOOKMARK_DEL,421,255,40,14
PUSHBUTTON "Rom Patcher",IDC_DEBUGGER_ROM_PATCHER,489,198,49,14
PUSHBUTTON "Rom Patcher",IDC_DEBUGGER_ROM_PATCHER,487,198,46,14
CONTROL "",IDC_DEBUGGER_ICONTRAY,"Static",SS_BLACKFRAME,5,7,10,287
PUSHBUTTON "",IDC_DEBUGGER_RESTORESIZE,348,296,9,7
LTEXT "Restore original window size",IDC_STATIC,359,295,90,8
END
TRACER DIALOGEX 65527, 65513, 398, 319
@ -1511,7 +1513,7 @@ BEGIN
"DEBUGGER", DIALOG
BEGIN
RIGHTMARGIN, 547
RIGHTMARGIN, 541
END
"ADDBP", DIALOG

View File

@ -383,6 +383,8 @@
#define MEMW_EDIT02RMADDRESS 1190
#define INSERTCS_STATIC 1190
#define MEMW_EDIT03RMADDRESS 1191
#define IDC_DEBUG_RESTORESIZE 1191
#define IDC_DEBUGGER_RESTORESIZE 1191
#define MEMW_EDIT04RMADDRESS 1192
#define EDIT00_RESULTS 1193
#define EDIT01_RESULTS 1194
@ -633,7 +635,7 @@
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 125
#define _APS_NEXT_COMMAND_VALUE 40315
#define _APS_NEXT_CONTROL_VALUE 1191
#define _APS_NEXT_CONTROL_VALUE 1192
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif