Click here to Skip to main content
15,891,033 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionreading writing to a file system Pin
hrishiS16-Dec-09 17:44
hrishiS16-Dec-09 17:44 
AnswerRe: reading writing to a file system Pin
Adam Roderick J16-Dec-09 17:56
Adam Roderick J16-Dec-09 17:56 
GeneralRe: reading writing to a file system [modified] Pin
hrishiS16-Dec-09 18:23
hrishiS16-Dec-09 18:23 
GeneralRe: reading writing to a file system Pin
Adam Roderick J16-Dec-09 21:51
Adam Roderick J16-Dec-09 21:51 
AnswerRe: reading writing to a file system Pin
Rajesh R Subramanian16-Dec-09 17:59
professionalRajesh R Subramanian16-Dec-09 17:59 
GeneralRe: reading writing to a file system Pin
hrishiS16-Dec-09 18:18
hrishiS16-Dec-09 18:18 
AnswerRe: reading writing to a file system Pin
CPallini16-Dec-09 22:03
mveCPallini16-Dec-09 22:03 
QuestionUse theme elements with alpha Pin
Ivo Beltchev16-Dec-09 13:39
Ivo Beltchev16-Dec-09 13:39 
Hi
I am trying to use the theme images for the start menu in Vista. It has areas that are fully transparent (around the corners), areas that are fully opaque (for the menu items) and translucent areas for the black frame.

I tried DrawThemeBackground but the translucent areas show opaque. So basically I get either alpha 0 or alpha 255. Nothing inbetween. I looked up the image in the msstyles file (it is image #717) and it has the correct opacity values. Here's my code:
BITMAPINFO dib = {sizeof(dib)};
dib.bmiHeader.biWidth = rc.right;
dib.bmiHeader.biHeight = rc.bottom;
dib.bmiHeader.biPlanes = 1;
dib.bmiHeader.biBitCount = 32;
dib.bmiHeader.biCompression = BI_RGB;
unsigned int *bits;
HBITMAP bmp=CreateDIBSection(hdc,&dib,DIB_RGB_COLORS,(void**)&bits,NULL,0);
SelectObject(hdc,bmp);
SetDCBrushColor(hdc,0x0);
FillRect(hdc2,&rc,(HBRUSH)GetStockObject(DC_BRUSH));
DrawThemeBackground(theme,hdc,SPP_PLACESLIST,0,&rc,&rc);

I then check the alpha values in the bits array and besides couple of pixels with alpha=0 all the rest are 255.

Any ideas how to get the true opacity?
AnswerRe: Use theme elements with alpha Pin
Adam Roderick J16-Dec-09 17:05
Adam Roderick J16-Dec-09 17:05 
GeneralRe: Use theme elements with alpha Pin
Ivo Beltchev16-Dec-09 17:31
Ivo Beltchev16-Dec-09 17:31 
GeneralRe: Use theme elements with alpha Pin
Rozis17-Dec-09 9:56
Rozis17-Dec-09 9:56 
AnswerRe: Use theme elements with alpha Pin
Code-o-mat16-Dec-09 20:25
Code-o-mat16-Dec-09 20:25 
GeneralRe: Use theme elements with alpha Pin
Ivo Beltchev16-Dec-09 20:42
Ivo Beltchev16-Dec-09 20:42 
GeneralRe: Use theme elements with alpha Pin
Code-o-mat16-Dec-09 20:59
Code-o-mat16-Dec-09 20:59 
Questioncan I run notepad.exe inside View window? Pin
rambojanggoon16-Dec-09 9:20
rambojanggoon16-Dec-09 9:20 
AnswerRe: can I run notepad.exe inside View window? Pin
Nemanja Trifunovic16-Dec-09 9:40
Nemanja Trifunovic16-Dec-09 9:40 
Questionminimize notification of MFC application Pin
kasi1416-Dec-09 7:45
kasi1416-Dec-09 7:45 
AnswerRe: minimize notification of MFC application Pin
Abhi Lahare16-Dec-09 9:52
Abhi Lahare16-Dec-09 9:52 
QuestionHow to get a thread's exit code Pin
masnu16-Dec-09 5:24
masnu16-Dec-09 5:24 
AnswerRe: How to get a thread's exit code Pin
«_Superman_»16-Dec-09 5:38
professional«_Superman_»16-Dec-09 5:38 
AnswerRe: How to get a thread's exit code Pin
Rajesh R Subramanian16-Dec-09 7:56
professionalRajesh R Subramanian16-Dec-09 7:56 
GeneralRe: How to get a thread's exit code Pin
masnu16-Dec-09 8:07
masnu16-Dec-09 8:07 
AnswerRe: How to get a thread's exit code Pin
Rajesh R Subramanian16-Dec-09 8:25
professionalRajesh R Subramanian16-Dec-09 8:25 
AnswerRe: How to get a thread's exit code Pin
Rajesh R Subramanian16-Dec-09 8:30
professionalRajesh R Subramanian16-Dec-09 8:30 
GeneralRe: How to get a thread's exit code Pin
masnu16-Dec-09 8:33
masnu16-Dec-09 8:33 

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.