|
Jason Liu wrote:
but I don't know which software produces this.
What about :-
INNO SETUP[^] and it's freeeeeeeeeeeeeeeeeeee....
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Alok, thank you for your quick reply!
Is this screen format specific to Inno Setup? Or is there some other program that will create the same screen?
Jason
|
|
|
|
|
Jason Liu wrote:
is there some other program that will create the same screen
yeap there are many.. But you create same with INNO tooo..
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Jason Liu wrote:
Is this screen format specific to Inno Setup? Or is there some other program that will create the same screen?
I believe the answer you are looking for is.... yes!
Try not! Do or... you know the rest. -Danny
|
|
|
|
|
|
I find that in some functions, the returned points to a string needn't be deleted, how to implement it? smart point?
|
|
|
|
|
Return an instance of a string class instead of a char *. This is what you should do in any case.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Without a string class, is there a way?
|
|
|
|
|
In general, it's up to the callee to ensure any newly-allocated memory which is returned by a function is properly deleted. In the case of strings, for modern applications, returning a std::string is the easiest way of ensuring no memory is leaked (or even prematurely freed).
If you're dealing with legacy code that returns a 'char *' or similar, and expects the caller to free memory (a la strdup()), then you could consider a smart pointer of some type - but be aware the default STL smart pointers (std::auto_ptr) uses 'delete' on any memory it sees. This is not necessarily the same as calling 'free()' on the returned object (or indeed delete[] for arrays).
Also be aware that smart pointers have a lot of their own issues - notably ownership. Boost gets around this by having shared and scoped pointers - if you have access to boost, then using a scoped_array might be appropriate, if the function you're calling allocates memory with new char[].
If not, you'll have to write your own smart pointer - which can be tricky to get right; but for very simple cases is only a few lines of code.
Matt Godbolt
Engineer, ProFactor Software
StyleManager project
|
|
|
|
|
I am not sure you needed this, but anyway...
followait wrote:
Without a string class, is there a way?
Yes there is.
Create your own structure:
struct MyString<br />
{<br />
char str[200];
};
Return this stucture from your function:
MyString DoSomething()<br />
{<br />
MyString str;<br />
strcpy(str.str,"Hello old man");<br />
return str;<br />
}
Now an object of MyString will be returned.
this is this.
|
|
|
|
|
Dear all,
I have an application written in VC++6.0. Now I want my application to have Windows XP look and feel. That means my Application (all windows and controls) will have skin like Windows XP event if it doesn't run on Windows XP. Does any one know any way or tool to do this.
Thank you very much
|
|
|
|
|
Yeah, buy a library to do it. That's about it. BCG have a free one as well, you could look at that.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote:
BCG have a free one as well
What's BCG?
|
|
|
|
|
|
Your suggestion is to buy BCG library, isn't it. I'm using BCGControlBar Library (v. 7.31) Professional Edition but my problem is I could not use this to apply to dialog controls to make them have Windows XP Look and Feel when I run my application under Windows 2000.
Do you know any other tool?
Thank you
|
|
|
|
|
There are numerous other libraries like it, such as Dundas. I suggest trying with google.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Dear Christan Graus,
what is Dundas?
|
|
|
|
|
|
Dear toxcct, I could not see any thing related to my question
|
|
|
|
|
Apart from the fact that they have banner ads here all the time ( looking at one right now ), what is google ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
nguyenhc wrote:
I could not use this to apply to dialog controls to make them have Windows XP Look and Feel when I run my application under Windows 2000.
I think you might be talking about XP's themed look. AFAIK, this is only available under XP.
The two most common elements in the universe are Hydrogen and stupidity. - Harlan Ellison
Awasu 2.1.2 [^]: A free RSS reader with support for Code Project.
|
|
|
|
|
If I test a console program (client_server) and it can work. But how to use the source code into the dialog application because when I use the console source code into the dilog that I designed, it can not send the string that I want. Can tell me how to use it in the dialog application.
|
|
|
|
|
This question is impossible to answer. Any code in your console app will probably translate to a dialog app, but the key thing is to put it in the right place in an event driven system so that it's called when you want it to be. Without seeing the code, it's not possible to say more.
1983ttj wrote:
it can not send the string that I want
What does this even mean ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Below is the code at the console application to send and receive:
// Send and receive data.
int bytesSent;
int bytesRecv = SOCKET_ERROR;
char sendbuf[300] = "Door Close";
char recvbuf[300] = "";
bytesRecv = recv( m_socket, recvbuf, 300, 0 );
prinf( "String Recv: %s\n", recvbuf );
bytesSent = send( m_socket, sendbuf, lstrlen(sendbuf), 0 );
printf( "String Sent: %s\n", recvbuf );
It will send a "Door Close" to server. I copy this into the dialog that to send "Door Close" when I click on that button, But I dont' know how to chage it so that it can send.
|
|
|
|
|
Why would you have to change it ? The code has nothing to do with dialogs, or consoles. If it worked in the console app, and it's getting called in the dialog app, it should work there, too.
Does the code compile ? Are you including the right header and lib files in your project ( if not, it won't compile ) ? Have you called WSAStartup ? Here[^] is the MSDN entry on the recv function, perhaps it can give you a clue what is in your console app, but you've failed to port to the dialog app ? I'm guessing you didn't write the console app ?
Christian Graus - Microsoft MVP - C++
|
|
|
|