|
Hi
How can I access the bitmap pixel data DIRECTLY?
I dont want to use the GetBitmapBits and SetBitmapBits functions because they copy memory to another location.
I want to determine where the pixel data of a CBitmap Object are, and having a pointer on them and change them directly without having to "copy from" and "copy to" every time.
Thanx All
|
|
|
|
|
Mohammad A Gdeisat wrote:
How can I access the bitmap pixel data DIRECTLY?
you might try using a DIBSection, which can act like an HBITMAP, but is actually a normal DIB - you can access the pixels by normal pointer arithmetic, etc.
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
|
By knowing the BMP file format, you can get access to any part of it.
http://www.wotsit.org/
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Hey can anybody tell me how to get 'RecycleBin's' path thru API or anyway but programatically ????
do let me know.
Regards,
Supriya Tonape
|
|
|
|
|
CString sRecyclepath;
SHGetSpecialFolderPath(this->GetSafeHwnd(), sRecyclePath, CSIDL_BITBUCKET, FALSE);
------- 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
|
|
|
|
|
Thank U John, Though I m not using MFC but I will try using that API.
thanks for the help
Regards
Supriya Tonape
|
|
|
|
|
If older platforms are an issue, you might want to consider using SHGetFolderPath() , which is a superset of SHGetSpecialFolderPath() .
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
OK thank U
Best Regards,
Supriya Tonape
|
|
|
|
|
Does this work? Surely you have to allocate a buffer to pass to SHGetSpecialFolderPath? Wouldn't you have to call GetBufferSetLength and ReleaseBuffer either side of the call to SHGetSpecialFolderPath?
|
|
|
|
|
Graham Bradshaw wrote:
Does this work?
Not as it is currently presented.
Graham Bradshaw wrote:
Surely you have to allocate a buffer to pass to SHGetSpecialFolderPath? Wouldn't you have to call GetBufferSetLength and ReleaseBuffer either side of the call to SHGetSpecialFolderPath?
Correct.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Relax, I was just steering him in a direction...
------- 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
|
|
|
|
|
I think it is her, not him
|
|
|
|
|
Yup, I understand that n thanks!
Supriya Tonape
|
|
|
|
|
No it doesnt work
bye
Supriya
|
|
|
|
|
Um. I don't know of an API but on my system (Windows XP SP2) the Recycle Bin is at C:\Recycled. (I think this is a real folder, not a shell folder, because I can access it through Command Prompt.) There must be a GetShellFolder API or something like that, or you could probably find it in the Registry somewheres.
|
|
|
|
|
That's right, it's not him but her
Well,I cant use that API (SHGetSpecialFolderPath) as it says 'If a virtual folder is specified, this function will fail' n RecycleBin is the virtual folder...Actaully not even folder, it's a file....I will look into it. Thanks to U all for giving the direction.
Bye
Supriya Tonape
-- modified at 2:48 Saturday 8th October, 2005
|
|
|
|
|
The following code:
int i = 0;
cout << i++ << i;
why does it output 00?
|
|
|
|
|
because i++ is the post-incrementation, which mean that the incrementation is done at the end of the expression (here cout << i++ << i; ).
by opposite,
cout << ++i << i; would have outputed 11 and
cout << i << ++i; would have outputed 01 .
is that all clear ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
|
I am sure this will catch someone out there, me included.
The end result will be machine specific, ie. undefined. I guess it is because different machine will prioritise ++ and << in different manner.
|
|
|
|
|
operators priority are not system dependant.
the priority is defined by the compiler, and specified in the standard of C++ !!!
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
...and I please the one who voted me down to explain his choice...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Laffis wrote:
why does it output 00?
Because it just happened to. "Sequence points" are those placecs at the end of statements, full expressions, before a function is invoked, and right after it returns. In between sequence points, side-effects of operators may not have taken place, and values are indeterminate. The exact point at which that increment takes place is unknown and unspecified; only the sequence-point semantics need to be satisfied. This allows compilers to either increment in-place after makng a copy or make an incremented copy which does not have to be set until the value is next needed, which by definition is after the sequence point.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Hmmmm, pretty good! mate...Beer beer...
|
|
|
|