|
http://www.boost.org/
In case you are not aware!
|
|
|
|
|
Post it in the lounge
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
this has been announced by nemanja trifunovic 3 days ago[^] on his CP blog
|
|
|
|
|
Hi. I need to create the setup.exe file for the aplication I have developed.
It works perfectly on my computer, but I want to try it on another computer to see exactly how would it work on the customer´s PC.
To know exactly which dll it needs, I have taken only the exe to the new computer and executed it. That way, the exe asks for the dll it needs. After doing with 4 dlls, when I execute the program it makes nothing. The program starts and finishes in about a half second.
I have tried to write a log to know in wich line it breaks the execution, but it nowhere after the OnInitDialog event.
I have tried to use the installshield and the Inno Setup, and it doesn´t work. A blank messagebox appears when executing the app.
I don´t know what to do, could someone help me please...?
I use Visual C++ MFC.
|
|
|
|
|
Can you more explain about your program?
|
|
|
|
|
What do you need to know?
|
|
|
|
|
Application type? does these system that you try to run your program has same OS ?
|
|
|
|
|
The app is made with MFC Wizard and the OS where I have developed it is XP. The costumer computer has 2000 OS.
|
|
|
|
|
Since you're not getting the "missing DLL" error anymore, there must be something else that is missing (or not being initialized). Two obvious things to look at are external data files and registry settings. Are all of these present on the second computer?
Also, things might be in different locations on the second computer - check if there are any hard-coded paths in the program.
Unfortunately, it sounds like there is some code that is not checking for errors (e.g., missing resources). The next step would be to look at all the code that is trying to read the registry (or a file) and make sure it is logging something if an error occurs.
If everything else fails, you might have to strip down the program to a bare minimum, and then start adding stuff back in until you find what is failing.
|
|
|
|
|
The program uses Log files, that I took to the second computer too. It also uses config files that are in the second computer, both are in the same path.
I will do what you´ve told about stripping the program. It´s a good idea. Thanks for all.
|
|
|
|
|
|
How can alow the user to enter only numbers lets say with "4" into CEditBox ! for ex: 41,42,411,42222 !!!!!!
i have tried this :
CString sCod;
m_cod.GetWindowText(sCod);
if(!sCod.Left(1).Compare("4"))
{
//something
}
else
{
AfxMessageBox("Incorect number");
}
but is not working !
please help me !
Bravoone
|
|
|
|
|
In the dialog editor right click the edit box and check the Number property to true.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Assign an integer variable to edit box.(See DDX_ )
And Use UpdateData accordingly.
Prasad
MS MVP - VC++
|
|
|
|
|
Use Dialog Data Exchange or Validate. This will not allow the user to enter anything other than number.
int iCod;
void CYourClassName::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Text(pDX, IDC_EDIT, iCod);
DDV_MinMaxInt(pDX, iCod, 0, 1000); //Third and fourth parameter is min and max value.
}
Hope this will work.
Anurag Gandhi.
|
|
|
|
|
you can try the _ttoi function to determine if the string is actually an integer. The function will return 0 if the string cannot be parsed as integer. So you should also check if user actually entered 0 in the CEditBox . "What if user enters something like 0000 ?" question still remains, but this is better than nothing
int val = _ttoi(sCod);
if (val == 0 && sCod != _T("0"))
{
AfxMessageBox(_T("Incorrect number"));
}
|
|
|
|
|
First of all, I haven´t found a Left member inside the CString class
I would do that way:
char sCod[20];
strcpy(sCod,m_cod.GetWindowText());
if (strcmp(sCod[0],"4")==0)
{
//Here write your code
}
else
{
MessageBox("Incorrect number");
}
I hope it may help you!
Good luck from Bilbao! (SPAIN)
|
|
|
|
|
garfield185 wrote: First of all, I haven´t found a Left member inside the CString class
Here[^] it is.
Prasad
MS MVP - VC++
|
|
|
|
|
Gosh!!
Next time remember me to write the name of the function like this "Left" and not like this "left".
I´m really ashamed...
|
|
|
|
|
i have 2 errors to your code :
1)error C2661: 'GetWindowTextA' : no overloaded function takes 0 parameters
2)error C2664: 'strcmp' : cannot convert parameter 1 from 'char' to 'const char *'
what is wrong ?
Bravoone
|
|
|
|
|
all i want is to enter only numbers that have 4 first number for example 48956687 the first number is 4 !!!!!!
Thank you !
Bravoone
|
|
|
|
|
Nope nothing,nothing is working i don t know what to do !
The first number in the string must be 4 !
this is a serious problem i dont expect to be so hard !
Bravoone
|
|
|
|
|
If you want to let the user only enter the number's that start with 4 you would need to override the EN_CHANGE notification. When the user hits anything except a 4 for the first time just discard the value else continue.
I hope I do get you correctly now and this helps you.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
void CBravooneTest::OnEnChangeEdit1()
{
CString str;
if(((CEdit*)GetDlgItem (IDC_EDIT1))->GetWindowTextLength()>0){
((CEdit*)GetDlgItem(IDC_EDIT1))->GetWindowText (str);
if(str.GetAt(0)!='4')
((CEdit*)GetDlgItem(IDC_EDIT1))->SetWindowText("");
}
}
See if this is what you need.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hi Bravoone,
I have a hardware question do you know about DVD players?
|
|
|
|