Click here to Skip to main content
15,886,518 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionAdding controls to an existing window Pin
depsch18-Apr-10 14:17
depsch18-Apr-10 14:17 
AnswerRe: Adding controls to an existing window Pin
Gwenio18-Apr-10 15:29
Gwenio18-Apr-10 15:29 
GeneralRe: Adding controls to an existing window Pin
depsch18-Apr-10 20:18
depsch18-Apr-10 20:18 
AnswerRe: Adding controls to an existing window Pin
Stephen Hewitt18-Apr-10 18:31
Stephen Hewitt18-Apr-10 18:31 
QuestionWindows multimedia or DirectSound - opinions wanted Pin
Vaclav_18-Apr-10 14:16
Vaclav_18-Apr-10 14:16 
AnswerRe: Windows multimedia or DirectSound - opinions wanted Pin
CPallini18-Apr-10 21:17
mveCPallini18-Apr-10 21:17 
AnswerRe: Windows multimedia or DirectSound - opinions wanted Pin
Code-o-mat18-Apr-10 21:37
Code-o-mat18-Apr-10 21:37 
QuestionCurious [Solved] Pin
Gwenio18-Apr-10 10:54
Gwenio18-Apr-10 10:54 
While messing around with Windows programming I found something odd.

When I have a window at (0,0), and the width is 1680, the height is 1050, and GetSystem metrics says that is the height and width of the screen; however the window does not fill up the entire screen. (e.g. there are exactly three pixels it does not cover on the right)

Any thoughts was to what might be happening?

---------------------

Okay, two things to add:

- Since I had altered the message processing so that it would be as if the non-client area did not exist, I was using GetClientRect to find the values for position and size. It sets left and top to zero, so the position could have been wrong. D'Oh! | :doh:

- I had shifted the window up and to the left to place the 0,0 of the client area at 0,0 on the screen. Further testing shows that the calculations I had preformed were correct for a window with no style so this should not have been a problem.

Therefore it would seem I have somehow managed to prevent the non-client area from being created, as all non-child windows normally have a border of some type and a caption even if those things are not specified in the style. Will confirm this later with a few more tests.

---------------------

Apperently there is no non-client area if you eat the WM_NCCALCSIZE message, so my adjustments to the windows position to account for the non-client area was unneeded. This fact is not in the documentation of the message Cry | :(( . Would have saved a lot of trouble. So, my code was correct per the documentation of the Windows API, but it was something they forgot to mention that was the root of the problem (as I had expected, though I was looking in the wrong place).
AnswerRe: Curious Pin
Stephen Hewitt18-Apr-10 18:28
Stephen Hewitt18-Apr-10 18:28 
GeneralRe: Curious Pin
Gwenio19-Apr-10 10:54
Gwenio19-Apr-10 10:54 
AnswerRe: Curious Pin
Richard MacCutchan19-Apr-10 1:16
mveRichard MacCutchan19-Apr-10 1:16 
GeneralRe: Curious Pin
Gwenio19-Apr-10 10:49
Gwenio19-Apr-10 10:49 
GeneralRe: Curious Pin
Richard MacCutchan19-Apr-10 11:05
mveRichard MacCutchan19-Apr-10 11:05 
GeneralRe: Curious Pin
Gwenio19-Apr-10 11:38
Gwenio19-Apr-10 11:38 
GeneralRe: Curious Pin
Richard MacCutchan19-Apr-10 12:28
mveRichard MacCutchan19-Apr-10 12:28 
GeneralRe: Curious Pin
Gwenio19-Apr-10 13:13
Gwenio19-Apr-10 13:13 
GeneralRe: Curious Pin
Richard MacCutchan20-Apr-10 1:16
mveRichard MacCutchan20-Apr-10 1:16 
GeneralRe: Curious Pin
Stephen Hewitt19-Apr-10 13:54
Stephen Hewitt19-Apr-10 13:54 
GeneralRe: Curious Pin
Gwenio19-Apr-10 14:02
Gwenio19-Apr-10 14:02 
Questionwchar_t / C++ Pin
Fareed Rizkalla18-Apr-10 9:19
Fareed Rizkalla18-Apr-10 9:19 
AnswerRe: wchar_t / C++ Pin
Chris Losinger18-Apr-10 9:51
professionalChris Losinger18-Apr-10 9:51 
AnswerRe: wchar_t / C++ Pin
Richard MacCutchan18-Apr-10 11:09
mveRichard MacCutchan18-Apr-10 11:09 
QuestionWinSock 2 / Win32 Pin
Fareed Rizkalla18-Apr-10 9:15
Fareed Rizkalla18-Apr-10 9:15 
AnswerRe: WinSock 2 / Win32 Pin
Richard Andrew x6418-Apr-10 13:33
professionalRichard Andrew x6418-Apr-10 13:33 
AnswerRe: WinSock 2 / Win32 [modified] Pin
Moak18-Apr-10 20:21
Moak18-Apr-10 20:21 

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.