Click here to Skip to main content
15,921,179 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionWindows langages Pin
Raphael Kindt23-Jan-06 3:49
Raphael Kindt23-Jan-06 3:49 
AnswerRe: Windows langages Pin
toxcct23-Jan-06 4:07
toxcct23-Jan-06 4:07 
GeneralRe: Windows langages Pin
Cedric Moonen23-Jan-06 4:22
Cedric Moonen23-Jan-06 4:22 
GeneralRe: Windows langages Pin
toxcct23-Jan-06 4:25
toxcct23-Jan-06 4:25 
GeneralRe: Windows langages Pin
Owner drawn23-Jan-06 17:20
Owner drawn23-Jan-06 17:20 
QuestionPermissions Pin
kelprinc23-Jan-06 3:42
kelprinc23-Jan-06 3:42 
QuestionICopyHook Pin
ragavan23-Jan-06 2:59
ragavan23-Jan-06 2:59 
QuestionRe: ICopyHook Pin
David Crow23-Jan-06 3:28
David Crow23-Jan-06 3:28 
AnswerRe: ICopyHook Pin
ragavan23-Jan-06 3:58
ragavan23-Jan-06 3:58 
QuestionRe: ICopyHook Pin
David Crow23-Jan-06 4:04
David Crow23-Jan-06 4:04 
AnswerRe: ICopyHook Pin
Michael Dunn23-Jan-06 7:37
sitebuilderMichael Dunn23-Jan-06 7:37 
QuestionCould AfxBeginThread not run in a dll? Pin
rushing23-Jan-06 2:37
rushing23-Jan-06 2:37 
AnswerRe: Could AfxBeginThread not run in a dll? Pin
Rage23-Jan-06 2:45
professionalRage23-Jan-06 2:45 
GeneralRe: Could AfxBeginThread not run in a dll? Pin
rushing23-Jan-06 3:18
rushing23-Jan-06 3:18 
GeneralRe: Could AfxBeginThread not run in a dll? Pin
rushing23-Jan-06 3:21
rushing23-Jan-06 3:21 
GeneralRe: Could AfxBeginThread not run in a dll? Pin
Rage23-Jan-06 3:37
professionalRage23-Jan-06 3:37 
GeneralRe: Could AfxBeginThread not run in a dll? Pin
rushing23-Jan-06 3:44
rushing23-Jan-06 3:44 
GeneralRe: Could AfxBeginThread not run in a dll? Pin
Rage23-Jan-06 4:54
professionalRage23-Jan-06 4:54 
GeneralRe: Could AfxBeginThread not run in a dll? Pin
Rage23-Jan-06 3:39
professionalRage23-Jan-06 3:39 
GeneralRe: Could AfxBeginThread not run in a dll? Pin
rushing23-Jan-06 3:50
rushing23-Jan-06 3:50 
GeneralRe: Could AfxBeginThread not run in a dll? Pin
Rage23-Jan-06 4:55
professionalRage23-Jan-06 4:55 
GeneralRe: Could AfxBeginThread not run in a dll? Pin
rushing24-Jan-06 23:37
rushing24-Jan-06 23:37 
QuestionHow to draw next to a menu Pin
Shraddhan23-Jan-06 2:18
Shraddhan23-Jan-06 2:18 
AnswerRe: How to draw next to a menu Pin
Rage23-Jan-06 2:41
professionalRage23-Jan-06 2:41 
GeneralRe: How to draw next to a menu Pin
Shraddhan23-Jan-06 16:16
Shraddhan23-Jan-06 16:16 
Rage wrote:
Is this a Dialog or a SDI/MDI child window ?


Actually it is a CWnd which is behaving like a CDialog. (It used to be a CDialog, and for some unpsecified "good reasons" I noted in my comments long ago, it was converted to a CWnd.)

As for the actual drawing coordinates, I used the following code in OnNcPaint:
CPaintDC dc(this); // device context for painting
dc.Rectangle(100, 1, 700, 3);
dc.Rectangle(100, 5, 700, 7);
dc.Rectangle(100, 10, 700, 12);
dc.Rectangle(100, 15, 700, 17);
RECT rect = {50, 0, 700, 20};
dc.DrawText("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", 45, &rect, 0);
CWnd::OnNcPaint();

Commenting out the final line gave me a transparent header, though the menus still showed. The window varies from about 300 to 550 pixels wide.

The string of XXXXXXXXXX seemed to be drawn and rapidly covered over.

I thought that OnEraseBackground only handled the client area? Anyway, I tried it out, still did not paint to the right of the menu area.

Shraddhan

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.