|
|
A point for you from the direction Mike just pointed you,
<br />
So if you are using a function which is called twenty times, the cleanup code will be placed only once in the function called, if __stdcall is used. But if __cdecl is used, it will be twenty times in the code, i.e., everywhere in main after function is called, and if we have say fifty functions in a file each of which is called twenty times, then the size of the EXE in CDecl will be large. But then what is the advantage of __cdecl... that's something that only C has and not even C++.<br />
Dario: How is "directory" in French? (I mean a file system directory).
John Simmons: "zee file holdaire thingie"
|
|
|
|
|
Hi,
How to change IIS Timeout in MicroSoft C++.
Regards,
Musq
|
|
|
|
|
Is it possible to create #regions in VC++(8.0) IDE ? just like we have in C#? to wrap up a block of code inside.
(-)#region
#end region
|
|
|
(+)region /{}/
Dario: How is "directory" in French? (I mean a file system directory).
John Simmons: "zee file holdaire thingie"
|
|
|
|
|
VuNic wrote: to wrap up a block of code inside.
What do you mean by this?
Normally we would wrap block of code with #ifdef #endif blocks, this enables selected portions of code to be excluded from the build if the appropriate flags are set.
|
|
|
|
|
WalderMort wrote: #ifdef #endif blocks
No it's just for visual purpose. You can "collapse", "expand" a block of code ("region")
Dario: How is "directory" in French? (I mean a file system directory).
John Simmons: "zee file holdaire thingie"
|
|
|
|
|
I see. Not sure about VS2005 but in VS2007 there is a "selection margin" option, which does exactly what you describe. You could still wrap section of code with the #ifdef blocks, and VS will allow you to collapse the whole thing.
#ifdef TRUE<br />
#endif
|
|
|
|
|
WalderMort wrote: #ifdef TRUE
#endif
Yeah something like that, but not exactly.
Dario: How is "directory" in French? (I mean a file system directory).
John Simmons: "zee file holdaire thingie"
|
|
|
|
|
Yes, you can create your own regions for collapsing purposes. Use the
#pragma region
#pragma endregion
directives. See MSDN[^] for more info.
Hope that helps.
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
Thanks .
Dario: How is "directory" in French? (I mean a file system directory).
John Simmons: "zee file holdaire thingie"
|
|
|
|
|
in my code i have get the value form the edit control when i got the value it will be in WCHAR
now I need that value int type.
The following thing is compile but run time it will give the error.
WCHAR w_Year[260];
GetDlgItemText(hDlg,IDC_EDIT_YEAR,w_Year,MAX_PATH);
char * Year=" ";
sprintf(Year,"%s",w_Year);
<code>int int_Year=atoi(Year);</code>
is there any other way to get int value;
|
|
|
|
|
atoi() is for an ANSI string, try the UNICODE version instead _wtoi()
|
|
|
|
|
Either use the Unicode function _wtoi() , or GetDlgItemInt() which will do the conversion for you.
|
|
|
|
|
amitmistry_petlad wrote:
WCHAR w_Year[260];
GetDlgItemText(hDlg,IDC_EDIT_YEAR,w_Year,MAX_PATH);
<code>char * Year=" ";
sprintf(Year,"%s",w_Year);</code>
int int_Year=atoi(Year); is there any other way to get int value;
That is part of your problem - even though you are creating a non-const pointer Year , you are assigning it to a constant string, not a real writable buffer, so the code will crash in sprintf(...) when it tries to copy into the memory pointed to by Year . (BTW - %s and %S can be used to format ANSI or Unicode strings in either kind of build; the uppercase %S version formats the opposite type, so in an ANSI build, %S formats a wide string into a narrow buffer, and in a Unicode build it does the opposite.)
The other solutions you have received will get you the integer value of the string obtained from IDC_EDIT_YEAR , but you still should know that what you have tried to do is dangerous.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Hello,
I'm trying to create a CArchive ar (&f, CArchive::load) object from file f, but when i'm using ar.ReadString()it returns wide characters from chinese charset.The file contains only ascii characters. UNICODE is defined in the application.Do you know what may be the problem? Is there any function usefull?
|
|
|
|
|
Post some code to others understanding.
|
|
|
|
|
Hi all.
I wont to write windows service using "Windows Service" in CLR, but I dont know how it works and whot I can do - whot I cant do.
if you know some booke (English or Russa[Russia]) tell me where can I find it.
thanks for help.
|
|
|
|
|
|
|
Thanks it help me lot.
David.
|
|
|
|
|
Hi!
I need to display a 2-D array as a graph (using a dialog). The data of the array comes from a file using ostream. Im using VC 6.
How do I go abt doing it? Im totally clueless.
Can I use CBitmap and how?
Thanks in advance.
|
|
|
|
|
You need to get the device context first. then use functions from CDC class.
The functions in this class take various parameters. These parameters could be the values that you read from the file using ostream as you are doing already.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
If you need to display a graph, you can take a look here[^] and see if that is what you are looking for.
|
|
|
|
|
Dear all,
This is venkat. We have a very huge project, migrated from vc6.0 to vc7.1
But there is a problem arising at the compilation time.
When the project is compiled for the first time, its giving some compiler errors saying few identifiers are not found even with argument look up etc..etc... But when the same code is being compiled for the second time, without doing any modifications, the compile is success and its working.
I would be glad if anyone helped me to avoid this situation in our compilation...
Thanks and Regards,
venkat.
hi
|
|
|
|
|
Many times what happens is, when u compile the project without CLEANING the project, it gives many or rectified errors, etc. So everytime when u compile the project, first remember to Clean, then Build or ReBuildAll.
Come online at:-
jubinc@skype
|
|
|
|