开发者

how to make "choose file" function on windows programming?

I need this us all known "choose file"开发者_运维问答 feature in my program, so i can load files.

What is this thing called as and where is the code for it?


What you are referring to are the "common dialogs", and you can get a file open dialog with GetOpenFileName

BOOL GetOpenFileName(      
    LPOPENFILENAME lpofn
);

A sample is available here


With plain Win32 API you need to use the GetOpenFileName function, documented here. An example of its usage is available here.


I'm assuming you want to know about the built-in Windows dialog for choosing/opening a file.

If you're doing managed code, see OpenFileDialog.

If you're doing MFC, see CFileDialog.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜