|
At debug mode, I run normally.
At release mode, I can only run the first time. At the second time it show error and then, Breaken down.
-- modified at 4:29 Tuesday 26th September, 2006
I see difference between build At Release & Build at Debug.
How do i fix it?
======================================================
Linking...
Creating library ..\Librairies\Release/EtatCivl.lib and object ..\Librairies\Release/EtatCivl.exp
LINK : warning LNK4089: all references to "COMCTL32.dll" discarded by /OPT:REF
Répartition des fichiers compilés...
C'est fini...
======================================================
======================================================
Linking...
Creating library ..\Librairies\Debug/EtatCivl.lib and object ..\Librairies\Debug/EtatCivl.exp
Répartition des fichiers compilés...
C'est fini...
======================================================
|
|
|
|
|
On dialog box , i want to replace "OK" string to an Icon drawn by MFC tool.Can I do so?
all for development
|
|
|
|
|
It's very easy. If you want to know how to do it, plaese send me a message with your e-mail address and some detail questions? e-mail address:an_jaehyok@hotmail.com
|
|
|
|
|
If dialog box class that contains the button, is 'CMyDlg' and your icon resource ID, is 'IDI_BUTTON_ICON', and your CButton variable, connected to the button, is 'm_button1' :
1. Add the following member variable to CMyDlg : HICON m_hIconButton;
2. add these codes to the dialog box OnTnitDialog() function :
.
.
.
CWinApp* pApp = AfxGetApp();
if (pApp != 0)
{
m_hIconButton = pApp->LoadIcon(IDI_BUTTON_ICON);
ASSERT(m_hIconButton);
m_button1.SetIcon(m_hIconButton);
}
.
.
.
3. Craete a destructor for CMyDlg (if there isn't any), add this codes to it :
DestroyIcon(m_hIconButton);
4.Build your Application, and enjoy!
|
|
|
|
|
No , no , no !!!
I test this method and find that does not work properly.
|
|
|
|
|
you forget this step :
3.5 --> Set "Icon" characteristic with "true" in property page of that button .
|
|
|
|
|
Did you see SetIcon for display a icon onButton or SetBitmap for display a bitmap on button
|
|
|
|
|
Is there any good code to connect to a FTP that is easy to use?
|
|
|
|
|
|
|
I have a service (running under an user account) which needs to access several mapped network drives. It actually worked w/o problems in the past, but now it can't access them anymore. I've read that a service should not access such drives under XP, but that's not really "helpful".
So my question is, is there a solution for this? And was there an update for XP that might have broken things?
Thanks in advance.
|
|
|
|
|
Hi,
I try to rename a file using MoveFile() API function and I want to generate an error message if the function fails, I use FormatMessage() along with GetLastError() to format an error message, but after testing the code, when I attemp to rename to an invalid filename that includes invalid characters like (? / *) I get the error message: 'there is not enough disk space on the disk' and it doesnt seem to be informative... here is the code:
<br />
int iRes=MoveFile(m_strCurrentPath + strFilename,m_strCurrentPath +strNewFilename);<br />
if(iRes!=0)
{<br />
m_lstFiles.GetListCtrl().SetItem(iItem,0,LVIF_TEXT,strNewFilename,0,0,0,0);<br />
return TRUE;<br />
}<br />
else<br />
{<br />
LPVOID strError;<br />
if(FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM ,0,GetLastError(),0,(LPTSTR)&strError,0,0)!=0)<br />
{<br />
MessageBox((LPCTSTR)strError,0,MB_ICONERROR);<br />
LocalFree((HLOCAL)strError);<br />
}<br />
else<br />
{<br />
MessageBox(_T("An Unknown Error has occured!"),0,MB_ICONERROR);<br />
}<br />
}<br />
return FALSE;
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
Mohammad A Gdeisat wrote: if(FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM ,0,GetLastError(),0,(LPTSTR)&strError,0,0)!=0)
What happens if you change the fourth argument?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
hi david,
The fourth arg is the language ID, which is not supported in windows mobile platform..
Regards
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
Mohammad A Gdeisat wrote: ...windows mobile platform.
I must've overlooked that in your original post.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I want to write a c++ program to convert a j2me source folder to a jar file.
How should i do?is jar file is same as a zip file?
Thanks for any answer!
|
|
|
|
|
cqwangdonghua wrote: I want to write a c++ program to convert a j2me source folder to a jar file. How should i do?
jar is not only a file format but also a tool that produces jar files: http://java.sun.com/j2se/1.3/docs/tooldocs/win32/jar.html[^]
cqwangdonghua wrote: is jar file is same as a zip file?
Basically, yes.
|
|
|
|
|
Thanks!
I know the jar is a tool to create jar format file.But I don't want use it.Since jar file is same as zip format file,so I can zip a src folder and change the filename to create a jar file.But when use I winzip and winrar to do this work today,it do not work. Is jar file not same as zip?what's wrong with it?
|
|
|
|
|
It should work.
A classic mistake, when it doesn't, is that the jar file was FTP using TEXT/ASCII mode instead of binary.
Do you think that's a possibility here?
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
cqwangdonghua wrote: Since jar file is same as zip format file,so I can zip a src folder and change the filename to create a jar file
No, JAR is a compression format, which is indeed similar in that Zip is a compression format; JAR uses a different algorithm for compressing the files. You will either need to implement the JAR compression algorithm in your application or locate a library to do so.
Check Suns website, as memory serves they have a lib you can use from C++. I believe the original respondent to your question provided you a link to Suns website.
Good luck
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
Anyone can explain this puzzling and confusing code:
<br />
void recur(void){<br />
static ntimes=0;<br />
<br />
ntimes=ntimes+1;<br />
if(ntimes < 100) |<br />
recur(); | suppose since ntimes=1, output should be leave empty.. Right?:confused:<br />
printf("%d\n", ntimes); | <br />
ntimes--;<br />
<br />
<br />
}
ouput: 100
99
98
.
~~~@@@###EZRA###@@@~~~
|
|
|
|
|
Simple: recursion!
There is only one ntimes-variable (that's what staic means), and it is initialised only once when encountered the first time.
As long as it is below 100, recur() is calling itself, incrementing the variable.
When it reaches 100, a text is printed and all the pending recur()-function come to decrement ntimes.
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
Thanks now i understand.. ^_^
~~~@@@###EZRA###@@@~~~
|
|
|
|
|
what don't you understand exactly ? the use of the static keyword, and how it works, of the principle of recursion ?
|
|
|
|
|
It is doing the same thing as the following:
int recur(int count)
{
if (100 <= count)
{
return count;
}
else
{
int c = count++;
printf("%d\n", recur(count));
return c;
}
}
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|