|
I guess I've been using CString for too long because for the life of me I can't remember how to assign a value to a character array (not through initialization). I thought I could do something like
szTerm = " \r\n"; but that just gives me errors. Am I completely off with this and do I have to use strcpy and it's associated functions...? Thanks.
- Aaron
|
|
|
|
|
char szTerm[4] = {0};
szTerm[0] = ' ';
szTerm[1] = '\r';
szTerm[2] = '\n';
Maxwell Chen
|
|
|
|
|
|
(1)char szTerm[4]={'a','b','c'};
(2) char szTerm[4]="abc";
|
|
|
|
|
you can also use strcpy(szterm, " \r\n"); from <string.h>
TOXCCT >>> GEII power
|
|
|
|
|
Thanks for info guys. I guess I have been using CString too long.
- Aaron
|
|
|
|
|
I'm doing some dialogs in Visual Stupido.NET, and I can't seem to find a way to may a simple etched frame. I don't want divider lines, and I don't want captioned group boxes. I want what I used to be able to do in Visual C++ 6.0's resource editor.
Does anyone know if what I want to do is even possible?
So far, I'm not impressed with this new crap from MS...
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
|
Hi everybody.
I'm writing an Activex, that it interact with the serial com, sending commands.
Thats ok.
But I have two questions:
First, I like to know how to adjust the size of the control when someone put it in a form, (in VB or in a Dialog in C++). 'Cause in OnDraw() I draw a BMP, but I want to fix it to an especific size and disabled sizing. I want to fix the size for the desing time, because the control is not visible at runtime.
Then, how can I show a tip, (a short description), in the Property window, (in the bottom of the window) when a property is selected. Where I should write that description in the Activex project??.
Thank you.
Demian.
|
|
|
|
|
can't you handle the WM_SIZE message and just set it back to whatever your size is?
If it's broken, I probably did it
bdiamond
|
|
|
|
|
Greetings,
I have been using dialog based MFC apps for a while and just noticed that, at least in my applications, the exit codes aren't always 0 (even when things seem to be working correctly otherwise.)
If I run any of my dialog apps from the debugger in VS 6.0, and I then close the app with either System->Close, Alt-F4, or the 'X', I see the following messages:
The thread 0xBF4 has exited with code 2 (0x2).<br />
The program 'C:\Documents and Settings\justin.cooke\My Documents\MyProjects\randomNumGen\Debug\randomNumGen.exe' has exited with code 2 (0x2).
If I instead close it with the OK or Cancel buttons, the exit codes are 0, as expected.
What's going on? Does the 2 code just indicate how the app was closed? I was always under the impression that a code other than 0 indicated an error. I tried to find a list of what these codes mean in MSDN and online, but had no luck.
Thanks,
Justin
|
|
|
|
|
Justin Cooke wrote:
I was always under the impression that a code other than 0 indicated an error.
That's a hold-over from the DOS days. Read the docs for CDialog::EndDialog() .
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
OK. I've already taken a look at that info. I understand any int can be returned. How do I know what 2 means? In this case, I'm guessing it just means OnClose was called, but how do I know for sure? Is there a list of return codes somewhere? When I'm running with the debugger and I see nonzero codes, how can I tell if they indicate errors?
Thanks for your help,
Justin
|
|
|
|
|
Look in winuser.h, about 3/4 of the way down.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Thread and process exit codes have no inherent meaning, the code is just a DWORD that can be used for any purpose. As the other poster said, not every app will exit with 0; and if you see a nonzero exit code it doesn't imply an error happened.
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
You cannot truly appreciate Dilbert unless you've read it in the original Klingon.
|
|
|
|
|
OK. Thanks for the info guys. I'll just stop wondering what a nonzero return means, unless I have another reason to suspect a problem.
Thanks Again,
Justin
|
|
|
|
|
Is there a way we can give Windows XP look and feel to applications running under other operating systems beside Windows XP?
|
|
|
|
|
I belive if you have a manifest file and the version of Windows has the newer common controls file you can give it the XP look.
- Aaron
|
|
|
|
|
Only by drawing all the controls and windows yourself.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
I suppose you mean Windows OS's. Take a look at WindowBlinds[^], maybe it fits what you need.
If you want XP look and feel for programs you have the source code, you already are on the right place.
...Plug & Pray...
|
|
|
|
|
You have to write Custom Manifest file for that!
here is link to achieve same
http://www.codeproject.com/cpp/AddXpStyle.asp[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Hello,
I've used code similar to the one written by the author of http://www.codeproject.com/docking/toolbarcombo.asp, I place a combobox at a toolbar, everything works great untill I set the style of the toolbar to flat, and then, when the buttons are set to be 32x32 I see the separator under my combobox. Any suggestions or ideas on how to get rid of that separator?
Thanks in Advance,
D.
|
|
|
|
|
the question has already been asked on the suggestion forum... we're waiting for chris maunder's response...
TOXCCT >>> GEII power
|
|
|
|
|
And when are we expecting to get response from Chris Maunder?
|
|
|
|
|