I build an app w/VC++6 . I design a window with an EDIT CONTROL (IDD_MYEDIT), associate a CEdit control (m_myedit). I switched on the PASSWORD style of the control.
Can be triggered this style on or off during the program running?
36. When you surround an army, leave an outlet free.
Do not press a desperate foe too hard.
Why would you want a modeless CFileDialog? I can't think of any case where a user would select some sort of open/save button and have the software not wait for an input or a cancel.
Regardless of that though, if you really want it, just make your own class derived from CFileDialog (you'll have to replace DoModal() with a call to Create()). Override the virtual methods OnOK() and OnCancel() and you have your own modeless CFileDialog.
Although that product is not free, this is probably the best solution (Active-X control) if you want to uses it from a MFC application and do not want to uses .NET framework and you still want to support XP (or even older OS).
My light bulb turned on when you mentioned about the CFile::shareExclusive flag. In my code to open file for reading, I didn't have CFile::shareDenyNone, I guess it defaults to shareExclusive when I don't specify it? After I set the flag, the program works. It looks like my program was stepping on its own foot.
I'm just still puzzled as to why it works for one file, but not the other when I don't use the shareDenyNone flag. Any ideas?
Thank you for helping me out, I feel so relief now that the problem is solved!!