开发者

Display XP Style CFileDialog in Windows 7

I want to display CFileDialog 开发者_开发问答like the image below in Windows 7.

Display XP Style CFileDialog in Windows 7

As per msdn

if OFN_ENABLETEMPLATE is set and OFN_EXPLORER flag is not set, the system uses the template to create an old-style dialog box that replaces the default dialog box.

But even after doing that what I get is something like this.

Display XP Style CFileDialog in Windows 7

Please help!


Try this:

CFileDialog fd(1,0,0,0,0,0,0,FALSE);
fd.m_ofn.lStructSize = sizeof(OPENFILENAME_NT4);
fd.DoModal();

The last parameter to CTOR specifies Vista-style to be false, and structure size of sizeofed with to reflect NT4 file-dialog.


I don't think you can. That windows belong to OS and is not implemented anymore. The the closest thing you can use is the old-style dialog box.

You can try to customize this one by hooking the window but it's not easy and I don't thing it worth.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜