Click here to Skip to main content
15,917,645 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Editing the labels Pin
theCPkid19-Oct-09 19:10
theCPkid19-Oct-09 19:10 
GeneralRe: Editing the labels Pin
ratprita19-Oct-09 19:11
ratprita19-Oct-09 19:11 
GeneralRe: Editing the labels Pin
theCPkid19-Oct-09 19:22
theCPkid19-Oct-09 19:22 
GeneralRe: Editing the labels Pin
ratprita19-Oct-09 19:30
ratprita19-Oct-09 19:30 
GeneralRe: Editing the labels Pin
theCPkid19-Oct-09 19:44
theCPkid19-Oct-09 19:44 
GeneralRe: Editing the labels Pin
ratprita19-Oct-09 20:17
ratprita19-Oct-09 20:17 
Questioncheck if type is defined using preprocessor? Pin
Sauce!19-Oct-09 18:37
Sauce!19-Oct-09 18:37 
AnswerRe: check if type is defined using preprocessor? Pin
Rajesh R Subramanian19-Oct-09 18:50
professionalRajesh R Subramanian19-Oct-09 18:50 
GeneralRe: check if type is defined using preprocessor? Pin
Sauce!19-Oct-09 19:00
Sauce!19-Oct-09 19:00 
QuestionNeed help for CStdioFile or CFile Pin
Nicholas Amh19-Oct-09 16:29
Nicholas Amh19-Oct-09 16:29 
AnswerRe: Need help for CStdioFile or CFile Pin
«_Superman_»19-Oct-09 16:39
professional«_Superman_»19-Oct-09 16:39 
GeneralRe: Need help for CStdioFile or CFile Pin
Nicholas Amh19-Oct-09 17:10
Nicholas Amh19-Oct-09 17:10 
GeneralRe: Need help for CStdioFile or CFile Pin
Iain Clarke, Warrior Programmer19-Oct-09 23:08
Iain Clarke, Warrior Programmer19-Oct-09 23:08 
GeneralRe: Need help for CStdioFile or CFile Pin
Nicholas Amh19-Oct-09 23:39
Nicholas Amh19-Oct-09 23:39 
QuestionDarken Windows Desktop and draw normal brightness moveable rectangle [modified] Pin
Neville Franks19-Oct-09 13:06
Neville Franks19-Oct-09 13:06 
AnswerRe: Darken Windows Desktop and draw normal brightness moveable rectangle [modified] Pin
Adam Roderick J19-Oct-09 17:50
Adam Roderick J19-Oct-09 17:50 
GeneralRe: Darken Windows Desktop and draw normal brightness moveable rectangle Pin
Neville Franks19-Oct-09 23:48
Neville Franks19-Oct-09 23:48 
AnswerRe: Darken Windows Desktop and draw normal brightness moveable rectangle Pin
Naveen19-Oct-09 18:20
Naveen19-Oct-09 18:20 
GeneralRe: Darken Windows Desktop and draw normal brightness moveable rectangle Pin
Neville Franks19-Oct-09 23:50
Neville Franks19-Oct-09 23:50 
AnswerRe: Darken Windows Desktop and draw normal brightness moveable rectangle Pin
Iain Clarke, Warrior Programmer19-Oct-09 23:05
Iain Clarke, Warrior Programmer19-Oct-09 23:05 
As the other replies said, the trick is to take a snapshot of the desktop, then put a window on top using that image.

To make the area outside your selection be a bit darker, rather than black, I used GDI+:

In the following, I've already attached a Graphics object to a HDC, pts is an array of PointF's, and nPoints is the size of that array.
You could just make a rectangular exclude-from-shading area too, of course.

CRect rcClient;
GetClientRect (&rcClient);

Color clrBrush (128,0,0,0);
SolidBrush brush (clrBrush);

GraphicsPath path;
path.AddPolygon (pts, nPoints);

Region region (Rect (rcClient.left, rcClient.top, rcClient.Width (), rcClient.Height ()));
region.Exclude (&path);

gfx.FillRegion (&brush, ®ion);


This does the effect over the whole of a window - your window will probably be larger than mine, but the point remains.

I hope that helps,

Iain.

I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[^]

GeneralRe: Darken Windows Desktop and draw normal brightness moveable rectangle Pin
Neville Franks19-Oct-09 23:51
Neville Franks19-Oct-09 23:51 
QuestionSetWindowsHookEx to modify GetSaveFileName Pin
Patcher3219-Oct-09 9:49
Patcher3219-Oct-09 9:49 
AnswerRe: SetWindowsHookEx to modify GetSaveFileName Pin
Richard MacCutchan19-Oct-09 12:00
mveRichard MacCutchan19-Oct-09 12:00 
Questionerror C2955: use of class template requires template argument list in C++/MFC [modified] Pin
mfc doubt19-Oct-09 8:58
mfc doubt19-Oct-09 8:58 
AnswerRe: error C2955: use of class template requires template argument list in C++/MFC Pin
CPallini19-Oct-09 11:12
mveCPallini19-Oct-09 11:12 

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.