This is my vector:
I wan to create the vector into a string to have like the OPENFILENAME::lpstrFilter, that would be something like:Code:vector<string> ext; exts.push_back(TEXT("png")); exts.push_back(TEXT("jpg")); exts.push_back(TEXT("gif")); exts.push_back(TEXT("bmp"));
Right now I'm using something like this:Code:string final = "All files supported\0*.png;*.jpg;*.gif;*.bmp\0\0";
But doesn't workCode:vector<string> ext; stringstream str; ext.push_back("png"); ext.push_back("jpg"); ext.push_back("bmp"); ext.push_back("gif"); size_t len = ext.size(); str << "All files supported\0"; for (size_t pos = 0; pos != len; pos++ ) { str << "*." << ext[pos] << ";"; } str << "\0\0"; // use str.str().c_str() as filter
any ideas?



LinkBack URL
About LinkBacks




