Пример #1
0
CBackGround::CBackGround()
{

	//파일 위치 지정
	SetCimage(std::make_shared<CImage>());
	WCHAR path[256];
	GetCurrentDirectory(sizeof(path), path);
	WCHAR backGroundPath[256];
	wcscpy_s(backGroundPath, path);
	wcscat_s(backGroundPath, L"/Image/sky.bmp");
	SetCurrentDirectory(backGroundPath);


	SetCurrentPosition(0.0, 0.0);
	
	SetFileLocation(backGroundPath);

	GetDrawImage()->Load(backGroundPath);
	
	
}
Пример #2
0
long DoOpenDlg(
/************************************************************************/
HWND 	hDlg,
int 	idDlg,
WORD 	idType,
LPSTR 	pFileNameOut,
BOOL 	fSavingIn)
{
int iReturn;
FNAME szExtension, szStartDir;
int iStartDrive;

fSaving = fSavingIn;

idDataType = NULL;
bImageOpen = idDlg == IDD_OPEN || idDlg == IDD_SAVEAS;
idFileType = idType;
if (bImageOpen)
	{
	idFileType = bound(idFileType, IDN_ART, IDN_BMP);
	if (fSaving)
		{
		if (!Readers[idFileType-IDN_ART].bSave[FrameDepth(ImgGetBaseEditFrame(lpImage))])
			idFileType = IDN_ART;
		}
	else
		{
		if (!Readers[idFileType-IDN_ART].bOpen)
			idFileType = IDN_ART;
		}
	}
fUntitled = lpImage && lpImage->fUntitled;

if (bImageOpen && fSaving && !fUntitled)
	{
	lstrcpy( szSaveName, pFileNameOut );
	lstrcpy( szFileSpec, pFileNameOut );
	stripfile( szFileSpec );
	FixPath( szFileSpec );
	LookupExtension( idFileType, szExtension );
	lstrcat( szFileSpec, szExtension );
	}
else
	{
	GetFileLocation( idFileType, szFileSpec );
	}

/* Initialize some values used in DlgOpenProc */
wFileAttr = 0;

iStartDrive = CURRENTDRIVE;
CURRENTDIR( szStartDir, sizeof(FNAME) );
idOpen = 0;
do
	{
	if (idOpen)
		idDlg = idOpen;
	else
		idOpen = idDlg;
	iReturn = AstralDlg( NO|2, hInstAstral, hDlg, idDlg, DlgOpenProc );
	}
while (idOpen != idDlg);
CHDRIVE( iStartDrive );
//CHDIR( szStartDir );

if ( !iReturn )
	{
	pFileNameOut[0] = '\0';
	return( NULL );
	}

lstrcpy( pFileNameOut, szFileSpec );
SetFileLocation( idFileType, szFileSpec );

return( MAKELONG( idFileType, idDataType ) );
}