Click here to Skip to main content
15,885,985 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Considerations and implementation of a method to copy the vector::iterator Pin
Cyrilix23-Jun-09 10:25
Cyrilix23-Jun-09 10:25 
GeneralRe: Considerations and implementation of a method to copy the vector::iterator Pin
Stuart Dootson23-Jun-09 10:33
professionalStuart Dootson23-Jun-09 10:33 
GeneralRe: Considerations and implementation of a method to copy the vector::iterator [modified] Pin
Michael Dunn23-Jun-09 14:41
sitebuilderMichael Dunn23-Jun-09 14:41 
GeneralRe: Considerations and implementation of a method to copy the vector::iterator Pin
Cyrilix23-Jun-09 15:03
Cyrilix23-Jun-09 15:03 
Questiontransfer date time string to SYSTEMTIME Pin
includeh1023-Jun-09 6:44
includeh1023-Jun-09 6:44 
AnswerRe: transfer date time string to SYSTEMTIME Pin
Jijo.Raj23-Jun-09 7:02
Jijo.Raj23-Jun-09 7:02 
AnswerRe: transfer date time string to SYSTEMTIME Pin
Stuart Dootson23-Jun-09 7:12
professionalStuart Dootson23-Jun-09 7:12 
Question[SOLVED] Need help with WinAPI AlphaBlend() [modified] Pin
Rozis23-Jun-09 6:06
Rozis23-Jun-09 6:06 
I need help with the GDI-function Alphablend() on Vista. Here's my code:

hMemDC:=CreateCompatibleDC(hdc)
hbitmap:=CreatecompatibleBitmap(hdc,width,height)
...
blendfunc.BlendOp=0
blendfunc.BlendFlags=0
blendfunc.SourceConstantAlpha=128
blendfunc.AlphaFormat=0
AlphaBlend(hdc,siPX,siPY,width,Height,hMemDC,0,0,Width,Height,@blendfunc))
//StretchBlt(hdc,siPX,siPY,Width,Height,hMemDC,0,0,Width,Height,SRCCOPY)
//BitBlt(hdc,siPX,siPY,Width,Height,hMemDC,0,0,SRCCOPY)

When i use StretchBlt() or Bitblt() it works OK, so coordinates are ok. My language is not C so @blendfunc seams wrong but im sure it is not (it means 'pointer to a structure'). I suspect AlphaBlend does not work (returns false) because my bitmap has no alpha-channel. Saw on the MS-website an example that uses CreateDibSection() to create a 32-bit bitmap but that doesn't work also.
It goes like this:

hMemDC:=CreateCompatibleDC(hdc)
memclear(@bmi,_sizeof(_winBITMAPINFO))
bmi.bmiHeader.biSize:=_sizeof(_winBITMAPINFOHEADER)
bmi.bmiHeader.biWidth:=width
bmi.bmiHeader.biHeight:=height
bmi.bmiHeader.biPlanes:=1
bmi.bmiHeader.biBitCount:=32
bmi.bmiHeader.biCompression:=BI_RGB
bmi.bmiHeader.biSizeImage:=oDim:width*oDim:height*4
hbitmap:=CreateDIBSection(hMemDC,@bmi,DIB_RGB_COLORS,pBits,NULL,0)
SelectObject(hMemDC,hbitmap)

So im out of options... Has anyone an idea, or a codesnippet that does work, so i can try that one?

Thanks,

Rozis

modified on Sunday, June 28, 2009 5:04 AM

Questionbase or super-like functionality in C++? Pin
Michael P. Scherer23-Jun-09 5:35
Michael P. Scherer23-Jun-09 5:35 
AnswerRe: base or super-like functionality in C++? Pin
Fernando A. Gomez F.23-Jun-09 6:04
Fernando A. Gomez F.23-Jun-09 6:04 
GeneralRe: base or super-like functionality in C++? Pin
Michael P. Scherer23-Jun-09 6:09
Michael P. Scherer23-Jun-09 6:09 
AnswerRe: base or super-like functionality in C++? Pin
Nemanja Trifunovic23-Jun-09 6:17
Nemanja Trifunovic23-Jun-09 6:17 
AnswerRe: base or super-like functionality in C++? Pin
Stuart Dootson23-Jun-09 6:54
professionalStuart Dootson23-Jun-09 6:54 
Questionhow to save image from webBrowser Control Pin
voo doo1223-Jun-09 5:32
voo doo1223-Jun-09 5:32 
QuestionSetFont at Runtime Pin
p_196023-Jun-09 5:15
p_196023-Jun-09 5:15 
Questionhow to replace " with \" Pin
Ash_VCPP23-Jun-09 4:31
Ash_VCPP23-Jun-09 4:31 
AnswerRe: how to replace " with \" Pin
led mike23-Jun-09 4:37
led mike23-Jun-09 4:37 
AnswerRe: how to replace " with \" Pin
«_Superman_»23-Jun-09 4:54
professional«_Superman_»23-Jun-09 4:54 
QuestionMemory Leak Help Pin
OrangeV23-Jun-09 3:50
OrangeV23-Jun-09 3:50 
AnswerRe: Memory Leak Help Pin
«_Superman_»23-Jun-09 4:02
professional«_Superman_»23-Jun-09 4:02 
AnswerRe: Memory Leak Help Pin
Stuart Dootson23-Jun-09 4:20
professionalStuart Dootson23-Jun-09 4:20 
AnswerRe: Memory Leak Help Pin
Maximilien23-Jun-09 4:31
Maximilien23-Jun-09 4:31 
GeneralRe: Memory Leak Help Pin
OrangeV23-Jun-09 4:44
OrangeV23-Jun-09 4:44 
GeneralRe: Memory Leak Help Pin
Stuart Dootson23-Jun-09 5:31
professionalStuart Dootson23-Jun-09 5:31 
AnswerRe: Memory Leak Help Pin
Pavan_Putra25-Jun-09 20:00
Pavan_Putra25-Jun-09 20:00 

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.