开发者

How to create a Windows GUI with a file explorer window, allowing users to choose files?

Here's what I want to do. I want to present a file explorer, and allow the user to select files, and list the selected files below. (I then want to process those files but that's the next part)

For example, the way CD Burning softwares work. I have created a mock up here

http://dl.dropbox.com/u/113967/Mockup.png

As you can see, the left frame has a directory structure, the right frame has a file selected, and the bottom frame shows the sel开发者_C百科ected file.

What framework can I go about creating this? I am familiar with command line C++ stuff, but I haven't ventured into any GUI programming, and figured this idea would be a good place to start.

Any suggestions on where to start?


Most GUI toolkits provide suitable tree and list controls, and a splitter container the user can drag to set the sizes of the three panes. If you use C# then it should take a couple of minutes to create using drag-and-drop (using windows forms you would have a Form with two Splitter controls, a TreeView and a ListView, and whatever control type the data is shown as); the other tool kits I've used tend to require more programming.

Sticking with C++, you can use MFC (CTreeCtrl, CListCtrl, CSplitterWnd), wxWindows (wxGenericDirCtrl/wxTreeCtrl,wxListCtrl,wxSplitterWindow), or QT (I don't know QT). C++ will take longer to develop for no gain (unless you're doing very intensive work, don't bother with C++ for GUIs; usually the advantages of a managed system has for multi-threaded work give a better user experience than a C++ app)


You can write your own code for that or you can use the
Windows shell which provides such facilities.

Sophisticated programming environments usually offer wrappers for ActiveX classes,
like a file browser control.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜