Mark A. Gregory | 1 Sep 11:51 2002
Picon

Cstring include?

I'm looking at atlctrls.h line 3269

I see
#ifndef _ATL_NO_COM

BOOL GetItemText(HTREEITEM hItem, BSTR& bstrText) const

{...

Then on line 3307

#if defined(_WTL_USE_CSTRING) || defined(__ATLSTR_H__)

BOOL GetItemText(HTREEITEM hItem, CString& strText) const

This seems to be a little perplexing. If I define _WTL_USE_CSTRING I
would have an overload

of the GetItemText function. Are there many more in this situation?

Is __ATLSTR_H__ included in the wizard projects?

I suppose my question is whether the new CString in ATL7 included by
default?

Are there any other classes from ATL7 that may or may not be included?

cheers

Mark
(Continue reading)

Mark A. Gregory | 1 Sep 12:20 2002
Picon

Message maps again

I have a class
class CMyListView : public CWindowImpl<CMyListView,CListViewCtrl>

The message map is

BEGIN_MSG_MAP(CMyListView)

MESSAGE_HANDLER(WM_CREATE, OnCreate)

MESSAGE_HANDLER(WM_SETFOCUS, OnSetFocus)

MESSAGE_HANDLER(WM_NOTIFY, OnNotify)

MESSAGE_HANDLER(WM_SIZE, OnSize)

MESSAGE_HANDLER(WM_DESTROY, OnDestroy) 

ALT_MSG_MAP(1) //Edit control

MESSAGE_HANDLER(WM_CHAR, OnChar)

MESSAGE_HANDLER(WM_KILLFOCUS, OnEditKillFocus)

ALT_MSG_MAP(2) //Combobox

COMMAND_HANDLER(203, CBN_KILLFOCUS, OnComboKillFocus)

COMMAND_HANDLER(203, CBN_SELCHANGE, OnComboOK)

END_MSG_MAP()
(Continue reading)

Mark A. Gregory | 1 Sep 14:07 2002
Picon

RE: Message maps again

I think I found the problem, in the framewindow I have

CHAIN_COMMANDS_MEMBER(m_lv)

CHAIN_MSG_MAP_MEMBER(m_lv)

CHAIN_COMMANDS_MEMBER(m_tvx)

CHAIN_MSG_MAP_MEMBER(m_tvx)

REFLECT_NOTIFICATIONS()

And I needed to ripple the Notify messages around the different
children.

One further question would be, do I need to have the
CHAIN_COMMANDS_MEMBER

And the CHAIN_MSG_MAP_MEMBER?

Mark

-----Original Message-----
From: Mark A. Gregory 
Sent: Sunday, 1 September 2002 8:20 PM
To: wtl@...
Subject: [wtl] Message maps again

I have a class
class CMyListView : public
(Continue reading)

Rick Parrish | 1 Sep 20:22 2002
Picon

Re: Cstring include?

try ...

#include <atlmisc.h>

umeca74 | 1 Sep 20:49 2002
Picon

Re: Message maps again

--- In wtl@..., "Mark A. Gregory" <mgregory <at> g...> wrote:
> I think I found the problem, in the framewindow I have
> 
> CHAIN_COMMANDS_MEMBER(m_lv)
> CHAIN_MSG_MAP_MEMBER(m_lv)
> 
> One further question would be, do I need to have the
> CHAIN_COMMANDS_MEMBER And the CHAIN_MSG_MAP_MEMBER?
> 

Mark

CHAIN_MSG_MAP_MEMBER is meant for simulating super/subclass 
behaviour. The way you do it is dangerous. Depending on the order of 
the rest of your message map you may end up handling messages meant 
for the frame in your view (e.g. WM_SIZE or what have you). You only 
use it when e.g. you derive a class from a basic frame and you want 
to process most of the messages in that base class, using 
CHAIN_MSG_MAP (or CHAIN_MSG_MAP_MEMBER if you are not deriving from 
it)

so you should delete all these CHAIN_MSG_MAP_MEMBER from your 
message map!

CHAIN_COMMANDS_MEMBER on the other hand are appropriate, it all 
boils down where you want to handle your custom command messages 
from menus etc

Adrian Latinak | 2 Sep 22:29 2002
Picon

SDI Form View

Hi,

does anybody have a solution for resizing the parent frame
to the forms initial size?

Like the ResizeParentToFit() in MFC. 

Adrian

http://www.justiceforfamilies.org

[Non-text portions of this message have been removed]

Angus Comber | 1 Sep 12:42 2002
Picon

CString and CRT dependency

Hello

It seems a shame that the WTL CString class is dependent on the C runtime.
I had a geief look through the code and didn't see too many CRT functions.
Have any enterprising WTL developers hacked the CString class to remove this
dependency?

Angus Comber
angus@...

Angus Comber | 1 Sep 12:23 2002
Picon

Is it worth upgrading to the latest version of MS C++ dev tool?

Hello

I am just starting usingWTL. Wish I had started using it a long time ago!

Anyway, I am using the MS Visual C++ v6 compiler and WTL v3. I understand
that to use WTL 7 I need to upgrade to the latest MS C++ version. Is this
correct? Is the upgrade recommended?

Angus Comber
angus@...

tfmanual | 3 Sep 04:16 2002
Picon

Re: Is it worth upgrading to the latest version of MS C++ dev tool?

--- In wtl@..., "Angus Comber" <angus <at> o...> wrote:
> Hello
> 
> I understand
> that to use WTL 7 I need to upgrade to the latest MS C++ version. 
Is this
> correct? Is the upgrade recommended?

WTL 7 is a significant improvement. It works fine with MSVC++ 6

tfmanual | 3 Sep 04:21 2002
Picon

Re: CString and CRT dependency

--- In wtl@..., "Angus Comber" <angus <at> o...> wrote:
> Hello
> 
> It seems a shame that the WTL CString class is dependent on the C 
runtime.

I've forgotten WTL 3 already. There's no dependency in WTL 7
#define _ATL_MIN_CRT and *don't* #define _ATL_USE_CSTRING_FLOAT.

Search through the headers for these directives to see how it works.


Gmane