ItsMods

Full Version: FIXED| static variable help | mfc c++
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hey still playing around with mfc and i need some help
i'd like to set a static variable that i can use in another class

so i have
Code:
void mythingDlg::OnFileOpen32771()
{
CFileDialog opendlg(true,ect,ect);
CString m_strfilename = opendlg.GetFileName();
//rest of code
}

i wish to use
Code:
m_strfilename
here
Code:
void mythingDlg::OnBnClickedButton2()
{
     CFileDialog savedlg(false,ect,m_strfilename); ///<--------- there

}
but its undeclared , tryed putting static before my Cstring but yea ...

can someone please help me im a noob at this Smile
Code:
snip

sorted xD , Put vers in .h file as well... derp