|
-
July 28th, 2006, 03:50 PM
#1
help need
Hi experts,
I have problem about the CFileDialog in a property page in the program which is Htmlview as the base view. The CFIleDialog does not work in a property page in this program, the AfxMessageBox does not work either without a button clicking. Who can tell me how to do it. You are appreciated very much in advance if you are kind enough to help me.
-
July 29th, 2006, 04:05 PM
#2
Re: help need
It is not clear what the problem is. Please describe in more detail. For e.g. are you doing a CFileDialog object DoModal on click of a button ?
And what's the deal with AfxMessageBox() ? How do you call.
Any code snippet related to the problem would help
-
August 1st, 2006, 02:55 PM
#3
Re: help need
Hi Kirants,
Thank you very much for your answer ! The following function is in a property page. When I click a button called 'select files', the function should work, a file open dialog should be popuped. In fact, there is no any popup dialog, and the program hangs. The program stop at the point --fdlg.DoModal(), and from the debugging info, m_hWnd of fdlg is NULL.
void CNewData::OnOpenFile()
{
char FileName[255];
CString cst;
CFileDialog fdlg(TRUE, NULL, NULL, OFN_HIDEREADONLY |
OFN_ALLOWMULTISELECT, "All Files (*.*)|*.*|Data Files
(*.dat)|*.dat|Text Files (*.txt)|*.txt||", NULL );
fdlg.DoModal();
.......
}
Thank you for your time !
Jie
Last edited by kingjie; August 1st, 2006 at 03:00 PM.
-
August 1st, 2006, 05:27 PM
#4
Re: help need
Are you sure the function is actually called? Put a breakpoint and make sure of it.
-
August 2nd, 2006, 10:53 AM
#5
Re: help need
Dear Cilu:
Thank you for your time. I put breakpoints and the function was called, the program was just hanged at the point of calling DoModal().
Thanks again.
Jie
-
August 2nd, 2006, 10:56 AM
#6
Re: help need
Hi,
Can u zip your code and upload it here so that we can take a look at it ?
-
August 3rd, 2006, 12:06 AM
#7
Re: help need
try this.
Code:
CFileDialog fdlg(TRUE, NULL, NULL, OFN_HIDEREADONLY | OFN_ALLOWMULTISELECT, "All Files (*.*)|*.*|Data Files (*.dat)|*.dat|Text Files(*.txt)||", NULL );
fdlg.DoModal();
if Still problem Please post your Zip File here.
Thanx
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|