Win32 - Message Log - Remembers X,Y Position

This commit is contained in:
adelikat 2009-02-21 22:04:13 +00:00
parent 099c31e948
commit ef92dee8c6
4 changed files with 21 additions and 1 deletions

View File

@ -1,5 +1,6 @@
---version 2.0.4 yet to be released---
19-feb-2009 - adelikat - win32 - memory watch - fixed recent file menu - no longer crashes when attempting to load a non existent recent file
21-feb-2009 - adelikat - win32 - Message Log - remembers X,Y position
19-feb-2009 - adelikat - win32 - Memory Watch - fixed recent file menu - no longer crashes when attempting to load a non existent recent file
07-feb-2009 - adelikat - win32 - Fix bug in screenshot numbering that caused numbering to not reset when changing ROMs
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

View File

@ -72,6 +72,7 @@ extern int CDLogger_wndx, CDLogger_wndy;
extern int GGConv_wndx, GGConv_wndy;
extern int TasEdit_wndx, TasEdit_wndy;
extern int MetaPosX,MetaPosY;
extern int MLogPosX,MLogPosY;
//Structure that contains configuration information
static CFGSTRUCT fceuconfig[] = {
@ -222,6 +223,8 @@ static CFGSTRUCT fceuconfig[] = {
AC(TextHookerPosY),
AC(MetaPosX),
AC(MetaPosY),
AC(MLogPosX),
AC(MLogPosY),
AC(pauseAfterPlayback),
AC(AFon),

View File

@ -6,6 +6,8 @@ static HWND logwin = 0;
static char *logtext[MAXIMUM_NUMBER_OF_LOGS];
static unsigned int logcount=0;
int MLogPosX=0,MLogPosY=0; //X,Y coordinates of dialog
unsigned int truncated_logcount()
{
return logcount & ( MAXIMUM_NUMBER_OF_LOGS - 1 );
@ -56,9 +58,18 @@ void RedoText(void)
**/
BOOL CALLBACK LogCon(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
RECT wrect; //For remembering window position
switch(uMsg)
{
case WM_INITDIALOG:
if (MLogPosX==-32000) MLogPosX=0; //Just in case
if (MLogPosY==-32000) MLogPosY=0;
SetWindowPos(hwndDlg,0,MLogPosX,MLogPosY,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_NOOWNERZORDER);
break;
case WM_MOVE:
GetWindowRect(hwndDlg,&wrect); //Remember X,Y coordinates
MLogPosX = wrect.left;
MLogPosY = wrect.top;
break;
case WM_COMMAND:
if(HIWORD(wParam)==BN_CLICKED)

View File

@ -1510,6 +1510,11 @@ BEGIN
BOTTOMMARGIN, 191
END
"MESSAGELOG", DIALOG
BEGIN
BOTTOMMARGIN, 184
END
"NETMOO", DIALOG
BEGIN
LEFTMARGIN, 10