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

C / C++ / MFC

 
GeneralCDialog to HWND Pin
act_x21-Jan-05 5:04
act_x21-Jan-05 5:04 
GeneralRe: CDialog to HWND Pin
Mircea Puiu21-Jan-05 5:07
Mircea Puiu21-Jan-05 5:07 
GeneralRe: CDialog to HWND Pin
Ravi Bhavnani21-Jan-05 5:29
professionalRavi Bhavnani21-Jan-05 5:29 
QuestionCan VC++ 6 use the library created by unix compilier like g++? Pin
tttyip21-Jan-05 4:20
tttyip21-Jan-05 4:20 
AnswerRe: Can VC++ 6 use the library created by unix compilier like g++? Pin
Ravi Bhavnani21-Jan-05 5:31
professionalRavi Bhavnani21-Jan-05 5:31 
QuestionHow to use and link Clapack in visual c++ Pin
tttyip21-Jan-05 4:18
tttyip21-Jan-05 4:18 
AnswerRe: How to use and link Clapack in visual c++ Pin
Ravi Bhavnani21-Jan-05 5:34
professionalRavi Bhavnani21-Jan-05 5:34 
GeneralSetting Background Colour of a text Pin
Pazzuzu21-Jan-05 4:14
Pazzuzu21-Jan-05 4:14 
Hi Guys,

Iam working on Vc++, & came across a problem.Hope someone could help!.

Iam Using device Context for diplaying things to the view.

Initially,I write a "text" to the view using "TextOut" method - See Code:

& Then using the "BRUSH" object to fill the rectangle with that colour,using "FillRect" method.Now the "text" which was displayed in the same postion before is not Visible anymore .

My need ,is after writing a "Text" to the view & filling the rectangle containing the text with a colour,want the underlying "text" to be visible(which is not the case now).

Ofcourse,I know that If I set the BackgroundColour atfirst & then write the "text" to the screen,then the "text" will be visible.

But I would not be able to do so co's of some restrictions in my Project...



I want the text "Shading test" to be displayed with the blue background colour.Constraint being,I can't Fill the rectangle with the colour & then draw the text.....

Would be nice if someone could suggest something to do in this regard with respect to the code below.

Thanks......


pDC->SetBkMode(TRANSPARENT);
CRect rect;
GetClientRect(rect);
rect.SetRect(0,0,800,800);
pDC->Rectangle(CRect(0,0,800,800));

SIZE size;
size.cx = 1000;
size.cy = 1000;
SetScrollSizes(MM_TEXT,size);

pDC->TextOut(50,20,"Shading Test");

CRect rect1;
rect1.SetRect(10,10,300,100);
pDC->Rectangle(CRect(10,10,300,100));
CBrush brushBlue(RGB(240,248,255));
CBrush* pOldBrush = pDC->SelectObject(&brushBlue);
pDC->FillRect(rect1,&brushBlue);
GeneralRe: Setting Background Colour of a text Pin
Antony M Kancidrowski21-Jan-05 4:51
Antony M Kancidrowski21-Jan-05 4:51 
GeneralFolder List Pin
act_x21-Jan-05 3:55
act_x21-Jan-05 3:55 
GeneralRe: Folder List Pin
Maximilien21-Jan-05 4:38
Maximilien21-Jan-05 4:38 
GeneralRe: Folder List Pin
act_x21-Jan-05 5:25
act_x21-Jan-05 5:25 
GeneralRe: Folder List Pin
wb21-Jan-05 7:06
wb21-Jan-05 7:06 
GeneralRe: Folder List Pin
Anonymous21-Jan-05 8:05
Anonymous21-Jan-05 8:05 
GeneralRe: Folder List Pin
David Crow21-Jan-05 10:02
David Crow21-Jan-05 10:02 
General[Q] Updating an control inside other control handler problem... Pin
rbid21-Jan-05 3:31
rbid21-Jan-05 3:31 
QuestionHow to create nested directories? Pin
Monisankar21-Jan-05 3:04
Monisankar21-Jan-05 3:04 
AnswerRe: How to create nested directories? Pin
Chris Losinger21-Jan-05 3:23
professionalChris Losinger21-Jan-05 3:23 
GeneralCapturing Screen shots from a Dll Pin
mcsherry21-Jan-05 2:34
mcsherry21-Jan-05 2:34 
GeneralRe: Capturing Screen shots from a Dll Pin
mcsherry21-Jan-05 4:11
mcsherry21-Jan-05 4:11 
GeneralRe: Capturing Screen shots from a Dll Pin
Antony M Kancidrowski21-Jan-05 4:43
Antony M Kancidrowski21-Jan-05 4:43 
QuestionProtect against Spy-Software? Pin
FreewareFire21-Jan-05 2:13
FreewareFire21-Jan-05 2:13 
AnswerRe: Protect against Spy-Software? Pin
Antony M Kancidrowski21-Jan-05 4:33
Antony M Kancidrowski21-Jan-05 4:33 
GeneralRe: Protect against Spy-Software? Pin
FreewareFire21-Jan-05 5:56
FreewareFire21-Jan-05 5:56 
GeneralList all registry values in a key Pin
jonavon blakly21-Jan-05 1:55
jonavon blakly21-Jan-05 1:55 

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.