|
PK Jain wrote: Acually i want to add in listbox with the progresbar so I need to refresh listbox to show simulteneous progress
Consider using thread for this.
You can get lot of example related to this on CP.
|
|
|
|
|
String used in C++/CLI programs which are set to use Unicode character sets need not be prefixed with L. Is this an optional feature or is there something more to it?
One thing that came to my notice is
String^ fileName = "primary" + '.' + "extn";
and
String^ fileName = "primary" + L'.' + "extn";
gave different results.
So prefixing the dot with L, tells the compiler not to convert to integer.
« Superman »
|
|
|
|
|
Conversion from char to int is implicit in C++. In .NET, having a string and an int concatenated, automatically calls ToString on the int. so, C++ is turning your char to an int, and then .NET is trying to be helpful and turning that number into it's string representation.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
OK... Got that.
For strings is the L prefix optional?
« Superman »
|
|
|
|
|
The ‘L’ prefix tells the complier to convert the [single byte] character sting into wide characters and is not optional, if the string type is expecting wide characters.
Standard C++ examples:
std::string = “char - string”;
std::wstring = L”wchar_t – string”; // ‘L’ prefix required
char* pStr = “char - string”;
wchar_t* pStr = L”wchar_t – string”; // ‘L’ prefix required
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
Thanks for the clarification.
But I couldn't figure out how this works -
MessageBox::Show("Contents", L"Title");
The character set I'm using for the project is Unicode.
You will notice that one parameter is with the 'L' prefix and the other is without it.
So I'm guessing that the unicode version of Show is used and the 'L' prefix is optional.
« Superman »
|
|
|
|
|
I have been away.
From what little I have seen you appear to be using VC++ 2005, which I do not have. Therefore I can not test if this would even compile on that version of the compiler.
The example you provided should generate errors, no matter what character set you are using. You can not mix Unicode and Multi-byte strings in a single function call, the function takes one or the other type, but not both.
The only way this could work is if the compiler converted one of the strings, which it should not be doing, or the library provided functions that take mixed string argument types, which I have never seen before. In both these cases, MS would be doing something it should not be doing.
Sorry I could not be of more help, all I know for sure is that the ‘L’ prefix is not optional and must be used to tell the compiler to convert the string to Unicode.
Good Luck!
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
Kindly help me regarding this.
Thanks in advance.
Bawa
|
|
|
|
|
Look for /stack option.
This question is not related to CLI, should have asked in VC++[^] forum.
|
|
|
|
|
write a program that reads in the average monthly rainfall for each month of the year and then reads in the actual monthly rainfall for each of the previous 12 months. the program then prints out a nicely formatted table showing the rainfall for each of the previous 12 months as well as how much above or below average the rainfall was for each month. the average monthly rainfall is given for the months january, february and so forth, in order. to obtain the actual rainfall for the previous 12 months, the program first asks what the current month is and then asks for the rainfall figures for the previous 12 months. the output should correctly label months
|
|
|
|
|
From Jamaica eh?
I tell ya what...fly me and a friend over, put us up and pay for tickets to the cricket world cup and Ill do all your homework
System.IO.Path.IsPathRooted() does not behave as I would expect
|
|
|
|
|
Come on !
Try some thing yourself, if needed help, then ask for it. Don't ask to write assignment for you.
|
|
|
|
|
Your homework is in C++/CLI ? Either way, we're not going to do it for you, but it seems likely that you've posted it in the wrong spot.
We are here to help, we are not here to do your work for you. Try to do your homework, find the right forum, and ask specific questions if you get stuck. Refer first to your textbooks, the fact is, your teacher will have given you everything you need to complete this assignment ( and if they have any idea, they will be watching these forums ).
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Can anyone give me a link to sources on the web or hints on how to write a program the will add and option to program window that minimize it to system tray? I want to do something simular to http://www.actualtools.com/windowmenu/ but only I only want to add a button to all application windows that will allow me to minimize it to system tray. For instance, if I startup Outlook it will automatically have this "minimize to system tray" added button it. If I run any application it will automatically have this "minimize to system tray" button added to it.
Thanks,
|
|
|
|
|
you want to do this using .NET ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Yes, that would be great!
Thanks
|
|
|
|
|
Hi, here is a code example to do that in visual c++
it was done by my teacher.
http://www.fi.uba.ar/materias/7542/herramientas.php?i=trayicon
bye
Andres Giachini - Software Developer
|
|
|
|
|
Does that mean you're using VC2005, and if so, is it the express edition ( as that would mean you can't use MFC ).
Did any of the answers you got, help ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Yes, I think that I can figure out from the information that I received.
Thanks!
|
|
|
|
|
|
I need to get a Log file, this code get four message{applcation,mueventlog, security, system} i would get a list of apllication log, thank you
array<eventlog^>^remoteEventLogs;
remoteEventLogs = EventLog::GetEventLogs( );
System::Collections::IEnumerator^ myEnum = remoteEventLogs->GetEnumerator();
while ( myEnum->MoveNext() )
{EventLog^ log = safe_cast<eventlog^>(myEnum->Current);
MessageBox::Show(log->Log);
|
|
|
|
|
Hi all,
I am thinking to create an application of Cryptography and steganography. Its quite interesting topic but i am not much familiar with the logic behind it. Is there any one who knows much about it and could guide me any good book for this or any code which could be of my help.
Thanks
|
|
|
|
|
|
led mike wrote: JFGI
System.IO.Path.IsPathRooted() does not behave as I would expect
|
|
|
|
|
Hi,
Regarding cryptography, it is a very big topic.
Regarding steganography, the concept is pretty simple to explain. But implementation can take that to any level from simple to complex.
The concept behind steganography is, we hide the data within another multimedia content, which doesnt show off the variation with this hidden message.
To make it clear, consider hiding a simple test message "Hello World" inside a 24-Bit Bitmap Image.
A bitmap image contains, 3 portions(file header, bitmap header and the actual 24bit bitmap content). The 3rd part, the bitmap content, contains 3 bytes for each pixel in a image. Let us say we have a picture of size 5 X 5. This will have 25 pixels and hence 75(25 X 3) bytes.
The change in the Bit 1(Least Significant Bit), wont create much variation to the bitmap image. So we take this as the slot to hide our data. We split our data to hide into bits and store each bit in the LSB of the Bitmap data.
I have implemented a simple version of hiding the data using this concept. And also the data retrieval part in C++. It was a very interesting stuff to implement.
Thanks.
With Regards,
Saravanan Somasundaram
|
|
|
|