Files
Cyd 2b8ca921cb Initial full mirror of c:\VWE (source + assets + toolchain + outputs) via Git LFS
Complete disaster-recovery snapshot: engine/game source, game data assets,
VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive.
Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false,
no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
2026-06-24 21:28:16 -05:00

59 lines
1.2 KiB
C++

#include "stdafx.h"
#include "DefaultDialog.h"
#include <gameos\gameos.hpp>
DefaultDialog::DefaultDialog(UINT res_id, CWnd* pParent)
: CDialog(res_id,pParent)
{
}
void DefaultDialog::SaveToReg()
{
CRect rct;
GetWindowRect(&rct);
CString wintitle;
GetWindowText(wintitle);
gos_SaveDataToRegistry((char *)(LPCSTR)(wintitle+"Rect"),&rct,sizeof(rct));
int tdat(IsWindowVisible());
gos_SaveDataToRegistry((char *)(LPCSTR)(wintitle+"Visible"),&tdat,sizeof(tdat));
}
void DefaultDialog::LoadFromReg()
{
CString wintitle;
GetWindowText(wintitle);
CRect rct;
unsigned long size(sizeof(rct));
gos_LoadDataFromRegistry((char *)(LPCSTR)(wintitle+"Rect"),&rct,&size);
if (size)
{
if (PreserveWidthHeightInfo() == true)
{
SetWindowPos(NULL,rct.left,rct.top,rct.Width(),rct.Height(),SWP_NOZORDER);
}
else
{
CRect cur_rect;
GetWindowRect(&cur_rect);
SetWindowPos(NULL,rct.left,rct.top,cur_rect.Width(),cur_rect.Height(),SWP_NOZORDER);
}
}
int tdat;
size=sizeof(tdat);
gos_LoadDataFromRegistry((char *)(LPCSTR)(wintitle+"Visible"),&tdat,&size);
if(size && tdat==0)
ShowWindow(SW_HIDE);
else
ShowWindow(SW_SHOW);
}