|
try this
void CSearchDlg::OnOpenIndex()
{
UpdateData();
CString fname;
CFileDialog m_ldFile(TRUE);
if (m_ldFile.DoModal() == IDOK)
{
fname = m_ldFile.GetPathName();
m_INDEX_FILE=fname;
UpdateData(FALSE);
}
nave
|
|
|
|
|
|
Vinay wrote: UpdateData(FALSE);
Instead of FALSE use TRUE like
UpdateData(TRUE);
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Hi LaXman,
if i use the UpdateData(TRUE);
the nthe value is not getting displayed....
|
|
|
|
|
vinaycool wrote: if i use the UpdateData(TRUE);
the nthe value is not getting displayed....
Why don't you use SetWindowText and GetWindowText for such simple manipulations.
As PJ said UpdateData should be avoided for complex manipulations. Of course you can use it for one touch updations. Except for that it shouldn't be used.
The name UpdateData itself is confusion. I personally get confused as to what's happening. I am not sure whether it's updating to the variable or to the control.
Nibu thomas
Software Developer
Programming Tips[^]
|
|
|
|
|
Hi Nibu thomas,
I used m_ctrlINDEX_FILE.SetWindowText(fname); this is working fine...
Thanks a lot .....
|
|
|
|
|
vinaycool wrote: Hi Nibu thomas,
I used m_ctrlINDEX_FILE.SetWindowText(fname); this is working fine...
Thanks a lot
You're welcome.
Nibu thomas
Software Developer
Programming Tips[^] My site[^]
|
|
|
|
|
Nibu wrote: The name UpdateData itself is confusion. I personally get confused as to what's happening. I am not sure whether it's updating to the variable or to the control.
Hey Nibu,
don't get confused , let me clear the working of UpdateData()
UpdateData(TRUE) Initialises all the control variables by retriving the contents from dialog controls
UpdateData(FALSE) Initialises all the dialog controls by retriving the contents from Control variables.
Hope you will understand how UpdateData works.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
|
hello all ...
how can i run external app when pressing a button or click on menu ...
iam work in win32 and i need to run flash file
thank you
|
|
|
|
|
F.Smadi wrote:
how can i run external app when pressing a button or click on menu ...
iam work in win32 and i need to run flash file
Try using ShellExecute or CreateProcess API
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
like this:
::ShellExecute(NULL, "open", "iexplore.exe", "your_url.htm", NULL, NULL, SW_SHOWNORMAL);
whitesky
|
|
|
|
|
Look up ShellExecute , ShellExecuteEx , CreateProcess .
Nibu thomas
Software Developer
Programming Tips[^]
|
|
|
|
|
Hi,
U can try this ..
WinExec("pbrush.exe", SW_SHOW);
|
|
|
|
|
F.Smadi wrote: how can i run external app when pressing a button or click on menu ...iam work in win32 and i need to run flash file thank you
try this article:-
http://www.codeproject.com/system/newbiespawn.asp[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
please see MSDN:
This function is provided only for compatibility with 16-bit Windows.
Applications should use the CreateProcess function.
whitesky
|
|
|
|
|
WhiteSky wrote: only for compatibility with 16-bit Windows
But still working though ...
Maxwell Chen
|
|
|
|
|
its in MSDN
whitesky
|
|
|
|
|
WhiteSky wrote: This function is provided only for compatibility with 16-bit Windows. Applications should use the CreateProcess function.
Thats good for starting, as user seems to beginner in Windows Programing
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
I only said in MSDN was this title right!?
whitesky
|
|
|
|
|
WhiteSky wrote: I only said in MSDN was this title right!?
Right
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Thank you for your support
whitesky
|
|
|
|
|
WhiteSky wrote: Thank you for your support
ABA no Thanks please!, i am always there for friend!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
exactly me too
whitesky
|
|
|
|
|
Hi,
I am using following code in MFC ActiveX to handle Exception,
try
{
}
catch(CException *objException)
{
}
But i couldnt find any option to have Exception messages.
Please explain me....
|
|
|
|