Posted By: MMike
Loading image dialog - 05/22/10 22:24
I have this, but now how i pass the return image to a BMAP pointer, and to save in the working folder..
the code:
the code:
Code:
IPicture* pPic; int abd() { OPENFILENAME of; char buf[256]; FillMemory(&of,sizeof(of),0); FillMemory(buf,256,0); of.Flags=OFN_PATHMUSTEXIST|OFN_FILEMUSTEXIST; of.lStructSize=sizeof(of); of.hwndOwner=hWnd; of.lpstrFilter ="Supported Files Types (*.bmp;*.gif;*.jpg;*.ico;*.emf;*.wmf)\0*.bmp;*.gif;*.jpg;*.ico;*.emf;*.wmf\0Bitmaps (*.bmp)\0*.bmp\0GIF Files (*.gif)\0*.gif\0JPEG Files (*.jpg)\0*.jpg\0Icons (*.ico)\0*.ico\0Enhanced Metafiles (*.emf)\0*.emf\0Windows Metafiles (*.wmf)\0*.wmf\0\0"; of.lpstrFile=buf; of.nMaxFile=255; of.lpstrTitle="Open"; if (GetOpenFileName(&of)){ if (pPic) pPic->Release(); pPic=LoadPic(buf); } }