Click here to Skip to main content
16,005,491 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generaladd headers --->>>(request) webBrowser control Pin
Moschous Manos3-May-04 4:10
Moschous Manos3-May-04 4:10 
GeneralRe: add headers --->>>(request) webBrowser control Pin
Moschous Manos3-May-04 23:28
Moschous Manos3-May-04 23:28 
QuestionHow do I set up a CRITICAL_SECTION object? Pin
jerry1211a3-May-04 2:40
jerry1211a3-May-04 2:40 
AnswerRe: How do I set up a CRITICAL_SECTION object? Pin
Alexander M.,3-May-04 2:43
Alexander M.,3-May-04 2:43 
AnswerRe: How do I set up a CRITICAL_SECTION object? Pin
Monty23-May-04 3:26
Monty23-May-04 3:26 
AnswerRe: How do I set up a CRITICAL_SECTION object? Pin
Paul Ranson3-May-04 12:57
Paul Ranson3-May-04 12:57 
Generalshrink parent window to fit child window Pin
Maxime Labelle3-May-04 2:10
Maxime Labelle3-May-04 2:10 
GeneralRe: shrink parent window to fit child window Pin
mangellj3-May-04 4:55
mangellj3-May-04 4:55 
Try handling the WM_SIZING message of the parent. The LPARAM is a pointer to a RECT structure that you fill to represent the size of the window.

Inside the handler, once you determine the proper client size, try using the AdjustWindowRect API to set the RECT structure. I've never used the API myself so I'm not sure of the intricacies, I just came across it recently in MSDN.

From MSDN: "The AdjustWindowRect function calculates the required size of the window rectangle, based on the desired client-rectangle size."

It takes the window style and a menu-present flag as input. You may have to do some additional calculations if your window has toolbars.

Hope this helps. Sorry I'm not more familiar with the API, as I said, I just came across it last week, but it seems like a useful one in your case.
GeneralRe: shrink parent window to fit child window Pin
Maxime Labelle3-May-04 5:51
Maxime Labelle3-May-04 5:51 
GeneralRe: shrink parent window to fit child window Pin
mangellj3-May-04 6:28
mangellj3-May-04 6:28 
GeneralRe: shrink parent window to fit child window Pin
David Crow3-May-04 7:36
David Crow3-May-04 7:36 
GeneralRe: shrink parent window to fit child window Pin
Blake Miller3-May-04 10:29
Blake Miller3-May-04 10:29 
GeneralDetecting ICS Pin
Anorexic Tribble3-May-04 2:07
Anorexic Tribble3-May-04 2:07 
GeneralRe: Detecting ICS Pin
Alexander M.,3-May-04 2:19
Alexander M.,3-May-04 2:19 
GeneralRe: Detecting ICS Pin
jcsston3-May-04 8:06
jcsston3-May-04 8:06 
QuestionHow to Use CRITICAL_SECTION and InitializeCriticalSection(&CriticalSection); Pin
jerry1211a3-May-04 2:02
jerry1211a3-May-04 2:02 
AnswerRe: How to Use CRITICAL_SECTION and InitializeCriticalSection(&CriticalSection); Pin
Alexander M.,3-May-04 2:07
Alexander M.,3-May-04 2:07 
GeneralApplication Error Pin
lvidot3-May-04 1:55
lvidot3-May-04 1:55 
GeneralRe: Application Error Pin
Alexander M.,3-May-04 2:02
Alexander M.,3-May-04 2:02 
GeneralRe: Application Error Pin
lvidot3-May-04 7:32
lvidot3-May-04 7:32 
GeneralRe: Application Error Pin
jmkhael3-May-04 3:02
jmkhael3-May-04 3:02 
GeneralRe: Application Error Pin
Joe Woodbury3-May-04 4:53
professionalJoe Woodbury3-May-04 4:53 
GeneralRe: Application Error Pin
lvidot3-May-04 21:33
lvidot3-May-04 21:33 
GeneralRe: Application Error Pin
Joe Woodbury4-May-04 4:16
professionalJoe Woodbury4-May-04 4:16 
GeneralEditBox event notification behavior with single line & multiline option. Pin
Anonymous3-May-04 1:45
Anonymous3-May-04 1:45 

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.