OPENFILENAME弹出的窗口如何设置为模态的,即始终保持在最前面,急!

OPENFILENAME弹出的窗口如何设置为模态的,即始终保持在最前面,急!急求!谢谢,没有C币,可以加微信发红包

c

1个回答

hwndOwner 指定你的父窗口

  OPENFILENAME ofn; 

 ofn.lStructSize = sizeof (OPENFILENAME); 
 ofn.hwndOwner = hWndOwner; 
 ofn.hInstance = NULL; 
 ofn.lpstrFilter = "All files (*. *) \0*.*\0\0"; 
 ofn.lpstrCustomFilter = NULL; 
 ofn.nMaxCustFilter = 0; 
 ofn.nFilterIndex = 0; 
 ofn.nMaxFile = MAX_PATH; 
 ofn.nMaxFileTitle = MAX_PATH; 
 ofn.lpstrInitialDir = NULL; 
 ofn.lpstrTitle = NULL; 
 ofn. Flags = OFN_CREATEPROMPT|OFN_EXPLORER|OFN_HIDEREADONLY; 
 ofn.nFileOffset = 0; 
 ofn.nFileExtension = 0; 
 ofn.lpstrDefExt = NULL; 
 ofn.lCustData = 0; 
 ofn.lpfnHook = NULL; 
 ofn.lpTemplateName = NULL; 

 GetOpenFileName (&ofn); 
cyq11111111
cyq11111111 太感谢了!完美的解决了我的问题!您微信多少,给您发感谢红包,嘿嘿
2 年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问