15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


Error creating view when using CTabView in SDI

Mats Mеnhav -- manhav@connectum.skurup.se
Tuesday, April 30, 1996

-- [ From: Mats Manhav * EMC.Ver #2.5.02 ] --

Hi,
ENV MSVC 4.1, NT 3.51 ussp4 with new shell technology.

I have a class called CTabView. It is derived from CCtrlView and
encapsulates the TabControl.
I got the code from Jim Leavitt.

I also have used it in an MDI app and it works great.

Now I need(want) to use it in an SDI app, but there seem to be some problems
with this.

The SDI app fails to create the View with GetLastError reporting
ERROR_CANNOT_FIND_WND_CLASS (1407L).
The window class it cannot find is "SysTabControl32". Which obviously got to
be present since it
works fine from an MDI app, and it is a common control.

What I did was to create an SDI app using appwizard. I replaced the view
with CTabView in the creation of the CSingleDocTemplate in App::InitInstance
(). Compiled and run.
The failure will get TRACED from the wincore.cpp at line 698.

I would appreciate any help on this. 
Including just making a test on the NT 4.0 Beta version and Win 95. 

The class is available in the file tabview.zip at ftp://advn.com/pub/mfc.

Mats

--
==========================================================================
Mats Mеnhav (Mats Manhav for 7-bit people)
email:manhav@connectum.skurup.se   WWW: http://connectum.skurup.se/~manhav
FAX:  (int) 46 (0) 414 243 05      Phone: (int) 46 (0) 414 243 05         
==========================================================================




Mike Blaszczak -- mikeblas@interserv.com
Wednesday, May 01, 1996

On Tue, 30 Apr 96, Mats Manhav  wrote:

>Hi,
>ENV MSVC 4.1, NT 3.51 ussp4 with new shell technology.

You really should use NT 4.0 beta.  The beta SUR that runs on NT 3.51 is 
pretty buggy.

>The SDI app fails to create the View with GetLastError reporting
>ERROR_CANNOT_FIND_WND_CLASS (1407L).
>The window class it cannot find is "SysTabControl32". Which obviously got to
>be present since it
>works fine from an MDI app, and it is a common control.

This suggests that the common control library isn't properly initialized.  
For performance, MFC tries to defer the registration of window classes, 
including the big bunch of classes from the common control system DLL.

Do you override any PreCreateWindow() calls?  If you don't call the base 
class implementation correctly, you can cause this problem.  Or, perhaps 
you've found some way to expose a bug in MFC.

>The class is available in the file tabview.zip at ftp://advn.com/pub/mfc.

Is this file just that other guy's code, or does it show exactly how you 
applied that code in your own application?

.B ekiM
--
TCHAR szDisc[] = _T("These words are my own; I do not speak for Microsoft.");





| Вернуться в корень Архива |