Ask Your Question

Vadim's profile - activity

2017-04-11 13:51:52 -0600 commented answer Save image using dialog

Hello,i've alreay done my project,and I did what i want,so you wasn't right bro.

P.S. Go fuck yourself,scumbag

2017-04-09 11:47:07 -0600 received badge  Editor (source)
2017-04-09 11:41:58 -0600 commented answer Save image using dialog

And also i'm using "GetOpenFileName" dialog , and it's working correctly ,i think,if dialog with file opening works correctly,it can be used with "GetSaveFileName". Am i right ? Amn't I ?

2017-04-09 11:35:55 -0600 commented answer Save image using dialog

Also,I do new project with using winapi, and my program doesn't have "already builtin functions",thats why i'm asking about using "Save as " dialog in opencv.

2017-04-09 11:29:02 -0600 commented answer Save image using dialog

But i don't use C , I'm using c++

2017-04-08 16:35:02 -0600 asked a question Save image using dialog

Hello,I tried to use GetOpenSaveName diaog , but it didn't work,how to fix it? Any Idea?

and code

int SaveAs(HWND hWnd) {

ZeroMemory(&saveSzFile, sizeof(saveSzFile));

ofn.lStructSize = sizeof(OPENFILENAME);
ofn.hwndOwner = hWnd;
ofn.hInstance = hInst;
ofn.lpstrFilter = L"Bitmap files(*.bmp)\0 * .bmp\0JPEG files(*.jpg)\0 * .jpg\0All files(*.*)\0 * .*\0\0";;
ofn.lpstrCustomFilter = saveSzFile;
ofn.nMaxCustFilter = sizeof(saveSzFile);
ofn.nFilterIndex = NULL;
ofn.lpstrFile = saveSzFile;
ofn.nMaxFile = sizeof(saveSzFile);
ofn.lpstrFileTitle = NULL;
ofn.nMaxFileTitle = 0;
ofn.lpstrInitialDir = NULL;
ofn.lpstrTitle = 0;
ofn.Flags = OFN_FILEMUSTEXIST;
ofn.nFileOffset = 0;
ofn.nFileExtension = 0;
ofn.lpstrDefExt = NULL;
ofn.lCustData = NULL;
ofn.lpfnHook = NULL;
ofn.lpTemplateName = NULL;

wcstombs(savefilename, saveSzFile, sizeof(savefilename));



if (GetSaveFileName(&ofn))
{

    cvSaveImage(savefilename, dst);

}

return 0;

And actually cvSaveImage() includes only char-adress to file,i write it into savefilename,but it doesn't work and i don't know why

Thank for help in advance!