Hi all,
Any of you have an idea on how to change the "save as type: " from "*.*" to any other format such as "*.bmp" under the "file" menu in MFC of a SDI.
Tks
Hi all,
Any of you have an idea on how to change the "save as type: " from "*.*" to any other format such as "*.bmp" under the "file" menu in MFC of a SDI.
Tks
no idea with MFC, but using straight Win32:
Code:bool saveDialog(char * buffer, unsigned buffsiz, const char * filters = NULL) { OPENFILENAME ofn; if(filters == NULL) { filters = "All File Types\0*\0\0"; } buffer[0] = 0; memset(&ofn, 0, sizeof(ofn)); ofn.lStructSize = sizeof(OPENFILENAME); ofn.hwndOwner = GetFocus(); ofn.lpstrFilter = filters; ofn.lpstrFile = buffer; ofn.nMaxFile = buffsiz; ofn.Flags = OFN_OVERWRITEPROMPT | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY; return GetSaveFileName(&ofn); }
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }
Set it in the contructor as in
Code:"Chart Files (*.xlc)|*.xlc|Worksheet Files (*.xls)|*.xls|Data Files (*.xlc;*.xls)|*.xlc; *.xls|All Files (*.*)|*.*||";