PDA

View Full Version : SHBrowserForFloder() doesn't work well



Shiro Watanabe
March 18, 2010, 07:25:20
I'm using IC Imaging v3.07 on XPSP3 with VC6.
I want to show a folder dialog by SHBrowserForFloder(), but the folder tree isn't shown on this dialog. It shows only OK and Cancel buttons.
Off course it's okay to show a folder dialog without IC Imaging v3.07.
Once DLLs of IC Imaging are called, the folder tree is never shown.

Are there any solutions?

Thanks.

Stefan Geissler
March 18, 2010, 12:02:56
Hi,

I never tested this on my own, but may be there is a workaround available. Insert in one of the cpp files (i.e the app file) following lines of code:



struct static_init
{
static_init() { CoUninitialize(); OleInitialize( 0 ); };
};

#pragma init_seg( user )
static_init sys_init;

Shiro Watanabe
March 18, 2010, 22:07:37
Thanks for your quick reply.
I tried the code and I found SHBrowserForFolder() worked well.

How great!
It seems something like a magic!

Thank you very much again.