[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [TSVN] Another refactoring opportunity?

From: SteveKing <steveking_at_gmx.ch>
Date: 2005-01-04 19:29:42 CET

Will Dean wrote:

> Ignore the template for a moment, as it's not really relevant - the new
> class is just another Dialog-ish class sitting in the derivation chain
> (is that a proper C++ term?) This could either be something like CWnd
> -> CDialog -> CStandAloneDialog -> CAddDlg (or whatever) or CWnd ->
> CDialog -> CResizableDialog -> CStandAlongDialog -> CAddDlg
>
> There's no problem any and/or all of these CWnd-derived classes having
> their own message maps (for example CResizableDialog has its own message
> map, which doesn't clash with the message maps in the TSVN dialogs.
>
> All that the templating does is allow me to have one set of code which
> implements:
>
> CStandAloneDialogDerivedDirectlyFromCDialog
>
> and
>
> CStandAloneDialogDerivedFromCResizableDialog
>
> without having to have to write the code twice. (The compiler probably
> generates it twice)

Ah ok, I see. Then I'm definitely +1 to implement the dialogs that way.
Saves us a lot of trouble and cleans up the dialog sources a little bit.

> I'll have a go at extending it's scope a bit more. What's particularly
> annoying about this 'boring code' is that the 'IsIconic' case (the
> majority of the code) seems to never be actually used on an
> Explorer-shell style machine (unless you kill the shell and *then*
> minimise the app.) WinNT 3.51 support, anybody? (Win9x might be
> different, too.)

I wondered about that too. But I did that exactly as it was mentioned in
the MSDN docs. When I once tried to step throught the code, the
breakpoint was never hit no matter what I tried. But I thought that
there must be a use for it - I just haven't found it yet. Otherwise the
MSDN wouldn't tell us to do it that way?
(or the MSDN is just outdated ;)

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Tue Jan 4 19:30:22 2005

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.