[Q] CSplitterWnd - Win95 Vs WinNT
SUBRAMANIAN -- SUBRAMANIAN.BALAKRISHNEN@tencor.com
Friday, November 22, 1996
Environment: Win 95, Windows NT3.51, VC 4.2b
Hi,
Question:
I am writing an application to run on Win'95 and NT 3.51.
Initially the program was developed under NT 3.51. It was running fine
under
NT 3.51. When I tried to run the program under win'95, it failed. I
debugged and
solved the problem. The problem was with CSplitterWnd::CreateStatic()
method. Why
does CSplitterWnd::CreateStatic() behaves differently in win'95 and win
NT 3.51 ?. Is it
a bug or a documented difference between win95 / NT 3.51?
Background:
The CMDIChildWnd derived object, say "CMyChildWnd", contains a
member variable of type "CMySplitterWnd" ( derived from "CSplitterWnd")
say
"m_wndSplitter".
I create the splitter by using "m_wndSplitter.CreateStatic()" in
"CMyChildWnd::OnCreateClient()" .
In "CMyChildWnd::OnSize()" I position the "m_wndSplitter" such that it
divides the "CMyChildWnd" into two equal portions. This is done by
using the
"m_wndSplitter.SetRowInfo()".
Under win'95, before "m_wndSplitter.CreateStatic()" returns,
"CMyChildWnd::OnSize()" is being called. Now inside
"CMyChildWnd::OnSize()" ,
"m_wndSplitter.SetRowInfo()" is being called. But at this juncture
"m_wndSplitter.m_pRowInfo" in NULL, which results in a run-time error.
Thanks
Subu Balakrishnan
( subub@tencor.com )
Alexander Grigoriev -- alegr@aha.ru
Monday, November 25, 1996
OnSize may be called before OnCreateClient, thus the splitter may not be
created yet at this moment.
Always check m_wndSplitter.m_hWnd in CMDIChildWnd::OnSize.
----------
> From: BALAKRISHNEN, SUBRAMANIAN
> To: MFC List - Send
> Subject: [Q] CSplitterWnd - Win95 Vs WinNT
> Date: 23 ОПСВТС 1996 З. 3:32
>
>
> Environment: Win 95, Windows NT3.51, VC 4.2b
>
>
> Hi,
>
> Question:
> I am writing an application to run on Win'95 and NT 3.51.
> Initially the program was developed under NT 3.51. It was running fine
> under
> NT 3.51. When I tried to run the program under win'95, it failed. I
> debugged and
> solved the problem. The problem was with CSplitterWnd::CreateStatic()
> method. Why
> does CSplitterWnd::CreateStatic() behaves differently in win'95 and win
> NT 3.51 ?. Is it
> a bug or a documented difference between win95 / NT 3.51?
>
>
> Background:
> The CMDIChildWnd derived object, say "CMDIChildWnd", contains a
> member variable of type "CMySplitterWnd" ( derived from "CSplitterWnd")
> say
> "m_wndSplitter".
> I create the splitter by using "m_wndSplitter.CreateStatic()" in
> "CMyChildWnd::OnCreateClient()" .
> In "CMyChildWnd::OnSize()" I position the "m_wndSplitter" such that it
> divides the "CMyChildWnd" into two equal portions. This is done by
> using the
> "m_wndSplitter.SetRowInfo()".
> Under win'95, before "m_wndSplitter.CreateStatic()" returns,
> "CMyChildWnd::OnSize()" is being called. Now inside
> "CMyChildWnd::OnSize()" ,
> "m_wndSplitter.SetRowInfo()" is being called. But at this juncture
> "m_wndSplitter.m_pRowInfo" in NULL, which results in a run-time error.
>
>
> Thanks
>
> Subu Balakrishnan
>
> ( subub@tencor.com )
>
>
| Вернуться в корень Архива
|