|
Thanks for your replies !!!
Another question:
What is the code for handling this szenario in the right way?
Kind regards
|
|
|
|
|
please stomuch me
if i have
string s[7];
s[1]="hello"
s[2]="welcome"
.
.
.
s[7]="how are you"
can i trace s[1] by loop
and select specified item as example
i want to select e from s[1]="hello"
the question is : this process possible or impossible?
I hope help me....thanks
|
|
|
|
|
sofia_111 wrote: can i trace s[1] by loop
s[i] where i is the iterator variable
sofia_111 wrote: i want to select e from s[1]="hello"
s[i][1]
|
|
|
|
|
tank you
i wrote this in early time but did'nt work
now is working
|
|
|
|
|
sofia_111 wrote: the question is : this process possible or impossible?
No. The question is, what do you want to do?
sofia_111 wrote: please stomuch me
I don't even want to know what that could possibly mean.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
sory
i meant please stomach me
thanks
|
|
|
|
|
if
string s[7];
s[1]="hello";
then, of course, s[1][1] is equal to 'e' . Is what are you looking for?
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
For today, I, like, think, this one will be the question of the day. What do you think?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Oh, there are always surprises here, keep on charging your CPMRU 's battery pack.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
thank you
i wrote this in early time but did'nt work
now is working
|
|
|
|
|
I have a bitmap with 256 colors. I have converted this image into an array. That's OK! Then I change some values in this array. The problem is: how can I convert this array back to bitmap? (in the same size, just some pixel colors changed)
I use VC6++. Please help!
Good luck
|
|
|
|
|
instead of changing value of pixel in array.. directly change values at DC and save it!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
No. that's not I want. I want to control the pixel values changed.
For ex, ALL value = 1 will be changed into 10. And I want to see the result of changing.
Is there any software can do that? I mean, I can choose the value to change and I can see the result. If not, please help me to solve my problem.
Thanks for your reply.
Good luck
|
|
|
|
|
Then I would use a splitter to make 2 or 3 different views, in one of them you have the "before" bitmap, in another one you have the "after" bitmap and in the third (or just together with the first) the controls to change the colours. Two different arrays, two different dc's, two different bitmaps...
Is that what you mean?
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
What do you mean by "bitmap"? there's lots of different ways to represent
bitmap images
If you meant a Windows DDB bitmap (HBITMAP), then you could use a DIBSection.
A DIBSection gives you all the features of a device independent bitmap (DIB) through
a HBITMAP, along with a pointer to the pixel data bits, which you can work with directly.
Here's an example with a grayscale color table:
LONG lImageWidth = 640;
LONG lImageHeight = 480;
WORD wBitsPerPixel = 8;
LONG lBytesPerRow = (((lImageWidth * (long)wBitsPerPixel + 31L) & (~31L)) / 8L);
BITMAPINFO *bm = (BITMAPINFO *)new BYTE[sizeof(BITMAPINFO) + 255 * sizeof(RGBQUAD)];
bm->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
bm->bmiHeader.biWidth = lImageWidth;
bm->bmiHeader.biHeight = lImageHeight;
bm->bmiHeader.biPlanes = 1;
bm->bmiHeader.biBitCount = wBitsPerPixel;
bm->bmiHeader.biCompression = BI_RGB;
bm->bmiHeader.biSizeImage = 0;
bm->bmiHeader.biXPelsPerMeter = 0;
bm->bmiHeader.biYPelsPerMeter = 0;
bm->bmiHeader.biClrUsed = 0;
bm->bmiHeader.biClrImportant = 0;
for (int color_index = 0; color_index < 256; color_index++)
{
bm->bmiColors[color_index].rgbBlue = color_index;
bm->bmiColors[color_index].rgbGreen = color_index;
bm->bmiColors[color_index].rgbRed = color_index;
bm->bmiColors[color_index].rgbReserved = 0;
}
BYTE *pBitmapBits;
HBITMAP hBitmap = ::CreateDIBSection(NULL, bm, DIB_RGB_COLORS, (void**)&pBitmapBits, NULL, 0);
if (hBitmap)
{
::DeleteObject(hBitmap);
}
delete[] (BYTE *)bm;
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
hi,
i have a code in win32 platform in Vc8 using gmtime to convert localtime to UTC time. but when i was converting the VC8 code to Win Mobile it gives some error. i have tried the localtime to filetime and also it gives a wrong answer.
thanks in advance
Mohanraj D
RAJA
modified on Tuesday, May 6, 2008 7:12 AM
|
|
|
|
|
Hi Mohanraj,
you can try this "TzSpecificLocalTimeToSystemTime" API function, but I'm not sure if available in WM5.
|
|
|
|
|
but i want to change from system time to file time, which is then converted to UTC Time. the answer does'nt help me.
thanks,
Mohanraj D
RAJA
|
|
|
|
|
|
Mohanraj D wrote: but when i was converting the VC8 code to Win Mobile it gives some error.
It should give you a linking error. Because, gmtime , simply isn't available on Windows Mobile. You might want to try what is suggested by our friend, Raj Kumar.
A 'C' question asked in the Visual C++ forum:
Title: please stomuch me
if i have
string s[7];
s[1]="hello"
...
s[7]="how are you"
can i trace s[1] by loop and select specified item as example i, want to select e from s[1]="hello"..... the question is : this process possible or impossible!? I hope help me.......thanks - sofia_111
|
|
|
|
|
|
No. You missed the stomuch me part. It's a C question therefore.
A 'C++' question asked in the Visual C++ forum:
Title: please stomuch me
if i have
string s[7];
s[1]="hello"
...
s[7]="how are you"
can i trace s[1] by loop and select specified item as example i, want to select e from s[1]="hello"..... the question is : this process possible or impossible!? I hope help me.......thanks - sofia_111
|
|
|
|
|
Hi,
I opened a file that is in Compress Drive (NTFS). But if I overwrite this file then file system allocates different cluster to it and the original data is on actual cluster that were originally allocated to it.
How could I overwrite the file?
|
|
|
|
|
why do you need this raw level access ?
the OS already handles this by itself, so why do you bother ?
|
|
|
|
|
Will FlushFileBuffers() be of any help to you?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|