Click here to Skip to main content
15,891,184 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: how to use char* in ATL Pin
yingkou19-Nov-04 1:56
yingkou19-Nov-04 1:56 
GeneralRe: how to use char* in ATL Pin
geo_m19-Nov-04 2:52
geo_m19-Nov-04 2:52 
GeneralMemory leaks with BSTR Pin
prasad_som18-Nov-04 22:03
prasad_som18-Nov-04 22:03 
GeneralRe: Memory leaks with BSTR Pin
22491718-Nov-04 22:57
22491718-Nov-04 22:57 
GeneralRe: Memory leaks with BSTR Pin
prasad_som18-Nov-04 23:35
prasad_som18-Nov-04 23:35 
GeneralRe: Memory leaks with BSTR Pin
Steve S19-Nov-04 0:20
Steve S19-Nov-04 0:20 
QuestionHow can I create a colour btimap ? Pin
Darked developer18-Nov-04 19:59
Darked developer18-Nov-04 19:59 
AnswerRe: How can I create a colour btimap ? Pin
Rory Solley18-Nov-04 23:34
Rory Solley18-Nov-04 23:34 
You might want to look at CreateDIBSection. This is similar to what you already have (it will return a HBITMAP handle and a pointer to the bits). You can directly modify the bits via that pointer and use the handle for selecting the object into DCs.
If you simply want to create a 24-bit colour image, you don't need to create palette information in the BITMAPINFOHEADER (set those values to 0). Then simply write an RGB TRIPLE (Blue, Green, Red) for each pixel using the pointer. Remember you will need to pad each scanline to the DWORD boundary. If you want to write a 256-colour (paletted) image, you will need to provide a colour table. Check out MSDN documentation for that information.

Another gotcha is that if you want the bitmap to be "top-down" i.e. pixel (0,0) is in the top-left corner, you must specify a NEGATIVE height value in the BITMAPINFOHEADER structure.

Hope that helps
GeneralRe: How can I create a colour btimap ? Pin
Darked developer19-Nov-04 2:41
Darked developer19-Nov-04 2:41 
GeneralCall to one Method of a COM component returns 0x80020008. But works on other machine Pin
User 21559718-Nov-04 18:39
User 21559718-Nov-04 18:39 
GeneralRe: Call to one Method of a COM component returns 0x80020008. But works on other machine Pin
geo_m19-Nov-04 2:58
geo_m19-Nov-04 2:58 
GeneralRe: Call to one Method of a COM component returns 0x80020008. But works on other machine Pin
User 21559719-Nov-04 3:28
User 21559719-Nov-04 3:28 
GeneralRe: Call to one Method of a COM component returns 0x80020008. But works on other machine Pin
geo_m19-Nov-04 3:48
geo_m19-Nov-04 3:48 
GeneralRe: Call to one Method of a COM component returns 0x80020008. But works on other machine Pin
User 21559721-Nov-04 17:13
User 21559721-Nov-04 17:13 
GeneralMoment of file Close Pin
moyeenm18-Nov-04 4:26
moyeenm18-Nov-04 4:26 
GeneralRe: Moment of file Close Pin
geo_m19-Nov-04 3:10
geo_m19-Nov-04 3:10 
QuestionVectors safe??? Pin
Anonymous17-Nov-04 0:44
Anonymous17-Nov-04 0:44 
AnswerRe: Vectors safe??? Pin
markkuk17-Nov-04 1:16
markkuk17-Nov-04 1:16 
GeneralRe: Vectors safe??? Pin
Jörgen Sigvardsson17-Nov-04 11:31
Jörgen Sigvardsson17-Nov-04 11:31 
GeneralUrgent!!!How to pass an array in Event in ATl/COM Pin
Akshay Dave16-Nov-04 22:52
Akshay Dave16-Nov-04 22:52 
GeneralRe: Urgent!!!How to pass an array in Event in ATl/COM Pin
El'Cachubrey16-Nov-04 23:30
El'Cachubrey16-Nov-04 23:30 
GeneralRe: Urgent!!!How to pass an array in Event in ATl/COM Pin
ThatsAlok17-Nov-04 17:19
ThatsAlok17-Nov-04 17:19 
GeneralRe: Urgent!!!How to pass an array in Event in ATl/COM Pin
Akshay Dave18-Nov-04 17:30
Akshay Dave18-Nov-04 17:30 
GeneralRe: Urgent!!!How to pass an array in Event in ATl/COM Pin
Akshay Dave19-Nov-04 0:15
Akshay Dave19-Nov-04 0:15 
GeneralRe: Urgent!!!How to pass an array in Event in ATl/COM Pin
ThatsAlok21-Nov-04 20:06
ThatsAlok21-Nov-04 20:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.