Advertisement

DIBSection

Started by September 23, 2000 06:12 AM
1 comment, last by LaBasX2 24 years, 2 months ago
Hi! I''m using the function CreateDIBSection to create a fast bitmap buffer. This function gives me a void-pointer to the memory where the bitmap is located. But how can I access this memory? It''s a void pointer and I need a BYTE-pointer or something like this. Can the void pointer be converted to a BYTE-pointer so that I can change the pixels of the bitmap? Can anyone please help me, it''s quite important for me to know that. Thank you very much in advance. cu LaBasX2
Hi there !
Perhaps try it like that :

void *p1; char *p2;
.
.
.
p2=(char*)p1;

-Pestilence
- just to have something in here
Advertisement
Hmm... from what I remember, you can re-cast the void pointer as a BYTE pointer or whatever... or you can use it along with memcpy to copy parts of the bitmap into an array (slow), or even have an array pointing to the buffer memory by assigning it to the void pointer (haven''t practiced C in a while, must be something like *array[]=pointer).

Sorry if these are short and vague answers, but that was in order to give you a quick reply so you know what to look for

Hope this helps,
Lamtd.
---All you base are belong to us !

This topic is closed to new replies.

Advertisement