|
Thank you Cedric now i see that sdl is previous message!!
whitesky
|
|
|
|
|
|
|
ok, so here is what i have to say to you.
you idiot. forget that
you don't listen what we answered to you. still you are asking the same question exactly the same way (ya, one thing you know is copy/paste).
you definitely lost my support on that topic (even if i didn't really know how to help you), but abusing of our time and patience will never help you nowhere in your life. no one is paid over Codeproject to answer ausive people, so we don't owe you anything!!
if you want an answer, start asking it correctly. then, don't repeat yourself ; everybody here saw that you asked the same question thrice...
man, all you deserve is get flamed
i repeat myself once again. its seems that i'm not the only one here not to know what SDL is, but still you re ask your sh*t without much explainations.
google yourself, and come back here when you have a true question about a specific problem; not ask people to do a whole job for you
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
-- modified at 13:25 Thursday 1st June, 2006
|
|
|
|
|
toxcct wrote: you idiot.
That's real professional. If it bothers you so, why not simply ignore him? No one deserves to be called an idiot, regardless of their action(s).
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
after 2 warnings, i think he searched such a reaction...
btw, i assume the entiere responsibility of my words.
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
toxcct wrote: btw, i assume the entiere responsibility of my words.
Thats MAN word
"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
Support CRY- Child Relief and You
|
|
|
|
|
I'm absolutly frustrated!
could a fresh set of eyes tell me why i'm getting this error:
(line 55) error C2664: 'strcpy' : cannot convert parameter 1 from 'char' to 'char *'
int main ()
{
CString sentence;
CString str("1");
CString str1("2.1");
CString num('\xDB');
char spc = ' ';
sentence = str + num + num + str1 + num + num;
for(int index = 0; index < (sentence.GetLength()); index++)
{
if(sentence[index] == num)
strcpy( (sentence[index]), spc); //line 55
}
printf ("%s \n",sentence);
return 0;
}
Thanks so much... Confused & Frustrated
|
|
|
|
|
The first parameter of strcpy function must be of pointer type, char * , but you supply sentence[index] , which is a character of the string, not a pointer.
From the fragment, it seems that you need to replace a character with another one. For this task, try to use the Replace member function instead of your for loop:
<br />
sentence.Replace(num, spc);<br />
-- modified at 11:22 Thursday 1st June, 2006
|
|
|
|
|
Dear Kitty!
U cannot copy a character to a string!!!
Instead make that space ' ' as " "(i.e, character as string constant)..
Then hope fully it should work..
Regards
Karthick
Karthick. G
|
|
|
|
|
kitty5 wrote: for(int index = 0; index < (sentence.GetLength()); index++)
{
if(sentence[index] == num)
strcpy( (sentence[index]), spc); //line 55
}
The above code is VERY VERY bad! Unfortunately, your compiler won't tell you exactly how bad it is, but I'll give you an alternative:
Replace the entire for-loop with the following:
sentence.Replace(spc, _T(' '));
A better solution would be to re-write the entire function to the following:
<br />
int main ()<br />
{<br />
CString sentence;<br />
sentence.Format("1 2.1 ");<br />
printf("%s \n", (const char*)sentence);<br />
return 0;<br />
}<br />
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Thanks,
Actually I was trying to simulate the output of a load after asking for an input and a current value(in amps) and I'm suppose to get like 0 and 0.5.
But the device kicks out 0'\xDB''\xDB'0.5'\xDB''\xDB'
instead of 0 0.5 .
And sscanf doesn't know what to do with '\xDB'.
I need to just get the 0 and 0.5.
Kitty
|
|
|
|
|
Unless you know exactly how many numbers you will have in there, sscanf isn't a wise choice. You can have strtok do it for you, but the CString::Replace method will work and look cleaner.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
kitty5 wrote: And sscanf doesn't know what to do with '\xDB'.
Right, sscanf() does not handle multibyte hexadecimal characters.
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
Hi
I am working on mshflexgrid in mfc
i want to know how can i hide a column, setting the width to zero is one solution ,but the user still can resize it and see the hidden column
thanks alot
|
|
|
|
|
Can someone please tell me if it's possible to capture a windows event(like when you receive a message with windows NET SEND) with a program. And if it is can you get like the IP from where the message was sent?
KOM UIT DAAAAA!!!
|
|
|
|
|
|
Thanx that did help a bit.
KOM UIT DAAAAA!!!
|
|
|
|
|
Hi,
I am not able to use Tokenize() method wid CString objects in my VC6 application while same code was compiled successfully in VC.Net.
int curPos = 0;
CString resToken = strDecimalWords.Tokenize(" ",curPos);
while strDecimalWords which is CString object,contains "1 hundred 23".
but VC compiler is showing this compile time error.
f:\advivr\ivractionmanager.cpp(495) : error C2039: 'Tokenize' : is not a member of 'CString'
Can anyone suggest wat to do.
Regards
Cyber Friend
|
|
|
|
|
Since the Tokenize member function was not yet defined in older MFC library, you have to solve the problem in a different way. I think you have to deal with a series of Find(" ") member functions combined with Mid(...) , in a loop.
|
|
|
|
|
|
|
Hi!
When I call FillRect with a brush created from a bitmap, the rect will get filled but the bitmap is tiled, even though the rect and bitmap size are the same (20 X 20). Is there a reason for that? I thought the bitmap would get displayed correctly!
Screenshot at www.edovia.com/pictures/FillRect.png[^]
<br />
RECT rectThumb;<br />
<br />
hBitmap = (HBITMAP)LoadImage(NULL, m_szThumb, IMAGE_BITMAP, 0, 0,<br />
LR_LOADFROMFILE | LR_CREATEDIBSECTION | LR_DEFAULTSIZE | LR_LOADTRANSPARENT);<br />
<br />
bitmapThumb.Detach();<br />
bitmapThumb.Attach( hBitmap );<br />
bitmapThumb.GetBitmap( &bmp );<br />
<br />
rectThumb.top = rectFill.bottom;<br />
rectThumb.bottom = rectThumb.top + bmp.bmHeight;<br />
rectThumb.left = roundf( ( rectClient.Width() - bmp.bmWidth ) / 2 );<br />
rectThumb.right = rectThumb.left + bmp.bmWidth;<br />
<br />
brush.CreatePatternBrush( &bitmapThumb );<br />
memDC.FillRect( &rectThumb, &brush );<br />
brush.DeleteObject();<br />
|
|
|
|
|
Description of CreatePatternBrush says that Windows uses only the first 8 rows and columns of pixels from the bitmap you supplied. If you just need to display an image, why do not use bitmap-drawing functions, like BitBlt ?
|
|
|
|
|
BitBlt did the trick... thanks! 
|
|
|
|