Click here to Skip to main content
15,913,773 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Write kernel OS Pin
Michael Schubert26-Jun-09 23:52
Michael Schubert26-Jun-09 23:52 
GeneralRe: Write kernel OS Pin
sashoalm27-Jun-09 1:37
sashoalm27-Jun-09 1:37 
QuestionContext sensitive help in MFC app Pin
Sternocera26-Jun-09 10:39
Sternocera26-Jun-09 10:39 
Question[SOLVED] Help needed with Alphablend function [modified] Pin
Rozis26-Jun-09 10:01
Rozis26-Jun-09 10:01 
AnswerRe: Help needed with Alphablend function Pin
PJ Arends26-Jun-09 11:05
professionalPJ Arends26-Jun-09 11:05 
GeneralRe: Help needed with Alphablend function Pin
Rozis27-Jun-09 1:22
Rozis27-Jun-09 1:22 
GeneralRe: Help needed with Alphablend function Pin
PJ Arends27-Jun-09 6:08
professionalPJ Arends27-Jun-09 6:08 
GeneralRe: Help needed with Alphablend function Pin
Rozis27-Jun-09 8:25
Rozis27-Jun-09 8:25 
hmmm... im out of questions but it still doesn't run. This my code: (warning: this is not C-code, but i'll explain when needed)

hMemDC:=CreateCompatibleDC(hdc) // ':=' is used as '=' in C
if hMemDC!=NULL_PTR
  hbitmap:=CreatecompatibleBitmap(hdc,w,h)
  hold:=SelectObject(hMemDC,hBitmap)
  Rectangle(hmemDC,0,0,w,h)
  blendfunc.BlendOp:=0       // blendfunc is a structure BlendOp a member of this structure
  blendfunc.BlendFlags:=0
  blendfunc.SourceConstantAlpha:=128 //half transparent
  blendfunc.AlphaFormat:=0
  AlphaBlend(hdc,x,y,w,h,hMemDC,0,0,w,h,@blendfunc) // Here's the troublemaker
//StretchBlt(hdc,x,x,w,h,hMemDC,0,0,w,h,SRCCOPY)
//BitBlt(hdc,x,x,w,h,hMemDC,0,0,SRCCOPY)
  SelectObject(hMemDC,hold)
  DeleteObject(hBitmap)
  DeleteDC(hMemDC)
endif


When i use StretchBlt() or BitBlt() instead it works (altough not transparent). I checked if x,y,w and h are possitive - they are. Think you may ask whats '@blendfunc'. It means 'pointer to structure'. Use this construct for years so must be correct (for example in GetClientRect()). Tried a demo-exe from the code project to find out if problem is system related - it worked ok. Checked the prototype and the structure. I must do something really stupid...

Rozis
GeneralRe: Help needed with Alphablend function Pin
PJ Arends27-Jun-09 12:14
professionalPJ Arends27-Jun-09 12:14 
AnswerRe: Help needed with Alphablend function Pin
Rozis27-Jun-09 23:00
Rozis27-Jun-09 23:00 
GeneralRe: Help needed with Alphablend function Pin
PJ Arends28-Jun-09 19:48
professionalPJ Arends28-Jun-09 19:48 
QuestionSetting font.. [modified] Pin
kumar sanghvi26-Jun-09 9:53
kumar sanghvi26-Jun-09 9:53 
AnswerRe: Setting font.. Pin
CPallini26-Jun-09 10:06
mveCPallini26-Jun-09 10:06 
GeneralRe: Setting font.. Pin
kumar sanghvi26-Jun-09 10:10
kumar sanghvi26-Jun-09 10:10 
GeneralRe: Setting font.. Pin
CPallini26-Jun-09 10:25
mveCPallini26-Jun-09 10:25 
GeneralRe: Setting font.. Pin
kumar sanghvi26-Jun-09 17:55
kumar sanghvi26-Jun-09 17:55 
GeneralRe: Setting font.. Pin
kumar sanghvi27-Jun-09 2:26
kumar sanghvi27-Jun-09 2:26 
QuestionUsing CoCreateInstance from C to use class in VB DLL [modified] Pin
BeerFizz26-Jun-09 8:08
BeerFizz26-Jun-09 8:08 
QuestionRe: Using CoCreateInstance from C to use class in VB DLL Pin
CPallini26-Jun-09 8:58
mveCPallini26-Jun-09 8:58 
AnswerRe: Using CoCreateInstance from C to use class in VB DLL Pin
BeerFizz26-Jun-09 9:30
BeerFizz26-Jun-09 9:30 
GeneralRe: Using CoCreateInstance from C to use class in VB DLL Pin
CPallini26-Jun-09 9:38
mveCPallini26-Jun-09 9:38 
General[Message Deleted] Pin
BeerFizz26-Jun-09 10:00
BeerFizz26-Jun-09 10:00 
GeneralRe: Using CoCreateInstance from C to use class in VB DLL Pin
BeerFizz26-Jun-09 10:06
BeerFizz26-Jun-09 10:06 
QuestionRe: Using CoCreateInstance from C to use class in VB DLL Pin
CPallini26-Jun-09 10:17
mveCPallini26-Jun-09 10:17 
AnswerRe: Using CoCreateInstance from C to use class in VB DLL Pin
BeerFizz26-Jun-09 10:41
BeerFizz26-Jun-09 10:41 

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.