gameboy_2000_us | 1 Jun 2004 04:23
Picon
Favicon

Re: Discussion: WTL Standalone?

I am among one of those praying that WTL not to venture standalone too
soon.

Making WTL working better with or without ATL certainly is certainly
welcome. ATL/COM is still useful in Windows programming and C++
programmers are known to go anywhere. Breaking away from ATL doesn't
automatically bring better things around. Cutting off connection to
ATL/COM is bad while rewriting ATL is a big undertake and probably not
a wheel worthwile reinventing.

As to CString vs. std::string or whatever, all these strings have
their pros and cons. There's no need of religious flames. In practice,
people generally settle on one string in a project at a time depends
on need. A better-thought string pimpl-style "interface" for WTL could
allow people using different implemenations under the hood (CString,
CComBSTR, std::string or whatever) when one-size cannot fit all.

Privately, we'd like to see WTL helps making C++ programming more of
fun and productive, for GUI and some of the most common C++ needs. No
way should we satisfied with the notion that productivity of unmanaged
C++ programming should always trail way behind managed C++/C#.  How
about just a descent "shared" string? How about adding things like
more specialized/faster memory managment choices or even gc without
huge runtime and thousands of registry garbage? Regex or shared_ptr
etc so that we don't have to grapple with so many third-part libraries
just for a few essential features. Nor shall we need to worry so many
EULA even from Microsoft and others.

http://research.microsoft.com/projects/greta/regex_perf.html
http://msdn.microsoft.com/msdnmag/issues/03/06/Res
(Continue reading)

Rick Parrish | 1 Jun 2004 02:06

Re: Discussion: WTL Standalone?

Nenad Stefanovic wrote:

>We can make WTL independent of ATL by replacing ATL code that
>is currently used by WTL with new code that would be a part of WTL. That code would include all the core stuff:
trace and debug support, defines, module support, "client" COM classes (CComPtr, CComBSTR, CComVariant).
>It would not include COM "impl" classes used to build COM objects.
>Hosting ActiveX controls could also be reimplemented to be independent
>of ATL.
>  
>
I vote for leaving the ATL-WTL dependency as-is.

If someone can show a significant benefit (like smaller code side) of 
trimming away ATL, then I'd be for it. My expectation is the benefit is 
so minor that it is not worth the effort.

Also, if you were to replicate ATL functionality in WTL, why not create 
a common set of templates for both ATL and WTL to include? That would 
cut down on documentation and any quirks arising from subtle differences 
of two implementations.

[ Thanks again for a great template library! ]

-rick

------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 
(Continue reading)

Derick Cyril Thomas | 1 Jun 2004 06:00
Picon

ListBox OwnerDraw

Hi,
 I create an app based listbox as view and add following code
class CMLLVView :

public CWindowImpl<CMLLVView, CListBox>,

COwnerDraw<CMLLVView>

{

public:

DECLARE_WND_SUPERCLASS(NULL, CListBox::GetWndClassName())

BOOL PreTranslateMessage(MSG* pMsg)

{pMsg;return FALSE;}

void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct)

{lpMeasureItemStruct;}

void DrawItem(LPDRAWITEMSTRUCT /*lpDrawItemStruct*/)

{ }

BEGIN_MSG_MAP(CMLLVView)

CHAIN_MSG_MAP_ALT(COwnerDraw<CMLLVView>, 1)

(Continue reading)

Paul Grenyer | 1 Jun 2004 07:56
Picon

Re: Re: Discussion: WTL Standalone?

Hi

> Well, exactly. 76 KB is quite a lot just to output "Hello world".

Yes, but not really compared to the 69,000 bytes you get anyway and you
wouldn't of course do Hello, World! this way, it was just a simple example.

Regards
Paul

Paul Grenyer
Email: paul@...
Web: http://www.paulgrenyer.co.uk

Have you met Aeryn: http://www.paulgrenyer.co.uk/aeryn/?
Version 0.3.0 beta now ready for download

------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/wtl/

<*> To unsubscribe from this group, send an email to:
     wtl-unsubscribe@...
(Continue reading)

Paul Grenyer | 1 Jun 2004 07:57
Picon

Re: Discussion: WTL Standalone?

Hi

> I do find it rather irritating, yes. I'm aware that there are pitfalls to
implicit conversion, but in the case of CString I'm happy to
> live with it.

Your funeral. :-)

>  > Anyway, if CString was dropped in favour of std::string,
> > LPCSTR probably should go too.
>
> Not quite sure what you mean... LPCSTR is just a typedef for "const char
*".

char* are pointers to char arrays. Char arrays would no longer be needed if
std::string was used.

> > > > , and no writable buffer access.
> > I'm not quite with you here.
>
> I mean something like CString's GetBuffer, used for calling API functions
that copy a string into a supplied buffer.

Ic.

Regards
Paul

Paul Grenyer
Email: paul@...
(Continue reading)

Paul Grenyer | 1 Jun 2004 07:58
Picon

Re: Discussion: WTL Standalone?

Hi

> Paul Grenyer wrote:
> > ...and thinking about it some more. LPCTSTR is there to handle 
> > char arrays right? Char arrays have no place in a C++ library.
> 
> Perhaps so, but unfortunately Win32 is not a C++ library.

Win32 isn't, but WTL is! 

Regards
Paul

Paul Grenyer
Email: paul@...
Web: http://www.paulgrenyer.co.uk

Have you met Aeryn: http://www.paulgrenyer.co.uk/aeryn/?
Version 0.3.0 beta now ready for download

------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/wtl/
(Continue reading)

Roger Headrick | 1 Jun 2004 11:53
Picon
Favicon

Re: ListBox OwnerDraw

--- In wtl@..., Derick Cyril Thomas
<derickcyril@...> 
wrote:
> Hi,
>  I create an app based listbox as view and add following code
> class CMLLVView :
> 
> public CWindowImpl<CMLLVView, CListBox>,
> 
> COwnerDraw<CMLLVView>
> 
> {
> 
> public:
> 
> DECLARE_WND_SUPERCLASS(NULL, CListBox::GetWndClassName())
> 
> BOOL PreTranslateMessage(MSG* pMsg)
> 
> {pMsg;return FALSE;}
> 
> void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct)
> 
> {lpMeasureItemStruct;}
> 
> void DrawItem(LPDRAWITEMSTRUCT /*lpDrawItemStruct*/)
> 
> { }
> 
> BEGIN_MSG_MAP(CMLLVView)
(Continue reading)

kavita.joshi | 1 Jun 2004 12:52

ListView column alignment

Hi Friends,

I am working on CListVewCtrl in WTL.
I want to set right/center/Left alignment for columns in List view
control.
Is there  any way by which we can change/modify alignment property of
each column...

List view by default has left alignment...

I will be grateful if anybody can show me way of how to do it?

thanx & regards,
Kav

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

------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/wtl/

<*> To unsubscribe from this group, send an email to:
(Continue reading)

Roger Headrick | 1 Jun 2004 13:10
Picon
Favicon

Re: Discussion: WTL Standalone?

--- In wtl@..., "Nenad Stefanovic"
<nenads@...> wrote:
> Hi everybody,
> 
> ...
> Please let me know what do you think about this.
> 
> Cheers,
> Nenad

Hi Nenad,

I defer to your judgement.  It sounds like you would recommend 
breaking away from ATL, and you already have specific improvements 
to the base classes in mind.

I would guess that a side benefit of removing atl dependency would 
be the removal of the atlmfc shared header directory from a project, 
which in turn might make vs's intellisense work better.

Thanks,

-Roger

------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
(Continue reading)

Roger Headrick | 1 Jun 2004 13:20
Picon
Favicon

Re: ListView column alignment

--- In wtl@...,
<kavita.joshi@...> wrote:
> Hi Friends,
>  
> I am working on CListVewCtrl in WTL.
> I want to set right/center/Left alignment for columns in List view
> control.
> Is there  any way by which we can change/modify alignment property 
of
> each column...
>  
> List view by default has left alignment...
>  
> I will be grateful if anybody can show me way of how to do it?
>  
> thanx & regards,
> Kav
> 

In a class derived from CListViewCtrl:

int GetColumnAlignment(int iColumn)
{
LVCOLUMN lvc = {LVCF_FMT};
return GetColumn(iColumn, &lvc) ? (lvc.fmt & LVCFMT_JUSTIFYMASK) : 0;
}		
	
BOOL SetColumnAlignment(int iColumn, int nAlignmentFlag)
{
LVCOLUMN lvc = {LVCF_FMT};
(Continue reading)


Gmane