|
I dont really understand what you are attempting to do but your code is a bit all over the show
fairose wrote: baseStationNode = gcnew ArrayList();
baseStationNode->Add(baseStationNode);
What is this supposed to be doing?
System.IO.Path.IsPathRooted() does not behave as I would expect
|
|
|
|
|
This part is that i am trying to initialise a variable call baseStationNode into the arraylist and newing it.
private: ArrayList^ baseStationNode;
this is where i set the the variable to be a arraylist.
|
|
|
|
|
pleaaaaaase, Read the posting guidelines[^], then edit your message, and place your code into <pre> tags. this will format your post regarding Codeproject's style sheet.
thanks.
|
|
|
|
|
To SendMessage how to send a string as argument
and how to recieve and display that string
lets say in a edit box i have some text ABCD , i want to capture this text to a CString and pass this CString to Sendmessage as Wparam parameter to other remote process(iam using sockets for remote connevtion). and at remote Application i will capture this wparam and display the message
how to do this using send message.
Thanks in advance
abhi
|
|
|
|
|
abhiramsss wrote: and pass this CString to Sendmessage as Wparam parameter to other remote process(iam using sockets for remote connevtion).
umm you don't use SendMessage to communicate to another process using a socket.
led mike
|
|
|
|
|
I am confused that why we have to pass a reference of same class type into a copy constructor? I searched a lot but i am not able to find out the exact answer.So,plz if anybody can forward me the relevant answer of this question then plz forward it as soon as possible.Please specify the reason.
thanks..
|
|
|
|
|
When you are copying objects, you need a source and a destination. The destination or "new" object must be able to access the data of the source object to copy its data and perform any necessary resource allocation.
ref class Foo
{
int value;
String ^string;
public:
Foo() {}
Foo(const Foo %f)
{
value = f.value;
string = f.string;
}
...
};
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
He is interested in knowing why need of passing parameter as reference.
|
|
|
|
|
|
Thanks!
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
|
Because that's just how the copy constructor works. The parameter has to be a reference. If it weren't a reference, how could you make a copy of the input object? (You don't have a copy constructor yet, you're writing it!)
|
|
|
|
|
I am creating a console app that starts NOTEPAD.EXE but then needs to emulate the user accessing the menu.
I have started the process by using
Process::Start("NOTEPAD.EXE");
Now I need to simulate a user pressing 'Alt F' to access the file menu - how do I achieve this ??
Pete
|
|
|
|
|
Off the top of my head....
Use the non static version of Process::Start() so you have a Process object
Call Process.MainWindowHandle() to get a handle to the window
Then use Win32 functions or MFC to send messages to the window using the handle
System.IO.Path.IsPathRooted() does not behave as I would expect
|
|
|
|
|
Thanks Josh,
See how we go.....
Pete
|
|
|
|
|
I woud like to have an example, how to encryipt String into md5 hash.
Coud md5 encryption produce same hash as md5 from php?
Thanks in advance
|
|
|
|
|
Look up MD5CryptoServiceProvider on MSDN.
Here's some sample code from MSDN :-
private:
array<Byte>^ MD5hash( array<Byte>^data )
{
MD5^ md5 = gcnew MD5CryptoServiceProvider;
array<Byte>^ result = md5->ComputeHash( data );
return result;
}
|
|
|
|
|
I already saw it, but i wan't to hash my String (password). I can't use Byte as an imput.
this is php example:
<?php
$string = "secret";
echo md5($string);
?>
the output would be: 5ebe2294ecd0e0f08eab7690d2a6ee69
how can i achive this in c++/cli?
|
|
|
|
|
Found an article abaout it here on CP:
http://www.codeproject.com/dotnet/MD5FunctionPHP.asp
Now it works, perfectly
|
|
|
|
|
Hi All,
My following code shows how I am starting a process, in this case it's NotePad.
Process^ myProcess;
myProcess = Process::Start("Notepad.exe");
How do I then control the Window State - for example, if I want to Minimize the window, how is this achieved ?
Pete
|
|
|
|
|
Use this overload :-
Process^ Start (ProcessStartInfo^ startInfo)
Set the WindowStyle property of the ProcessStartInfo object to ProcessWindowStyle::Minimized
|
|
|
|
|
G'Day Nish,
Thanks for that - all sorted out now.
Pete
|
|
|
|
|
Hello
I am using Combobox, and I have to manage quite big amount of data, If I do it with if sentence to assing the values, the program takes an excessive time.
The time it is taken when the event OnselChange is used (because of the amout of if used). This can be avoided in MFC by using Set/GetItemData, Is there any alternative to this with the CLI??
Thanks in advance
|
|
|
|
|
I am not a MFC programmer but the .NET Framework uses data binding to populate such controls.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
The items collection in the combobox is a collection of type object
As far as I know you can put any object in there and it will call ToString() on the object to get the label for the item.
System.IO.Path.IsPathRooted() does not behave as I would expect
|
|
|
|