soulofsealion | 3 Feb 2003 03:31
Picon
Favicon

Compiling MDI project with VS.NET /clr switch

I generated a MDI project from the WTL7 wizard(originally done in VS6)

I compiled this in VS.NET and the code executed OK. When I used 
the /clr switch. It compiles fine but when it creates the toolbar I 
get the following exception message:

An unhandled exception of type 'System.TypeLoadException' occurred in 
WTL7MDI.exe

Additional information: Could not load type _IMAGELIST from assembly 
WTL7MDI, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.

If I remove all the toolbar code then the code executes OK. It 
appears that the clr compiler is having trouble handling the 
HIMAGELIST type in the assembly metadata. There appears not to be a 
problem with other handles such as HWND and HMENU.

Has anyone experienced this and/or have a solution?

thank you.

Dennis Worthem

Alexey Rogovoy | 3 Feb 2003 08:11
Picon

ToolBar for IE

Hi,

Anybody could give me ToolBar for Internet Explorer with XP Themes
support?

--
WBR,
Alexey Rogovoy

Rodrigo Strauss | 3 Feb 2003 17:31
Picon

Re: Compiling MDI project with VS.NET /clr switch

Is there any specific reason to compile the project for CLR??????

Strauss
----- Original Message -----
From: <dworthem@...>
To: <wtl@...>
Sent: Monday, February 03, 2003 12:31 AM
Subject: [wtl] Compiling MDI project with VS.NET /clr switch

> I generated a MDI project from the WTL7 wizard(originally done in VS6)
>
> I compiled this in VS.NET and the code executed OK. When I used
> the /clr switch. It compiles fine but when it creates the toolbar I
> get the following exception message:
>
> An unhandled exception of type 'System.TypeLoadException' occurred in
> WTL7MDI.exe
>
> Additional information: Could not load type _IMAGELIST from assembly
> WTL7MDI, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.
>
>
> If I remove all the toolbar code then the code executes OK. It
> appears that the clr compiler is having trouble handling the
> HIMAGELIST type in the assembly metadata. There appears not to be a
> problem with other handles such as HWND and HMENU.
>
> Has anyone experienced this and/or have a solution?
>
> thank you.
(Continue reading)

soulofsealion | 3 Feb 2003 18:54
Picon
Favicon

Re: Compiling MDI project with VS.NET /clr switch

I found the answer elsewhere. The problem is that HIMAGELIST is only 
forward declared as a struct in the windows header files. The 
solution is to put an empty struct definition for _IMAGELIST
(HIMAGELIST is typedefed as an NEAR* _IMAGELIST).

Everything executes OK.

Thanks anyway.

Dennis

P.S. I am investigating mixing some .NET Framework class code into 
the WTL project and ATL projects in genera.

--- In wtl@..., "soulofsealion <dworthem <at> m...>" 
<dworthem@...> wrote:
> I generated a MDI project from the WTL7 wizard(originally done in 
VS6)
> 
> I compiled this in VS.NET and the code executed OK. When I used 
> the /clr switch. It compiles fine but when it creates the toolbar 
I 
> get the following exception message:
> 
> An unhandled exception of type 'System.TypeLoadException' occurred 
in 
> WTL7MDI.exe
> 
> Additional information: Could not load type _IMAGELIST from 
assembly 
(Continue reading)

Paul Selormey | 4 Feb 2003 13:18

Re: How do I validate a PropertySheet ?

The solution is simple, read the source codes for CPropertyPageImpl;
and you will find notification message handlers to override such as

int OnSetActive()
{
return 0;
}
BOOL OnKillActive()
{
return FALSE;
}
int OnApply()
{
}
void OnReset()
{
}
BOOL OnQueryCancel()
{
return FALSE;
}
int OnWizardBack()
{
return 0;
}
int OnWizardNext()
{
return 0;
}
INT_PTR OnWizardFinish()
(Continue reading)

Angus Comber | 4 Feb 2003 15:05
Picon

ATL Control generating a dialog seems to crash my WTL application.

Hello

I am using an ATL control which generates an alarm dialog. Whenever the
time comes round for the alarm dialog I see this error:

The instruction at "0x1004a493" referenced memory at "0x00000054". The
memory could not be "read".

This is in a messagebox with My application name - Application Error in
title.

How do I go about troubleshooting this sort of error?

When in Debug mode I click on Cancel button and get message in VC++:

Unhandled exception in IODiary.exe (PVDayView9.ocx) 0xC0000005: Access
violation

When I click on OK here see hex code ie mov ecx, dword ptr [eax+54h] etc.
Never studied Assembly language so this doesn't help me.

Do I need to use Exception handling in my application? If so, how can I
work out what is causing this error and hence can add the exception handling
code?

Angus Comber
angus@...

Paul Selormey | 4 Feb 2003 15:39

Re: ATL Control generating a dialog seems to crash my WTL application.

Do you have the source to the PVDayView9.ocx?

Best regards,
Paul.

----- Original Message -----
From: "Angus Comber" <angus@...>
To: <wtl@...>
Sent: Tuesday, February 04, 2003 11:05 PM
Subject: [wtl] ATL Control generating a dialog seems to crash my WTL
application.

> Hello
>
> I am using an ATL control which generates an alarm dialog. Whenever the
> time comes round for the alarm dialog I see this error:
>
> The instruction at "0x1004a493" referenced memory at "0x00000054". The
> memory could not be "read".
>
> This is in a messagebox with My application name - Application Error in
> title.
>
> How do I go about troubleshooting this sort of error?
>
> When in Debug mode I click on Cancel button and get message in VC++:
>
> Unhandled exception in IODiary.exe (PVDayView9.ocx) 0xC0000005: Access
> violation
>
(Continue reading)

Frank Wu | 4 Feb 2003 16:30

Can't Compile WTL 7 with ATL 7 -- _Module Problem

Hi All,

I use ATL 7 created a full control with attributes, then added WTL 
header files. However, I got compile error with "atlctrls.h" 
and "atldlgs.h" because the compiler couldn't recognize _Module. 

If I added CComModule _Module; in stdafx.h, I got error message:
error C2338: module Atl Attribute Provider : error 
ATL2070: "_Module" cannot be used in attributed project.

I then tried no using attributes with ATL 7. I modified CMyModule 
_Module; in "My.cpp". I added GetResourceInstance() method to the 
calss, but adding ExtractCreateWndData() method is complicated. ATL 
7 completely changed related data type. Furthermore, 
including "My.cpp" in "stdafx.h" is confusing.

Does it mean I have to give up using WTL 7 for ATL 7? 

TIA,

Frank

John Wilkinson | 4 Feb 2003 17:12

RE: Can't Compile WTL 7 with ATL 7 -- _Module Problem

Hi, Frank - 

Try searching the message archives on this topic (CComModule, or "ATL
7"); there have been several discussions on how to use WTL with ATL 7.
You could also check out some of the more recent WTL submissions on
CodeProject [1], to see how they have handled this issue.

John

[1] http://www.codeproject.com/wtl

-----Original Message-----
From: Frank Wu <fwu@...> [mailto:fwu <at> netgenvideo.com] 
Sent: Tuesday, February 04, 2003 9:31 AM
To: wtl@...
Subject: [wtl] Can't Compile WTL 7 with ATL 7 -- _Module Problem

Hi All,

I use ATL 7 created a full control with attributes, then added WTL 
header files. However, I got compile error with "atlctrls.h" 
and "atldlgs.h" because the compiler couldn't recognize _Module. 

If I added CComModule _Module; in stdafx.h, I got error message: error
C2338: module Atl Attribute Provider : error 
ATL2070: "_Module" cannot be used in attributed project.

I then tried no using attributes with ATL 7. I modified CMyModule 
_Module; in "My.cpp". I added GetResourceInstance() method to the 
calss, but adding ExtractCreateWndData() method is complicated. ATL 
(Continue reading)

Angus Comber | 4 Feb 2003 18:35
Picon

Re: ATL Control generating a dialog seems to crash my WTL application.

Unfortunately not. It is a third party commercial control.

Angus

----- Original Message -----
From: "Paul Selormey" <paul@...>
To: <wtl@...>
Sent: Tuesday, February 04, 2003 2:39 PM
Subject: Re: [wtl] ATL Control generating a dialog seems to crash my WTL
application.

> Do you have the source to the PVDayView9.ocx?
>
> Best regards,
> Paul.
>
> ----- Original Message -----
> From: "Angus Comber" <angus@...>
> To: <wtl@...>
> Sent: Tuesday, February 04, 2003 11:05 PM
> Subject: [wtl] ATL Control generating a dialog seems to crash my WTL
> application.
>
>
> > Hello
> >
> > I am using an ATL control which generates an alarm dialog. Whenever the
> > time comes round for the alarm dialog I see this error:
> >
> > The instruction at "0x1004a493" referenced memory at "0x00000054". The
(Continue reading)


Gmane