|
when i dedugged the error is coming after that line.It is working in one system and but not in the other.
Thanks.
|
|
|
|
|
radhika28 wrote: when i dedugged the error is coming after that line.
Which line? Am I supposed to guess it?
radhika28 wrote: It is working in one system and but not in the other.
Check out the dependencies.
The nail that stands out will be hammered down
|
|
|
|
|
I asked you what is m_install. Is that a CString or char* or what? Did you try using a CString variable there, instead of a member variable?
|
|
|
|
|
After m_install.m_strSetup = oFileDlg.GetPathName();.
m_install is a Cstring variable of another class.Now i hav e defined a cString variable in the same class.
|
|
|
|
|
<br />
CString str;<br />
<br />
static TCHAR BASED_CODE szFilter[] = "Windows Setup file (*.pdf;*.xml)|*.pdf;*.xml||";<br />
<br />
CFileDialog oFileDlg(TRUE,"pdf","",OFN_FILEMUSTEXIST|OFN_NOCHANGEDIR, szFilter);<br />
oFileDlg.m_ofn.lpstrTitle = "Select the Installable Application";<br />
<br />
if(oFileDlg.DoModal() == IDOK)<br />
{<br />
str = oFileDlg.GetPathName();<br />
AfxMessageBox(str);<br />
}<br />
Do you get the path displayed properly? Does the window crash after that?
|
|
|
|
|
Now I remember, I already answered you previously. I asked you to use your debugger to provide us more information. Did you follow that advice ? Where does the code crash exactly ? What is the value returned by GetDlgItem, are you sure you don't access an NULL pointer ?
Man, I won't say it enough time: you have to learn how to use your debugger !It doesn't take a lot of time to understand how it work (for basic debugging), but this will save you hours of time (your problem could already been solved now).
|
|
|
|
|
The only answer we can give you is that you did something wrong in your program. This can happens for a million of different reasons, so without more information, you'll not get a lot of answers.
First of all: a thing that you REALLY need to do is to learn to use your debugger. You cannot imagine how faster it is to solve a problem than posting a message on a forum. Press F5 to start your debugger, this will allow you to narrow the problem a little bit more. Then, you can set breakpoints in your program with F9 and check the value of your variables.
I cannot imagine developping programs without using a debugger, it's like repairing your car without using any tools
|
|
|
|
|
The application is working in my system.But when i run it on the other system it is not coming.I have debugged the application.The error comes after the line of getting path name.
Thanks.
|
|
|
|
|
It seems this code it good maybe your problem after IDOK did you use of debugger
|
|
|
|
|
|
so this problem isnt of CFileDialog.did you use of breakpoint and what is m_install and IDC_SETUP is valid
<br />
m_install.m_strSetup = oFileDlg.GetPathName();<br />
GetDlgItem(IDC_SETUP)->SetWindowText(m_install.m_strSetup);<br />
|
|
|
|
|
m_install is a CString variable of another class.Now i have defined the variable in the same class and i have removed the edit box which displays the path and the code for that line.Now it is working.Thanks
|
|
|
|
|
So how to create editbox if it has error
|
|
|
|
|
|
This is probably the wrong forum for this question. You code looks like Cpp/CLI to me
One problem here is that your array is not typed. Why dont you use a Generic::List<char^>?
You'll probably want to loop through your collection and append each char to a StringBuilder object and then get the string from it when your done.
|
|
|
|
|
Well, thank for the help... haven't thought of that,
"....You'll probably want to loop through your collection and append each char to a StringBuilder object and then get the string from it when your done....."
"...This is probably the wrong forum for this question...." Strange .... I'm using VS2K5 VC++ and this is a Visual C++ / MFC right ???
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
This code...
array^ buffer = gcnew array(10000);
is without a doubt CPP/CLI. You might be mixing it with MFC but its not standard c++ or MFC
|
|
|
|
|
My bad ....
But VS2K5 works with dotNet right??
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Hi,
The SetFocus() method of CWnd class works fine if the edit box is made on the window using the this pointer which is the current new window.
But SetFocus() method doesn't work if the edit box is made on a new window which is created using the following
AfxGetMainWnd()->SendMessage(WM_COMMAND, ID_FILE_NEW);
CMDIFrameWnd *pFrame =
(CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
CMDIChildWnd *pChild =
(CMDIChildWnd *) pFrame->GetActiveFrame();
CView *pView = (CView *)
pChild->GetActiveView();
CRichEditCtrl *r1 = new CRichEditCtrl;
r1->Create(WS_CHILD|WS_VISIBLE|ES_AUTOVSCROLL,
CRect(x1,y1,x2,y2), p, 1);
if p= this pointer then SetFocus() works but if
p=pView the SetFocus() doesn't work
Prithaa
|
|
|
|
|
|
Hello all,
Iam trying to raise the event asynchronously, by invoking each subscriber using begininvoke method like this
C#
public event DrawTreeNodeEventHandler dr;
Delegate[] del= dr.GetInvocationList();
object[] obj=null;
foreach (Delegate d in del)
{
BeginInvoke(d, obj);
}
But this is not working in VC++(this is working in C#), its not compiling saying the error @ line1 "Usage requires to be a data member"
How to do that in VC++
|
|
|
|
|
i use the msxml lib write a xml,but have such a problem,that is i want to the file that open by notepad looks like the open by ie which has the layer and tabbed space,
for example:
my file
<UNIT><ATTR></ATTR></UNIT>
want to look like below in notepad:
<UNIT>
<ATTR>
</ATTR>
</UNIT>
how to solve the problem?who can help me ,i tried some method but can not solve so well.
|
|
|
|
|
Write a program that will enter a new line and a tab(or 2-4 spaces) after every '>' char. Of course it is a little more complicated but it shouldn't be too hard to implement.
█▒▒▒▒▒██▒█▒██
█▒█████▒▒▒▒▒█
█▒██████▒█▒██
█▒█████▒▒▒▒▒█
█▒▒▒▒▒██▒█▒██
|
|
|
|
|
yes,that maybe ok.but how to control the layers,such like this,
<L1>
<L2>
<L3>
</L3>
</L2>
</L1>
should i compute the tab numbers about each line?
if i want to format the xml like this,what can i do?
<L1>
<L2>
<L3></L3>
</L2>
</L1>
that is if the node is the leaf node,do not add a new line?
is that possible?
|
|
|
|
|
I was looking for something similar a few days ago. Search google for "XML pretty Print" and you'll find a few things. In the end I opened it in VS2006 which formats the text, then copy & paste but I only needed to do it once
|
|
|
|