opening and saving images using intel jpg library

I’m using the intel jpeg library and the class wrapper - How do I get file to save and open from menu - what do you call in the file open and save handlers?


You can use the GetOpenFileName() and GetSaveFileName() functions to show dialog boxes from which you can pick a file. Both functions need an OPENFILENAME structure as a parameter. You can search for these terms on MSDN for more details.

  • Tom

thanx a lot

I have the function below:
RenderToJpeg(LPTSTR szFile, int quality)

would I call it in OnFileOpen and OnFileSave?

my onFilesave looks like below

CString fname;

CFileDialog fdlg(FALSE, lpszDefExt, lpszDefName, dwFlags, lpszFilter, this);

if(IDOK == fdlg.DoModal())
fname = fdlg.GetPathName();
CCodaVisDoc* pDoc = GetDocument();