?? main.cpp
字號:
//2008 - Marcelo Archanjo - marcelo_archanjo@yahoo.com.br - this source code is under General Public License.
#include "Main.h"
INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, PSTR, INT iCmdShow)
{
GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken;
hInstanceSave=hInstance;
// Initialize GDI+.
GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
DialogBox(hInstance, MAKEINTRESOURCE(IDD_DIALOG1),NULL,DialogProc);
deleteBuffer();
GdiplusShutdown(gdiplusToken);
return true;
} // WinMain
void enableItem(HWND hDlg,int dlgItem,bool enable)
{
HWND hwnditem=GetDlgItem (hDlg,dlgItem);
EnableWindow(hwnditem,enable);
}
bool getData(HWND hDlg,int dlgItem)
{
WCHAR argument[256];
GetDlgItemText(hDlg, dlgItem, argument, sizeof(argument));
//swscanf(argument,L"%s %s %d %d %d %c %d %d",GleftFile,GrightFile,&GmaxDisp,&GmaxLineVar,&GwindowSize,&GintensityOrGradient,&VERTS_PER_EDGE_WIDTH,&VERTS_PER_EDGE_HEIGHT);
swscanf_s(argument,L"%s %s %d %d %d %c %d %d",GleftFile,_countof(GleftFile),GrightFile,_countof(GrightFile),&GmaxDisp,&GmaxLineVar,&GwindowSize,&GintensityOrGradient,sizeof(WCHAR),&VERTS_PER_EDGE_WIDTH,&VERTS_PER_EDGE_HEIGHT);
//composi玢o do nome do mapa de disparidades
LPCTSTR pszFormat = TEXT("%s_%d_%d_%d_%c.BMP");
StringCbPrintfW(GdisparityMap, (256*sizeof(WCHAR)),pszFormat,GleftFile,GmaxDisp,GmaxLineVar,GwindowSize,GintensityOrGradient);
if(compare)
{
LPCTSTR pszFormat = TEXT("%s_%d_%d_%d_%c_Trad.BMP");
StringCbPrintfW(disparityMap, (256*sizeof(WCHAR)),pszFormat,GleftFile,GmaxDisp,GmaxLineVar,GwindowSize,GintensityOrGradient);
}
//composi玢o do nome do arquivo 3D exportado em VRML
LPCTSTR pszFormat2 = TEXT("%s_%d_%d_%d_%c_%d_%d.WRL");
StringCbPrintfW(GVRMLfile, (256*sizeof(WCHAR)),pszFormat2,GleftFile,GmaxDisp,GmaxLineVar,GwindowSize,GintensityOrGradient,VERTS_PER_EDGE_WIDTH,VERTS_PER_EDGE_HEIGHT);
if(!exist(GleftFile)) {ErrorMessage(GleftFile,L"file not found.");return false;}
if(!exist(GrightFile)) {ErrorMessage(GrightFile,L"file not found.");return false;}
if(GmaxDisp<1) {ErrorMessage(GmaxDisp,L"n鉶
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -