Programmatically selecting file in explorer

后端 未结 3 1513
天涯浪人
天涯浪人 2020-12-05 03:12

In my application I can programmatically open explorer and select a file using the following code:

void BrowseToFile(LPCTSTR filename)
{
    CString strArgs;         


        
3条回答
  •  天命终不由人
    2020-12-05 03:37

    In the case you outlined it appears the file window only selects the file when it's initialized instead of when activated.

    Although this feels like a kludge, you could detect XP and only for that OS close the dialog using its handle and open a new one to target another file with.

提交回复
热议问题