|
|
Looks very impressive! I hope I will be able to apply the stuff... Thamks!
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
I want to create a button that has its text on more than one line. If the text is longer it might be useful not to build very wide buttons.
Is it possible in VC++6?
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
Yes. Create a button in the resource editor and type in text. You have to select "Multiline" in the properties under the 'Styles' Tab. You should see the text go to the next line.
John P.
|
|
|
|
|
Thanks!()
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
As in the subject line I want to make an EditBox that divides the input in multiple lines (like MSWord does when reaches the end of line).
Is it possible in VC++6?
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
Yes. Use the ES_MULTILINE style.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Thanks!
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
While the sleep() function is executed, can another method in the same program run?
If not, how can I make 1 method run while the other is delayed?
|
|
|
|
|
|
Only if it's in another thread.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
You can use Timer for the function where you have used sleep() function.
It is more easier than using thread.
|
|
|
|
|
Hi all,
I'm struggling to add a string to a certain portion of a buffer. The buffer size is 300. I'm using a ini file where I keep the coordinates (From Position - To Position). So now I want to take the string and using the coordinates put data into certain positions into the buffer. For example:
[DATA]
NAME=(1 13)
AGE=(14 17)
Lets say the string has a value of: "Hallo There Walter 20"
So I perform a substring on the string using a dirrerent structure, where I get hold of the NAME and the AGE (this step is working thus is not relevent - this is only a test string)
Now I want to use the above ini format for NAME and AGE to put it into the buffer. So from position 1 to 13 I want to put 'Walter ' (filling with spaces) and then from position 14 to 17 I want to put '20 '.
An I making sense ??
Thanks in advance
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
Programm3r wrote: An I making sense ??
Basically, yes.
You want a string class (std::string or CString ) and its substr() or Mid() functions.
Failure is not an option - it's built right in.
|
|
|
|
|
What about
void copyat(char * strBuffer, char * strSource, int iStart, int iEnd)
{
int iLen = strlen(strSource)
for ( i=0; i< iEnd - iStart + 1; i++)
{
strBuffer[iStart+i] = i < iLen ? strSource[i] : ' ';
}
}
?
of course, same preconditions must be satisfied (for instance, strlen(strBuffer)>iEnd , ...).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
|
maybe strBuffer is not properly initialised (for instance, if strBuufer[0]='\0' you see an empty string). The code snippet simply writes the requested, blank-padded, string at choosen position. Anyway, I will perform a little test.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
|
<br />
char buff[300];<br />
sprintf(buff,_T("%-16s %d"),"Walter",20);<br />
printf(buff);<br />
Will output:
"Name 20"
-Randor (David Delaune)
|
|
|
|
|
Looks like the forum removes spaces too!
It will output:
"Walter (lots of spaces)20"
-David Delaune
|
|
|
|
|
Randor wrote: Looks like the forum removes spaces too!
Unless you use the appropriate tag.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Are you referring to the HTML non breaking space? '&nbsp'?
If so, I considered that on the second post, but took the lazy route since I did not feel like pasting 20 of them.
-Dave
|
|
|
|
|
Randor wrote: Are you referring to the HTML non breaking space? ' '?
No, I was referring to <pre> or <code>.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I actually tested with <code> in the preview in the second post and it didn't work. However <pre> seems to work. Thanks for the tip.
-Dave
|
|
|
|
|
Is it possible to place an Edit Box on a "main window" and access it from a child window without going through all kinds of hoops?????
Thanks in advance
Pierre
|
|
|
|