Hello to all,
I've found a problem and have no ideas how to sove it.
The situation is the following:
There is huge project, that was and is developing using MBCS encoding
option. Setting option into Unicode takes approximately 5K errors and
warnings. Some time ago it it bacame a task to have an ability to
select unicode-named files. The projects uses standart CFileDialog and
as it is compiled under MBCS, such a class uses OPENFILENAMEA struct.
As the result, I cannot get normal filename. Of cource, I can use
::GetOpenFileNameW with OPENFILENAMEW argument. But in some cases
CFileDialog is combined with another dialog to give preview option. In
such case I need to write my own hook procedure to handle all messages.
At this time I have no so much time and skills to do this.
I've tried to write a CFileDialog wrapper and put it into MFC-extention
DLL, compiled under Unicode, but in CFileDialog constructor (as a base
class) happends and assertion on AfxGetResourceHandle. I do not now the
reason.
Any ideas
Thanks in advance,
Andrew

IE & TABS - I do not get tabs!
Blipwort
Martimus
It's Vista announcement forum. Please ask IE related questions in the IE group.
I move you post to there now.
j_o_h_a_n_n_e_s
Here is the code fragment from CFileDialog::CFileDialog(....)
......
m_ofn.lpstrFileTitle = (LPTSTR)m_szFileTitle;
m_ofn.nMaxFileTitle = _countof(m_szFileTitle);
m_ofn.Flags |= dwFlags | OFN_ENABLEHOOK | OFN_EXPLORER;
if(dwFlags & OFN_ENABLETEMPLATE)
m_ofn.Flags &= ~OFN_ENABLESIZING;
m_ofn.hInstance = AfxGetResourceHandle();
m_ofn.lpfnHook = (COMMDLGPROC)_AfxCommDlgProc;
.......
The hightlightened code line exec. result is assertion!
The situation looks like i need to use AFX_MANAGE_STATE macro, but I cannot understand where I should place it (Dll exports a CFileDialog_wrapper_class only)
nextpaco
No this is your code. Were in the MFC is the ASSERT. Give aus evuntually infos about the callstack.
You wrote that you have a MFC Extension DLL, so this can not be the reason! There is no need to AFX_MANAGE_STATE in an MFC extension DLL.
http://msdn.microsoft.com/library/default.asp url=/library/en-us/vclib/html/_mfcnotes_tn058.asp
Amit Bansal
This assertation is thrown usually because of DLL not having resources. In case if you have a customized dialog for File-Open, it is not in this DLL. Have you tried opening this DLL in Visual Studio and see if corresponding resources are available Also if this is MFC extension DLL, it should be consumed by MFC app with CWinApp declared. You may also manually store DLL instance in a global variable from DllMain() and then use it.
But overall it is very hard to diagnose this issue without a sample project. Try narrowing down this to a simple one file DLL and posting source code. You may find more MFC developers on MFC newsgroups, http://msdn.microsoft.com/newsgroups/default.aspx dg=microsoft.public.vc.mfc&lang=en&cr=US
Cheers,
Nikola
twospoons
I downloaded and installed 7.0.5730.11 from the official MS download site.
I do not seem to have TABs: if i follow links then i simply get new windows opening as before in IE6.
I do not have a TABs icon in the menu bar.
I searched HELP and entering TABS gives nothing!
In reading a MS article i noticed the phrase "tab browsing - off" but i cannot seem to find any switch from the tools menu. (I have a tick in the box to say tab browsing enabled in the GENERAL section of TOOLS>Internet Options.
It seems that i cannot see wood for trees.... i feel an idiot... can anyone help ...PLEASE
Pete
Paul Gerald
I believe, that solution exists, but cannot find it
Zakamon
Can anybody help
Alibong
My tip: switch to unicode and fix the problems.
What MFC Version are you using Where is the ASSERT fired
Syed Faraz Mahmood
DearME
Tools, Internet Options, General Tab. At the bottom you will see the option for tabbed browsing. Click on Settings, and make certain that the option for Enable Tabbed browsing is selected.