Win32 - Hex Editor remembers window size
This commit is contained in:
parent
2960c30888
commit
0bf9abd12f
|
@ -1,4 +1,7 @@
|
||||||
---version 2.0.4 yet to be released---
|
---version 2.0.4 yet to be released---
|
||||||
|
06-feb-2009 - adelikat - win32 - Hex editor - remembers window size
|
||||||
|
06-feb-2009 - adelikat - Win32 - sound config dialog - added sliders for individual sound channel volume control
|
||||||
|
06-feb-2009 - adelikat - Sound channels now have individual volume control
|
||||||
01-jan-2009 - adelikat - Win32 - Timing - "disable throttling when sound is off" now only affects FCEUX when sound is off
|
01-jan-2009 - adelikat - Win32 - Timing - "disable throttling when sound is off" now only affects FCEUX when sound is off
|
||||||
26-dec-2008 - adelikat - Metadata - remember window position
|
26-dec-2008 - adelikat - Metadata - remember window position
|
||||||
24-dec-2008 - adelikat - auto-save fixes, prevent loading an auto-save from previous session. Win32 - added flags for enabling auto-save menu item.
|
24-dec-2008 - adelikat - auto-save fixes, prevent loading an auto-save from previous session. Win32 - added flags for enabling auto-save menu item.
|
||||||
|
|
|
@ -59,6 +59,7 @@ extern uint8 gNoBGFillColor;
|
||||||
extern int ChtPosX,ChtPosY;
|
extern int ChtPosX,ChtPosY;
|
||||||
extern int DbgPosX,DbgPosY;
|
extern int DbgPosX,DbgPosY;
|
||||||
extern int DbgSizeX,DbgSizeY;
|
extern int DbgSizeX,DbgSizeY;
|
||||||
|
extern int MemViewSizeX,MemViewSizeY;
|
||||||
extern int MemView_wndx, MemView_wndy;
|
extern int MemView_wndx, MemView_wndy;
|
||||||
extern int MemFind_wndx, MemFind_wndy;
|
extern int MemFind_wndx, MemFind_wndy;
|
||||||
extern int NTViewPosX,NTViewPosY;
|
extern int NTViewPosX,NTViewPosY;
|
||||||
|
@ -193,6 +194,8 @@ static CFGSTRUCT fceuconfig[] = {
|
||||||
AC(DbgPosY),
|
AC(DbgPosY),
|
||||||
AC(DbgSizeX),
|
AC(DbgSizeX),
|
||||||
AC(DbgSizeY),
|
AC(DbgSizeY),
|
||||||
|
AC(MemViewSizeX),
|
||||||
|
AC(MemViewSizeY),
|
||||||
AC(MemView_wndx),
|
AC(MemView_wndx),
|
||||||
AC(MemView_wndy),
|
AC(MemView_wndy),
|
||||||
AC(MemFind_wndx),
|
AC(MemFind_wndx),
|
||||||
|
|
|
@ -120,6 +120,8 @@ int TableFileLoaded;
|
||||||
|
|
||||||
int MemView_wndx, MemView_wndy;
|
int MemView_wndx, MemView_wndy;
|
||||||
int MemFind_wndx, MemFind_wndy;
|
int MemFind_wndx, MemFind_wndy;
|
||||||
|
int MemViewSizeX=0,MemViewSizeY=0;
|
||||||
|
static RECT newMemViewRect;
|
||||||
|
|
||||||
char chartable[256];
|
char chartable[256];
|
||||||
|
|
||||||
|
@ -867,8 +869,7 @@ LRESULT CALLBACK MemViewCallB(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case WM_CREATE:
|
case WM_CREATE:
|
||||||
SetWindowPos(hwnd,0,MemView_wndx,MemView_wndy,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_NOOWNERZORDER);
|
SetWindowPos(hwnd,0,MemView_wndx,MemView_wndy,MemViewSizeX,MemViewSizeY,SWP_NOZORDER|SWP_NOOWNERZORDER);
|
||||||
|
|
||||||
// ################################## Start of SP CODE ###########################
|
// ################################## Start of SP CODE ###########################
|
||||||
debuggerWasActive = 1;
|
debuggerWasActive = 1;
|
||||||
// ################################## End of SP CODE ###########################
|
// ################################## End of SP CODE ###########################
|
||||||
|
@ -1305,6 +1306,12 @@ LRESULT CALLBACK MemViewCallB(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case WM_SIZE:
|
case WM_SIZE:
|
||||||
|
if(wParam == SIZE_RESTORED) //If dialog was resized
|
||||||
|
{
|
||||||
|
GetWindowRect(hwnd,&newMemViewRect); //Get new size
|
||||||
|
MemViewSizeX = newMemViewRect.right-newMemViewRect.left; //Store new size (this will be used to store in the .cfg file)
|
||||||
|
MemViewSizeY = newMemViewRect.bottom-newMemViewRect.top;
|
||||||
|
}
|
||||||
ClientHeight = HIWORD (lParam);
|
ClientHeight = HIWORD (lParam);
|
||||||
if(DataAmount != ((ClientHeight/MemFontHeight)*16)){
|
if(DataAmount != ((ClientHeight/MemFontHeight)*16)){
|
||||||
DataAmount = ((ClientHeight/MemFontHeight)*16);
|
DataAmount = ((ClientHeight/MemFontHeight)*16);
|
||||||
|
@ -1552,7 +1559,6 @@ void DoMemView() {
|
||||||
UpdateCaption();
|
UpdateCaption();
|
||||||
}
|
}
|
||||||
if (hMemView) {
|
if (hMemView) {
|
||||||
SetWindowPos(hMemView,HWND_TOP,0,0,0,0,SWP_NOSIZE|SWP_NOMOVE|SWP_NOOWNERZORDER);
|
|
||||||
//UpdateMemView(0);
|
//UpdateMemView(0);
|
||||||
//MemViewDoBlit();
|
//MemViewDoBlit();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue