Click here to Skip to main content
16,010,427 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: VC6 vs VC7 Pin
Joe Woodbury25-Sep-03 18:09
professionalJoe Woodbury25-Sep-03 18:09 
GeneralCalling CWnd::MoveWindow from within OnSize handler - CRASH Pin
Terry O'Nolley25-Sep-03 16:02
Terry O'Nolley25-Sep-03 16:02 
GeneralRe: Calling CWnd::MoveWindow from within OnSize handler - CRASH Pin
Larry J. Siddens25-Sep-03 16:07
Larry J. Siddens25-Sep-03 16:07 
GeneralRe: Calling CWnd::MoveWindow from within OnSize handler - CRASH Pin
Terry O'Nolley25-Sep-03 16:35
Terry O'Nolley25-Sep-03 16:35 
GeneralRe: Calling CWnd::MoveWindow from within OnSize handler - CRASH Pin
Shog925-Sep-03 18:57
sitebuilderShog925-Sep-03 18:57 
GeneralRe: Calling CWnd::MoveWindow from within OnSize handler - CRASH Pin
Terry O'Nolley26-Sep-03 4:11
Terry O'Nolley26-Sep-03 4:11 
GeneralRe: Calling CWnd::MoveWindow from within OnSize handler - CRASH Pin
Shog926-Sep-03 4:46
sitebuilderShog926-Sep-03 4:46 
GeneralRe: Calling CWnd::MoveWindow from within OnSize handler - CRASH Pin
Abin25-Sep-03 21:32
Abin25-Sep-03 21:32 
I think the reason it happened is that, child controls are created after the parent window(your dialog) is created.

As soon as your dialog is created it will be sized to the initial dimensions thus a call to CDlg::OnSize() is issued right away. However, at this moment the child control has not been created yet, so you get an assertion falilure when you try to move that control since it's not a window yet. I think you should add a verification if (::IsWindow(m_ListBox.m_hWnd)) before calling m_ListBox.MoveWindow() and you should be OK.
GeneralRe: Calling CWnd::MoveWindow from within OnSize handler - CRASH Pin
FearlessBurner26-Sep-03 0:15
FearlessBurner26-Sep-03 0:15 
Generalfree memory Pin
Sirrius25-Sep-03 15:01
Sirrius25-Sep-03 15:01 
GeneralRe: free memory Pin
Larry J. Siddens25-Sep-03 16:12
Larry J. Siddens25-Sep-03 16:12 
GeneralVisual C++ and Standard C++ Pin
RanBlade25-Sep-03 13:53
RanBlade25-Sep-03 13:53 
GeneralRe: Visual C++ and Standard C++ Pin
Taka Muraoka25-Sep-03 14:09
Taka Muraoka25-Sep-03 14:09 
GeneralRe: Visual C++ and Standard C++ Pin
RanBlade25-Sep-03 14:15
RanBlade25-Sep-03 14:15 
GeneralRe: Visual C++ and Standard C++ Pin
RanBlade25-Sep-03 14:17
RanBlade25-Sep-03 14:17 
GeneralRe: Visual C++ and Standard C++ Pin
Taka Muraoka25-Sep-03 14:31
Taka Muraoka25-Sep-03 14:31 
GeneralRe: Visual C++ and Standard C++ Pin
Joe Woodbury25-Sep-03 18:16
professionalJoe Woodbury25-Sep-03 18:16 
GeneralSimple operation with window minimized... Pin
Anonymous25-Sep-03 13:30
Anonymous25-Sep-03 13:30 
GeneralC and memory help Pin
Sirrius25-Sep-03 12:39
Sirrius25-Sep-03 12:39 
GeneralRe: C and memory help Pin
Larry J. Siddens25-Sep-03 13:03
Larry J. Siddens25-Sep-03 13:03 
GeneralRe: C and memory help Pin
Sirrius25-Sep-03 14:46
Sirrius25-Sep-03 14:46 
GeneralRe: C and memory help Pin
Larry J. Siddens25-Sep-03 15:02
Larry J. Siddens25-Sep-03 15:02 
GeneralID of a child dialog Pin
Antti Keskinen25-Sep-03 11:42
Antti Keskinen25-Sep-03 11:42 
GeneralRe: ID of a child dialog Pin
Antti Keskinen25-Sep-03 11:49
Antti Keskinen25-Sep-03 11:49 
GeneralApp is crashing when trying to restore Brushes and Fonts Pin
Terry O'Nolley25-Sep-03 9:56
Terry O'Nolley25-Sep-03 9:56 

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.