|
Hi.
I'm using a TextBox to display status messages to the user (like:
"Retrieving MAC address: 002345235cbd"
"Retrieving IP-number: 10.10.10.10"
and so on). The messages are added line by line so that the first message is never over written. The only way I have found to be able to control when to get a new line is to use a String array and the set_Lines method, since neither \n, \v or \f has the desired effect. Is there no better way?
The main problem using the TextBox->set_Lines method is that all the lines are set at the same time so I can't have different fontstyle on different lines.
Anyone has a solution? Or should I use something else than TextBox to display the messages? If so what?
Regards
/EnkelIk
|
|
|
|
|
Environment.NewLine is the .NET friendly way to make something multiline, and make sure the text control is set to multiline also.
Christian
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
Yes, I can't find a better way than using strings and then doing something like:
String* break="\r\n";
String::Concat(textString1,break,textString2);
This is obviously a lousy solution because you have to put all of your strings together before you even display them!
MS says that we shouldn't even be using strings anymore if they have to be manipulated repeatedly, but should use stringBuilder instead. Unfortunately, stringBuilder has been proven in clinical trials to cause insanity in 3 out of 5 users.
|
|
|
|
|
this line of code
IFormatter formatter = new BinaryFormatter();Stream stream = new FileStream("MyFile.bin", FileMode.Create, FileAccess.Write, FileShare.None);formatter.Serialize(stream, obj);stream.Close();
alwas write data at the end of file or not ?
i mean there are alot of Objects .
where it write in the file?
this line of code
object obj = formatter.Deserialize(stream);
alwas read data from the begining of file or not ?
i mean there are alot of Objects.
where it read from the file?
r00d0034@yahoo.com
|
|
|
|
|
HOW to creat FileStream object that coud write into a file ?
can you explain any of its constructor?
how to write data using FileStream into a file or read theobject from a file to the FileStream object only then it is possible to serialize or Deserialize it?
i want to write a hastable object into a file that contain class objects,and class objects further contain hashtable and other class objects.
may i write that hashtable into a file and retrive again?
i study the api but could not understand what methods to use.
r00d0034@yahoo.com
|
|
|
|
|
if i have a class like
public __gc class{
String *str;
int a ;
}
i want to right its object into file.after that i want to send it to different computer through network and again want to read it again if i have the same class there may i read it into that class object.
is it possible ?
can any body write the syntex of reading and writing the object ito a file ?
r00d0034@yahoo.com
|
|
|
|
|
i want to write its object into a file and send that file through a network to different computer and i want to recive that object again if i have the same class there.
may i read the same object on network from a file?
any body can explain my idea into code like
how to write object into file ?
how to read object on the network (having same class there) from file ?
r00d0034@yahoo.com
|
|
|
|
|
I n how many forums are you going to ask this!
Learn one thing: C++ questions belongs to the Visual C++ forum!!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
i think there is a class in dot net also and object are also created in csharp?
i think thats a language independent question.
r00d0034@yahoo.com
|
|
|
|
|
how to use OutputDebugString in managed code?
r00d0034@yahoo.com
|
|
|
|
|
From Managed C++ you can include windows.h and then just call the function as you normally would.
This will make use of the "IJW" or "it just works" interoperability feature of Managed C++.
The following page has additional information on this: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmxspec/html/vcmg_PlatformInvocationServices.asp
Hope this helps!
Tarek Madkour & Mark Lacey
Microsoft Visual C++ Team
This posting is provided "AS IS" with no warranties, and confers no rights.
|
|
|
|
|
i want to show a string in vs.net debug output window.
i think i can use Trace or Debug class. but i dont now how to use them to display a string in managed code ?
if there exist some other way plz tell?
i want to see the execution and flow of my program
can any bode tell?
plz write the complete syntex i will be very thank full to u.
r00d0034@yahoo.com
|
|
|
|
|
in the console window ? or the output window ?
something like :
<br />
using namespace System::Diagnostics;<br />
...<br />
<br />
Console::WriteLine(S"XmlNodeType::Element : {0}", reader->Name );<br />
<br />
Debug::WriteLine(S"XmlNodeType::Element : {0}", reader->Name );<br />
Max.
|
|
|
|
|
I am new of the term so Managed Extensions C++ (MC++) is new to me. I'd like to know of about, any others details welcome.
Thank you
|
|
|
|
|
Image C++ stripped of all power so it fits into the .NET world. MC++. Basically it's C++ without the cool stuff, but with the .NET framework libraries, and compiled to MSIL, so it is interoperable with C#, etc. Useful to pull legacy code into the .NET world, but otherwise a waste of time IMO.
If you're new, you should stay away from ALL M$ specific constructs and learn C++ before you think about windows, dialogs, MFC, etc.
Christian
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
I'm looking for a good book that covers the windows commands and controls. The on line help is all great as a function reference manual, but doesn't help the novice (me) figure out which commands to use when. I'm looking for something to get me started writing C programs that will open and close applications, run from a hidden window, create a task manager, etc.
Can anyone recommend a good book, or web sight to start with?
squeaky
|
|
|
|
|
on microsoft press, look for "Visual C++.net step by step" by Templeman and Olsen, quite a nice book.
maybe not have all of the more advanced features you're looking for, but it's a nice start.
Max.
|
|
|
|
|
i want to use .net namespaces into my MFC application how to do it ?
can any body give help and releted links?
r00d0034@yahoo.com
|
|
|
|
|
i have converted a vc++ dll into managed code.
that hook keboard .it run in managed code but it also creat some exception when i ignore them i can seen the result of mine programe.
i dont know how to get rid fro, these execptions?
could any body help?
r00d0034@yahoo.com
|
|
|
|
|
hello,
i'm stuck in a problem with IShellView. here's my story :
i've implemented an IShellBrowser to make a file explorer holding to the windows one. problem : the THUMBNAILS display (only in windows 2000 and later).
when i switch to THUMBNAILS display, all is right, except when i change to another directory : the THUMBNAILS display isn't kept. nevertheless, i've been careful in saving the FOLDERSETTINGS of IShellView, and moreover, thanks to it, the "large icons" display, the "small icons", the "list" and the "details" ones are well and truly restored when i visit another directory. only the THUMBNAILS display is lost when the directory is changed.
why ? how to keep the THUMBNAILS display ? where is this parameter stocked if it isn't in FOLDERSETTINGS ?
|
|
|
|
|
I want to add tree control in the left view of my SDI application in MFC, also i want to add events regarding each Child node of the tree..
Any Help ??
ThankU
|
|
|
|
|
Hi there !!
I am currently working on my term project . I need to implement MSN Messenger type Alert (which appears when a user signs in ) in MFC. If any one could tell me how to implement that or give any references or any example code etc. i would be obliged.;)
Petrol.
|
|
|
|
|
|
I need to write a program that reads n from the keyboard and prints on the screen the sum of numbers 1 + 4 + 7 + ... + (3n-2). Compile it and run it
What is the result for n=7 and n=98
|
|
|
|
|
huh!
where's the programming question please ? write some code, and we'll be happy to help you !
say that it's not a homework assigment !?
Max
|
|
|
|