|
I don't know about tutorials, but it generally comes
down to looking up the published file format and parsing the
file appropriately.
Examples:
BMP[^]
PNG[^]
TGA[^]
RAW = Google "RAW file format"...there's lots of raw formats.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: I don't know about tutorials, but it generally comes
down to looking up the published file format and parsing the
file appropriately.
or when one can't figure out one needs to do that, perhaps one should start by reading the McDonalds menu.
led mike
|
|
|
|
|
Hey, that would imply that they should consider changing...
Ahhh never mind.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
|
For bmp,png,gif,jpeg and I think tiff you can use of CImage class But onthe codeproject you can see CXImage article is very helpful for you.
|
|
|
|
|
Thanx for all your help,
i hope i can figure it out now
Many thanks & Best regards
Croc
|
|
|
|
|
I glad our answers were helpful for you.
|
|
|
|
|
Hi,
I am having a rectangle.
I need to create a graph by setting x axis -80 to 80 and y axis -80 to 80.
Means the BottomLeft of the rectangle will be (-80,-80); and top will be (80,80).
By using mapping modes MM_ANISTROPIC.
I need to draw a point if suppose a point is (-75,60).
Then the point should be drawn in the rectangle.
Thanks in advance.
|
|
|
|
|
pallaka wrote: I am having a rectangle.
Congratulations. How exciting for you.
led mike
|
|
|
|
|
Hi,
If you can not give answer then keep quite.
But it will great if you giv atleast a hint to a solution
|
|
|
|
|
pallaka wrote: If you can not give answer then keep quite.
No I won't. Now what are going to do?
pallaka wrote: But it will great if you giv atleast a hint to a solution
Sure no problem. Think first then write code then observe the results. Now repeat as many times as necessary.
led mike
|
|
|
|
|
Yeah - keep quite.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: Yeah - keep quite.
What? You can hear me typing?
led mike
|
|
|
|
|
I'm trying to find an easy way to convert a CString to a char* without having to do it character-by-character.
I've tried memcpy unsuccessfully. Anyone have any tricks?
|
|
|
|
|
CString provides a (LPCTSTR) cast operator for this.BTW, what are you trying to achieve ?
can't you just use CString::operator[]() or CString::GetAt() to retrieve a character in the CString object ?
|
|
|
|
|
I want to get the entire string into a char array in case I can't figure out how to do something else.
|
|
|
|
|
I believe toxcct meant "what do you want to do that for ?"
|
|
|
|
|
super_ttd wrote: what do you want to do that for ?
exactly.
As I am suspecting the OP to have asked this for a darken reason, I'm not sure casting the CString object would be worth it...
|
|
|
|
|
|
|
USAFHokie80 wrote: You rock
Probably, but certainly not on this post...
please read my answer to him[^]
|
|
|
|
|
NO, definitely not !
GetBuffer() is not there for casting purpose !
Moreover, the OP seem not to really know what he wants that for, so instead of saying amen to a query-for-code, better understand why such a thing is asked for...
I'm more likely to think he's trying to iterate on every characters of the string, so no need for cast for this ; a simple use of the [] operator would do !
BTW, I'm almost certain that Roger Allen (which is also a great codeproject member) would not reply so nowadays... notice that he replied so, but it was in year 2000 !
at last, read this[^] and tell me if you see somewhere in Microsoft recomendations to use GetBuffer() .
modified on Friday, August 22, 2008 11:16 AM
|
|
|
|
|
I was merely posting a link to a thread that was of the same subject - I was not involved with any of those thread posts I thought it would be helpful to USAFHokie80 here..
Regards,
--Perspx
"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia
Introduction to Object-Oriented JavaScript
|
|
|
|
|
Yeah... GetBuffer doesn't work.
But this works:
char* str = (char*)(LPCTSTR)str2
|
|
|
|
|
USAFHokie80 wrote: Yeah... GetBuffer doesn't work.
hum, correction : GetBuffer DOES work, but it's not there for that.
|
|
|
|