Loading ...
Sorry, an error occurred while loading the content.
 

RE: [wtl] CString in WTL - How use in a simple console app project

Expand Messages
  • Steve Maier
    Well I have added WTL to a SDK project and did NOT have to create a _Module. I just used this.... extern CAppModule _Module; As long as you are just using
    Message 1 of 19 , May 7 1:30 PM
      Well I have added WTL to a SDK project and did NOT have to create a _Module.
      I just used this....

      extern CAppModule _Module;

      As long as you are just using CString this should work.

      Steve Maier, MCSD


      ----Original Message Follows----
      From: "Tim Tabor" <tltabor@...>
      Reply-To: wtl@yahoogroups.com
      To: <wtl@yahoogroups.com>
      Subject: RE: [wtl] CString in WTL - How use in a simple console app project
      Date: Mon, 7 May 2001 16:01:43 -0400

      Why not define _Module?

      // tim

      > -----Original Message-----
      > From: gkinius@... [mailto:gkinius@...]
      > Sent: Monday, May 07, 2001 3:24 PM
      > To: wtl@yahoogroups.com
      > Subject: [wtl] CString in WTL - How use in a simple console app project
      >
      >
      > Can I use WTL - CString in a console app without requiring to define
      > _Module?
      >
      > Thanks for your advice.
      >
      >
      >
      > To unsubscribe from this group, send an email to:
      > wtl-unsubscribe@egroups.com
      >
      >
      >
      > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
      >
      >


      To unsubscribe from this group, send an email to:
      wtl-unsubscribe@egroups.com



      Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/




      _________________________________________________________________
      Get your FREE download of MSN Explorer at http://explorer.msn.com
    • Ganesh Kini
      You are right, I do not want to do anything with ATL. But if I include atlmisc.h then it is looking for the definition of _Module and I do not know how to get
      Message 2 of 19 , May 7 2:01 PM
        You are right, I do not want to do anything with ATL.
        But if I include atlmisc.h then it is looking for the
        definition of _Module and I do not know how to get rid
        of that error in my console app;


        --- Brandon Corfman <bcorfman@...> wrote:
        > Tim,
        >
        > I thought (off the top of my head) that _Module was
        > of type
        > CComModule in ATL. It doesn't seem like you'd want
        > to instantiate
        > that class if you're not doing anything COM related.
        >
        >
        > Please enlighten me.
        >
        > Brandon
        >
        > --- In wtl@y..., "Tim Tabor" <tltabor@e...> wrote:
        > > Why not define _Module?
        > >
        > > // tim
        > >
        > > > -----Original Message-----
        > > > From: gkinius@y... [mailto:gkinius@y...]
        > > > Sent: Monday, May 07, 2001 3:24 PM
        > > > To: wtl@y...
        > > > Subject: [wtl] CString in WTL - How use in a
        > simple console app
        > project
        > > >
        > > >
        > > > Can I use WTL - CString in a console app without
        > requiring to
        > define
        > > > _Module?
        > > >
        > > > Thanks for your advice.
        > > >
        > > >
        > > >
        > > > To unsubscribe from this group, send an email
        > to:
        > > > wtl-unsubscribe@egroups.com
        > > >
        > > >
        > > >
        > > > Your use of Yahoo! Groups is subject to
        > http://docs.yahoo.com/info/terms/
        > > >
        > > >
        >
        >


        __________________________________________________
        Do You Yahoo!?
        Yahoo! Auctions - buy the things you want at great prices
        http://auctions.yahoo.com/
      • Tim Tabor
        Hmm. I always just throw in one of the CModule s. If you re into minimalism and a bit of a hack (and if Nenad isn t looking), I guess you could: #include
        Message 3 of 19 , May 7 3:06 PM
          Hmm. I always just throw in one of the CModule's. If you're into
          minimalism and a bit of a hack (and if Nenad isn't looking), I guess
          you could:

          #include <AtlBase.h>

          struct CResModule
          {
          HINSTANCE GetResourceInstance()
          {return GetModuleHandle(0);}
          };

          CResModule _Module;
          #include <AtlApp.h>
          #include <AtlMisc.h>

          void _tmain()
          {
          CString str(_T("World"));

          MessageBox(0, str, _T("Hello"), MB_OK);
          }

          // tim

          > -----Original Message-----
          > From: Brandon Corfman [mailto:bcorfman@...]
          > Sent: Monday, May 07, 2001 4:24 PM
          > To: wtl@yahoogroups.com
          > Subject: [wtl] Re: CString in WTL - How use in a simple console app
          > project
          >
          >
          > Tim,
          >
          > I thought (off the top of my head) that _Module was of type
          > CComModule in ATL. It doesn't seem like you'd want to instantiate
          > that class if you're not doing anything COM related.
          >
          > Please enlighten me.
          >
          > Brandon
          >
        • Nenad Stefanovic
          If you are into minimalism and a bit of a hack, why are you using CString? ;-) Cheers, Nenad (looking) ... From: Tim Tabor [mailto:tltabor@earthlink.net] Sent:
          Message 4 of 19 , May 7 4:16 PM
            If you are into minimalism and a bit of a hack, why are you using
            CString? ;-)

            Cheers,
            Nenad (looking)


            -----Original Message-----
            From: Tim Tabor [mailto:tltabor@...]
            Sent: Monday, May 07, 2001 3:06 PM
            To: wtl@yahoogroups.com
            Subject: RE: [wtl] Re: CString in WTL - How use in a simple console app
            project


            Hmm. I always just throw in one of the CModule's. If you're into
            minimalism and a bit of a hack (and if Nenad isn't looking), I guess you
            could:

            #include <AtlBase.h>

            struct CResModule
            {
            HINSTANCE GetResourceInstance()
            {return GetModuleHandle(0);}
            };

            CResModule _Module;
            #include <AtlApp.h>
            #include <AtlMisc.h>

            void _tmain()
            {
            CString str(_T("World"));

            MessageBox(0, str, _T("Hello"), MB_OK);
            }

            // tim

            > -----Original Message-----
            > From: Brandon Corfman [mailto:bcorfman@...]
            > Sent: Monday, May 07, 2001 4:24 PM
            > To: wtl@yahoogroups.com
            > Subject: [wtl] Re: CString in WTL - How use in a simple console app
            > project
            >
            >
            > Tim,
            >
            > I thought (off the top of my head) that _Module was of type
            > CComModule in ATL. It doesn't seem like you'd want to instantiate
            > that class if you're not doing anything COM related.
            >
            > Please enlighten me.
            >
            > Brandon
            >

            To unsubscribe from this group, send an email to:
            wtl-unsubscribe@egroups.com



            Your use of Yahoo! Groups is subject to
            http://docs.yahoo.com/info/terms/
          • Brandon Corfman
            Yep, I was thinking minimalism -- your approach is much better ... leaving the WTL source intact. :) Best regards, Brandon
            Message 5 of 19 , May 7 5:51 PM
              Yep, I was thinking minimalism -- your approach is much better ... leaving
              the WTL source intact. :)

              Best regards,
              Brandon


              Tim Tabor wrote:

              > Hmm. I always just throw in one of the CModule's. If you're into
              > minimalism and a bit of a hack (and if Nenad isn't looking), I guess
              > you could:
              >
              > #include <AtlBase.h>
              >
              > struct CResModule
              > {
              > HINSTANCE GetResourceInstance()
              > {return GetModuleHandle(0);}
              > };
              >
              > CResModule _Module;
              > #include <AtlApp.h>
              > #include <AtlMisc.h>
              >
              > void _tmain()
              > {
              > CString str(_T("World"));
              >
              > MessageBox(0, str, _T("Hello"), MB_OK);
              > }
              >
              > // tim
              >
              > > -----Original Message-----
              > > From: Brandon Corfman [mailto:bcorfman@...]
              > > Sent: Monday, May 07, 2001 4:24 PM
              > > To: wtl@yahoogroups.com
              > > Subject: [wtl] Re: CString in WTL - How use in a simple console app
              > > project
              > >
              > >
              > > Tim,
              > >
              > > I thought (off the top of my head) that _Module was of type
              > > CComModule in ATL. It doesn't seem like you'd want to instantiate
              > > that class if you're not doing anything COM related.
              > >
              > > Please enlighten me.
              > >
              > > Brandon
              > >
              >
              > To unsubscribe from this group, send an email to:
              > wtl-unsubscribe@egroups.com
              >
              >
              >
              > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
            • Ganesh Kini
              Hi Tim, Thank you very much for the excellent solution. I have another problem - I want to use wtl in win2000 and want to use QueueUserWorkItem function
              Message 6 of 19 , May 8 6:27 AM
                Hi Tim,

                Thank you very much for the excellent solution. I have
                another problem - I want to use wtl in win2000 and
                want to use QueueUserWorkItem function (thread pool),
                Do you know any workarount for getting rid of the
                compile errors. I am creating a modal dialog based
                project in wtl.

                Thanks again

                --- Tim Tabor <tltabor@...> wrote:
                > Hmm. I always just throw in one of the CModule's.
                > If you're into
                > minimalism and a bit of a hack (and if Nenad isn't
                > looking), I guess
                > you could:
                >
                > #include <AtlBase.h>
                >
                > struct CResModule
                > {
                > HINSTANCE GetResourceInstance()
                > {return GetModuleHandle(0);}
                > };
                >
                > CResModule _Module;
                > #include <AtlApp.h>
                > #include <AtlMisc.h>
                >
                > void _tmain()
                > {
                > CString str(_T("World"));
                >
                > MessageBox(0, str, _T("Hello"), MB_OK);
                > }
                >
                > // tim
                >
                > > -----Original Message-----
                > > From: Brandon Corfman
                > [mailto:bcorfman@...]
                > > Sent: Monday, May 07, 2001 4:24 PM
                > > To: wtl@yahoogroups.com
                > > Subject: [wtl] Re: CString in WTL - How use in a
                > simple console app
                > > project
                > >
                > >
                > > Tim,
                > >
                > > I thought (off the top of my head) that _Module
                > was of type
                > > CComModule in ATL. It doesn't seem like you'd want
                > to instantiate
                > > that class if you're not doing anything COM
                > related.
                > >
                > > Please enlighten me.
                > >
                > > Brandon
                > >
                >


                __________________________________________________
                Do You Yahoo!?
                Yahoo! Auctions - buy the things you want at great prices
                http://auctions.yahoo.com/
              • Vladimir Voinkov
                But, why not to implement CString as a class template? Vladimir ... From: Nenad Stefanovic To: Sent: Tuesday,
                Message 7 of 19 , May 8 9:37 AM
                  But, why not to implement CString as a class template?

                  Vladimir

                  ----- Original Message -----
                  From: "Nenad Stefanovic" <nenads@...>
                  To: <wtl@yahoogroups.com>
                  Sent: Tuesday, May 08, 2001 3:16 AM
                  Subject: RE: [wtl] Re: CString in WTL - How use in a simple console app
                  project

                  > If you are into minimalism and a bit of a hack, why are you using
                  > CString? ;-)
                  >
                  > Cheers,
                  > Nenad (looking)
                  >
                  >
                  > -----Original Message-----
                  > From: Tim Tabor [mailto:tltabor@...]
                  > Sent: Monday, May 07, 2001 3:06 PM
                  > To: wtl@yahoogroups.com
                  > Subject: RE: [wtl] Re: CString in WTL - How use in a simple console app
                  > project
                  >
                  >
                  > Hmm. I always just throw in one of the CModule's. If you're into
                  > minimalism and a bit of a hack (and if Nenad isn't looking), I guess you
                  > could:
                  >
                  > #include <AtlBase.h>
                  >
                  > struct CResModule
                  > {
                  > HINSTANCE GetResourceInstance()
                  > {return GetModuleHandle(0);}
                  > };
                  >
                  > CResModule _Module;
                  > #include <AtlApp.h>
                  > #include <AtlMisc.h>
                  >
                  > void _tmain()
                  > {
                  > CString str(_T("World"));
                  >
                  > MessageBox(0, str, _T("Hello"), MB_OK);
                  > }
                  >
                  > // tim
                  >
                  > > -----Original Message-----
                  > > From: Brandon Corfman [mailto:bcorfman@...]
                  > > Sent: Monday, May 07, 2001 4:24 PM
                  > > To: wtl@yahoogroups.com
                  > > Subject: [wtl] Re: CString in WTL - How use in a simple console app
                  > > project
                  > >
                  > >
                  > > Tim,
                  > >
                  > > I thought (off the top of my head) that _Module was of type
                  > > CComModule in ATL. It doesn't seem like you'd want to instantiate
                  > > that class if you're not doing anything COM related.
                  > >
                  > > Please enlighten me.
                  > >
                  > > Brandon
                  > >
                  >
                  > To unsubscribe from this group, send an email to:
                  > wtl-unsubscribe@egroups.com
                  >
                  >
                  >
                  > Your use of Yahoo! Groups is subject to
                  > http://docs.yahoo.com/info/terms/
                  >
                  >
                  >
                  > To unsubscribe from this group, send an email to:
                  > wtl-unsubscribe@egroups.com
                  >
                  >
                  >
                  > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
                  >
                  >
                  >
                • Brandon Corfman
                  Hi Vladmir, If you are asking if CString should be designed like STL s string, consider that the philosophy of STL is that it conceptually separates
                  Message 8 of 19 , May 8 11:10 AM
                    Hi Vladmir,

                    If you are asking if CString should be designed like STL's string,
                    consider that the philosophy of STL is that it conceptually separates
                    containers, iterators and algorithms. CString's algorithms are part
                    of its class (to match its MFC heritage) so the benefit of making
                    CString a template (I would think) is pretty much nil.

                    WTL's CString has to keep close to its MFC heritage for developer
                    peace of mind/ease of use.

                    Best regards,
                    Brandon


                    --- In wtl@y..., "Vladimir Voinkov" <voinkovv@m...> wrote:
                    > But, why not to implement CString as a class template?
                    >
                    > Vladimir
                    >
                    > ----- Original Message -----
                    > From: "Nenad Stefanovic" <nenads@m...>
                    > To: <wtl@y...>
                    > Sent: Tuesday, May 08, 2001 3:16 AM
                    > Subject: RE: [wtl] Re: CString in WTL - How use in a simple console
                    app
                    > project
                    >
                    > > If you are into minimalism and a bit of a hack, why are you using
                    > > CString? ;-)
                    > >
                    > > Cheers,
                    > > Nenad (looking)
                    > >
                    > >
                    > > -----Original Message-----
                    > > From: Tim Tabor [mailto:tltabor@e...]
                    > > Sent: Monday, May 07, 2001 3:06 PM
                    > > To: wtl@y...
                    > > Subject: RE: [wtl] Re: CString in WTL - How use in a simple
                    console app
                    > > project
                    > >
                    > >
                    > > Hmm. I always just throw in one of the CModule's. If you're into
                    > > minimalism and a bit of a hack (and if Nenad isn't looking), I
                    guess you
                    > > could:
                    > >
                    > > #include <AtlBase.h>
                    > >
                    > > struct CResModule
                    > > {
                    > > HINSTANCE GetResourceInstance()
                    > > {return GetModuleHandle(0);}
                    > > };
                    > >
                    > > CResModule _Module;
                    > > #include <AtlApp.h>
                    > > #include <AtlMisc.h>
                    > >
                    > > void _tmain()
                    > > {
                    > > CString str(_T("World"));
                    > >
                    > > MessageBox(0, str, _T("Hello"), MB_OK);
                    > > }
                    > >
                    > > // tim
                    > >
                    > > > -----Original Message-----
                    > > > From: Brandon Corfman [mailto:bcorfman@a...]
                    > > > Sent: Monday, May 07, 2001 4:24 PM
                    > > > To: wtl@y...
                    > > > Subject: [wtl] Re: CString in WTL - How use in a simple console
                    app
                    > > > project
                    > > >
                    > > >
                    > > > Tim,
                    > > >
                    > > > I thought (off the top of my head) that _Module was of type
                    > > > CComModule in ATL. It doesn't seem like you'd want to
                    instantiate
                    > > > that class if you're not doing anything COM related.
                    > > >
                    > > > Please enlighten me.
                    > > >
                    > > > Brandon
                    > > >
                    > >
                    > > To unsubscribe from this group, send an email to:
                    > > wtl-unsubscribe@egroups.com
                    > >
                    > >
                    > >
                    > > Your use of Yahoo! Groups is subject to
                    > > http://docs.yahoo.com/info/terms/
                    > >
                    > >
                    > >
                    > > To unsubscribe from this group, send an email to:
                    > > wtl-unsubscribe@egroups.com
                    > >
                    > >
                    > >
                    > > Your use of Yahoo! Groups is subject to
                    http://docs.yahoo.com/info/terms/
                    > >
                    > >
                    > >
                  • Tim Tabor
                    huh?
                    Message 9 of 19 , May 8 11:20 AM
                      huh?

                      > -----Original Message-----
                      > From: Vladimir Voinkov [mailto:voinkovv@...]
                      > Sent: Tuesday, May 08, 2001 12:37 PM
                      > To: wtl@yahoogroups.com
                      > Subject: Re: [wtl] Re: CString in WTL - How use in a simple console app
                      > project
                      >
                      >
                      > But, why not to implement CString as a class template?
                      >
                      > Vladimir
                      >
                      > ----- Original Message -----
                      > From: "Nenad Stefanovic" <nenads@...>
                      > To: <wtl@yahoogroups.com>
                      > Sent: Tuesday, May 08, 2001 3:16 AM
                      > Subject: RE: [wtl] Re: CString in WTL - How use in a simple console app
                      > project
                      >
                      > > If you are into minimalism and a bit of a hack, why are you using
                      > > CString? ;-)
                      > >
                      > > Cheers,
                      > > Nenad (looking)
                      > >
                      > >
                      > > -----Original Message-----
                      > > From: Tim Tabor [mailto:tltabor@...]
                      > > Sent: Monday, May 07, 2001 3:06 PM
                      > > To: wtl@yahoogroups.com
                      > > Subject: RE: [wtl] Re: CString in WTL - How use in a simple console app
                      > > project
                      > >
                      > >
                      > > Hmm. I always just throw in one of the CModule's. If you're into
                      > > minimalism and a bit of a hack (and if Nenad isn't looking), I guess you
                      > > could:
                      > >
                      > > #include <AtlBase.h>
                      > >
                      > > struct CResModule
                      > > {
                      > > HINSTANCE GetResourceInstance()
                      > > {return GetModuleHandle(0);}
                      > > };
                      > >
                      > > CResModule _Module;
                      > > #include <AtlApp.h>
                      > > #include <AtlMisc.h>
                      > >
                      > > void _tmain()
                      > > {
                      > > CString str(_T("World"));
                      > >
                      > > MessageBox(0, str, _T("Hello"), MB_OK);
                      > > }
                      > >
                      > > // tim
                      > >
                      > > > -----Original Message-----
                      > > > From: Brandon Corfman [mailto:bcorfman@...]
                      > > > Sent: Monday, May 07, 2001 4:24 PM
                      > > > To: wtl@yahoogroups.com
                      > > > Subject: [wtl] Re: CString in WTL - How use in a simple console app
                      > > > project
                      > > >
                      > > >
                      > > > Tim,
                      > > >
                      > > > I thought (off the top of my head) that _Module was of type
                      > > > CComModule in ATL. It doesn't seem like you'd want to instantiate
                      > > > that class if you're not doing anything COM related.
                      > > >
                      > > > Please enlighten me.
                      > > >
                      > > > Brandon
                      > > >
                      > >
                      > > To unsubscribe from this group, send an email to:
                      > > wtl-unsubscribe@egroups.com
                      > >
                      > >
                      > >
                      > > Your use of Yahoo! Groups is subject to
                      > > http://docs.yahoo.com/info/terms/
                      > >
                      > >
                      > >
                      > > To unsubscribe from this group, send an email to:
                      > > wtl-unsubscribe@egroups.com
                      > >
                      > >
                      > >
                      > > Your use of Yahoo! Groups is subject to
                      > http://docs.yahoo.com/info/terms/
                      > >
                      > >
                      > >
                      >
                      >
                      > To unsubscribe from this group, send an email to:
                      > wtl-unsubscribe@egroups.com
                      >
                      >
                      >
                      > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
                      >
                      >
                    • Vladimir Voinkov
                      Hi, Brandon What reason to keep MFC compatibility? If MFC is so good what reason to design WTL? Why not to use STL, why not to use STL algorithms? Your right
                      Message 10 of 19 , May 10 1:06 AM
                        Hi, Brandon

                        What reason to keep MFC compatibility? If MFC is so good what reason to
                        design WTL?
                        Why not to use STL, why not to use STL algorithms?
                        Your right WTL needs to inherit good stuff. But if CString was designed like
                        class template there
                        is no problem like CString dependence on CModule (if no using LoadString).

                        Best regards,
                        Vladimir

                        ----- Original Message -----
                        From: "Brandon Corfman" <bcorfman@...>
                        To: <wtl@yahoogroups.com>
                        Sent: Tuesday, May 08, 2001 10:10 PM
                        Subject: [wtl] Re: CString in WTL - How use in a simple console app project


                        > Hi Vladmir,
                        >
                        > If you are asking if CString should be designed like STL's string,
                        > consider that the philosophy of STL is that it conceptually separates
                        > containers, iterators and algorithms. CString's algorithms are part
                        > of its class (to match its MFC heritage) so the benefit of making
                        > CString a template (I would think) is pretty much nil.
                        >
                        > WTL's CString has to keep close to its MFC heritage for developer
                        > peace of mind/ease of use.
                        >
                        > Best regards,
                        > Brandon
                        >
                        >
                        > --- In wtl@y..., "Vladimir Voinkov" <voinkovv@m...> wrote:
                        > > But, why not to implement CString as a class template?
                        > >
                        > > Vladimir
                        > >
                        > > ----- Original Message -----
                        > > From: "Nenad Stefanovic" <nenads@m...>
                        > > To: <wtl@y...>
                        > > Sent: Tuesday, May 08, 2001 3:16 AM
                        > > Subject: RE: [wtl] Re: CString in WTL - How use in a simple console
                        > app
                        > > project
                        > >
                        > > > If you are into minimalism and a bit of a hack, why are you using
                        > > > CString? ;-)
                        > > >
                        > > > Cheers,
                        > > > Nenad (looking)
                        > > >
                        > > >
                        > > > -----Original Message-----
                        > > > From: Tim Tabor [mailto:tltabor@e...]
                        > > > Sent: Monday, May 07, 2001 3:06 PM
                        > > > To: wtl@y...
                        > > > Subject: RE: [wtl] Re: CString in WTL - How use in a simple
                        > console app
                        > > > project
                        > > >
                        > > >
                        > > > Hmm. I always just throw in one of the CModule's. If you're into
                        > > > minimalism and a bit of a hack (and if Nenad isn't looking), I
                        > guess you
                        > > > could:
                        > > >
                        > > > #include <AtlBase.h>
                        > > >
                        > > > struct CResModule
                        > > > {
                        > > > HINSTANCE GetResourceInstance()
                        > > > {return GetModuleHandle(0);}
                        > > > };
                        > > >
                        > > > CResModule _Module;
                        > > > #include <AtlApp.h>
                        > > > #include <AtlMisc.h>
                        > > >
                        > > > void _tmain()
                        > > > {
                        > > > CString str(_T("World"));
                        > > >
                        > > > MessageBox(0, str, _T("Hello"), MB_OK);
                        > > > }
                        > > >
                        > > > // tim
                        > > >
                        > > > > -----Original Message-----
                        > > > > From: Brandon Corfman [mailto:bcorfman@a...]
                        > > > > Sent: Monday, May 07, 2001 4:24 PM
                        > > > > To: wtl@y...
                        > > > > Subject: [wtl] Re: CString in WTL - How use in a simple console
                        > app
                        > > > > project
                        > > > >
                        > > > >
                        > > > > Tim,
                        > > > >
                        > > > > I thought (off the top of my head) that _Module was of type
                        > > > > CComModule in ATL. It doesn't seem like you'd want to
                        > instantiate
                        > > > > that class if you're not doing anything COM related.
                        > > > >
                        > > > > Please enlighten me.
                        > > > >
                        > > > > Brandon
                        > > > >
                        > > >
                        > > > To unsubscribe from this group, send an email to:
                        > > > wtl-unsubscribe@egroups.com
                        > > >
                        > > >
                        > > >
                        > > > Your use of Yahoo! Groups is subject to
                        > > > http://docs.yahoo.com/info/terms/
                        > > >
                        > > >
                        > > >
                        > > > To unsubscribe from this group, send an email to:
                        > > > wtl-unsubscribe@egroups.com
                        > > >
                        > > >
                        > > >
                        > > > Your use of Yahoo! Groups is subject to
                        > http://docs.yahoo.com/info/terms/
                        > > >
                        > > >
                        > > >
                        >
                        >
                        > To unsubscribe from this group, send an email to:
                        > wtl-unsubscribe@egroups.com
                        >
                        >
                        >
                        > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
                        >
                        >
                        >
                      • andreas.magnusson@intentia.se
                        Sorry, couldn t help but replying to this subject :-) Well, in my opinion, MFC/WTL version of CString is MUCH easier to use than basic_string. The best example
                        Message 11 of 19 , May 10 2:12 AM
                          Sorry, couldn't help but replying to this subject :-)
                          Well, in my opinion, MFC/WTL version of CString is MUCH easier to use than
                          basic_string. The best example is Replace(oldSubString, newSubString). I
                          have seen an exampÄle of this, and it just didn't make sense in
                          basic_string. Of course, you could write wrappers for basic_string to
                          mimic the CString behaviour, but there is the always reoccuring gripe with
                          STL basic_string, it doesn't work in MBCS.
                          And until everyone is running Window XP, or MSLU (Miscrosoft Layer for
                          Unicode) exists, some of us HAVE to compile for Japanese customers running
                          Jap Win98, and I am pretty sure that STL string would break under these
                          conditions.

                          But while we're talkning template CString, it exisits... In VS7.Net. It
                          looks promising...

                          Andreas Magnusson, R A&T Intentia R&D AB
                          I speak on my own, and do not need my company's help




                          "Vladimir Voinkov" <voinkovv@...>
                          2001-05-10 10:06
                          Please respond to wtl


                          To: <wtl@yahoogroups.com>
                          cc:
                          Subject: Re: [wtl] Re: CString in WTL - How use in a simple console app project


                          Hi, Brandon

                          What reason to keep MFC compatibility? If MFC is so good what reason to
                          design WTL?
                          Why not to use STL, why not to use STL algorithms?
                          Your right WTL needs to inherit good stuff. But if CString was designed
                          like
                          class template there
                          is no problem like CString dependence on CModule (if no using LoadString).

                          Best regards,
                          Vladimir

                          ----- Original Message -----
                          From: "Brandon Corfman" <bcorfman@...>
                          To: <wtl@yahoogroups.com>
                          Sent: Tuesday, May 08, 2001 10:10 PM
                          Subject: [wtl] Re: CString in WTL - How use in a simple console app
                          project


                          > Hi Vladmir,
                          >
                          > If you are asking if CString should be designed like STL's string,
                          > consider that the philosophy of STL is that it conceptually separates
                          > containers, iterators and algorithms. CString's algorithms are part
                          > of its class (to match its MFC heritage) so the benefit of making
                          > CString a template (I would think) is pretty much nil.
                          >
                          > WTL's CString has to keep close to its MFC heritage for developer
                          > peace of mind/ease of use.
                          >
                          > Best regards,
                          > Brandon
                          >
                          >
                          > --- In wtl@y..., "Vladimir Voinkov" <voinkovv@m...> wrote:
                          > > But, why not to implement CString as a class template?
                          > >
                          > > Vladimir
                          > >
                          > > ----- Original Message -----
                          > > From: "Nenad Stefanovic" <nenads@m...>
                          > > To: <wtl@y...>
                          > > Sent: Tuesday, May 08, 2001 3:16 AM
                          > > Subject: RE: [wtl] Re: CString in WTL - How use in a simple console
                          > app
                          > > project
                          > >
                          > > > If you are into minimalism and a bit of a hack, why are you using
                          > > > CString? ;-)
                          > > >
                          > > > Cheers,
                          > > > Nenad (looking)
                          > > >
                          > > >
                          > > > -----Original Message-----
                          > > > From: Tim Tabor [mailto:tltabor@e...]
                          > > > Sent: Monday, May 07, 2001 3:06 PM
                          > > > To: wtl@y...
                          > > > Subject: RE: [wtl] Re: CString in WTL - How use in a simple
                          > console app
                          > > > project
                          > > >
                          > > >
                          > > > Hmm. I always just throw in one of the CModule's. If you're into
                          > > > minimalism and a bit of a hack (and if Nenad isn't looking), I
                          > guess you
                          > > > could:
                          > > >
                          > > > #include <AtlBase.h>
                          > > >
                          > > > struct CResModule
                          > > > {
                          > > > HINSTANCE GetResourceInstance()
                          > > > {return GetModuleHandle(0);}
                          > > > };
                          > > >
                          > > > CResModule _Module;
                          > > > #include <AtlApp.h>
                          > > > #include <AtlMisc.h>
                          > > >
                          > > > void _tmain()
                          > > > {
                          > > > CString str(_T("World"));
                          > > >
                          > > > MessageBox(0, str, _T("Hello"), MB_OK);
                          > > > }
                          > > >
                          > > > // tim
                          > > >
                          > > > > -----Original Message-----
                          > > > > From: Brandon Corfman [mailto:bcorfman@a...]
                          > > > > Sent: Monday, May 07, 2001 4:24 PM
                          > > > > To: wtl@y...
                          > > > > Subject: [wtl] Re: CString in WTL - How use in a simple console
                          > app
                          > > > > project
                          > > > >
                          > > > >
                          > > > > Tim,
                          > > > >
                          > > > > I thought (off the top of my head) that _Module was of type
                          > > > > CComModule in ATL. It doesn't seem like you'd want to
                          > instantiate
                          > > > > that class if you're not doing anything COM related.
                          > > > >
                          > > > > Please enlighten me.
                          > > > >
                          > > > > Brandon
                          > > > >
                          > > >
                          > > > To unsubscribe from this group, send an email to:
                          > > > wtl-unsubscribe@egroups.com
                          > > >
                          > > >
                          > > >
                          > > > Your use of Yahoo! Groups is subject to
                          > > > http://docs.yahoo.com/info/terms/
                          > > >
                          > > >
                          > > >
                          > > > To unsubscribe from this group, send an email to:
                          > > > wtl-unsubscribe@egroups.com
                          > > >
                          > > >
                          > > >
                          > > > Your use of Yahoo! Groups is subject to
                          > http://docs.yahoo.com/info/terms/
                          > > >
                          > > >
                          > > >
                          >
                          >
                          > To unsubscribe from this group, send an email to:
                          > wtl-unsubscribe@egroups.com
                          >
                          >
                          >
                          > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
                          >
                          >
                          >


                          To unsubscribe from this group, send an email to:
                          wtl-unsubscribe@egroups.com



                          Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
                        • Tim Tabor
                          This argument makes no sense to me. If basic_string is so good, why don t you use it instead of CString? Compatibility with an earlier product doesn t make a
                          Message 12 of 19 , May 10 6:05 AM
                            This argument makes no sense to me. If basic_string is so
                            good, why don't you use it instead of CString? Compatibility
                            with an earlier product doesn't make a later product redundant.

                            // tim

                            > -----Original Message-----
                            > From: Vladimir Voinkov [mailto:voinkovv@...]
                            > Sent: Thursday, May 10, 2001 4:06 AM
                            > To: wtl@yahoogroups.com
                            > Subject: Re: [wtl] Re: CString in WTL - How use in a simple console app
                            > project
                            >
                            >
                            > Hi, Brandon
                            >
                            > What reason to keep MFC compatibility? If MFC is so good what reason to
                            > design WTL?
                            > Why not to use STL, why not to use STL algorithms?
                            > Your right WTL needs to inherit good stuff. But if CString was
                            > designed like
                            > class template there
                            > is no problem like CString dependence on CModule (if no using LoadString).
                            >
                            > Best regards,
                            > Vladimir
                          • Brandon Corfman
                            Vladimir, As Tim alluded to, WTL doesn t restrict you to use any particular string type -- personally, I use std::string most of the time. CString is just
                            Message 13 of 19 , May 10 6:23 AM
                              Vladimir,

                              As Tim alluded to, WTL doesn't restrict you to use any particular
                              string type -- personally, I use std::string most of the time.

                              CString is just there to ease the MFC programmer's transition to WTL.
                              Oh, and that handy .Format() command for float-to-string! ;D

                              Best regards,
                              Brandon


                              --- In wtl@y..., "Vladimir Voinkov" <voinkovv@m...> wrote:
                              > Hi, Brandon
                              >
                              > What reason to keep MFC compatibility? If MFC is so good what
                              reason to
                              > design WTL?
                              > Why not to use STL, why not to use STL algorithms?
                              > Your right WTL needs to inherit good stuff. But if CString was
                              designed like
                              > class template there
                              > is no problem like CString dependence on CModule (if no using
                              LoadString).
                              >
                              > Best regards,
                              > Vladimir
                              >
                            • Tim Tabor
                              I didn t mean to suggest that CString is better than basic_string, BTW. Sometimes you need a flat screwdriver, and sometimes a Phillips. It s nice to have both
                              Message 14 of 19 , May 10 6:26 AM
                                I didn't mean to suggest that CString is better than basic_string,
                                BTW. Sometimes you need a flat screwdriver, and sometimes a Phillips.
                                It's nice to have both screwdrivers in your toolbox, and it's
                                *really* nice not to have only a hammer when you need a screwdriver.

                                Joe O'Leary, posted an interesting comparison of CString
                                and basic_string:

                                http://groups.google.com/groups?q=+%22Cool+things+about+CString%22+author:o%
                                27leary&num=100&hl=en&lr=lang_en&safe=off&scoring=r&rnum=1&ic=1&selm=yDyt4.4
                                043%24pP5.81788%40newsread1.prod.itd.earthlink.net

                                // tim

                                > -----Original Message-----
                                > From: Tim Tabor [mailto:tltabor@...]
                                > Sent: Thursday, May 10, 2001 9:06 AM
                                > To: wtl@yahoogroups.com
                                > Subject: RE: [wtl] Re: CString in WTL - How use in a simple console app
                                > project
                                >
                                >
                                > This argument makes no sense to me. If basic_string is so
                                > good, why don't you use it instead of CString? Compatibility
                                > with an earlier product doesn't make a later product redundant.
                                >
                                > // tim
                                >
                                > > -----Original Message-----
                                > > From: Vladimir Voinkov [mailto:voinkovv@...]
                                > > Sent: Thursday, May 10, 2001 4:06 AM
                                > > To: wtl@yahoogroups.com
                                > > Subject: Re: [wtl] Re: CString in WTL - How use in a simple console app
                                > > project
                                > >
                                > >
                                > > Hi, Brandon
                                > >
                                > > What reason to keep MFC compatibility? If MFC is so good what reason to
                                > > design WTL?
                                > > Why not to use STL, why not to use STL algorithms?
                                > > Your right WTL needs to inherit good stuff. But if CString was
                                > > designed like
                                > > class template there
                                > > is no problem like CString dependence on CModule (if no using
                                > LoadString).
                                > >
                                > > Best regards,
                                > > Vladimir
                                >
                                >
                                > To unsubscribe from this group, send an email to:
                                > wtl-unsubscribe@egroups.com
                                >
                                >
                                >
                                > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
                                >
                                >
                              • Vladimir Voinkov
                                Seams to me, it is better: template class CStringT { T* m_str; ... }; typedef CStringT CString; Instead of: class CString { TCHAR m_str; ... };
                                Message 15 of 19 , May 10 6:26 AM
                                  Seams to me, it is better:

                                  template<class T>
                                  class CStringT
                                  {
                                  T* m_str;
                                  ...
                                  };
                                  typedef CStringT<TCHAR> CString;

                                  Instead of:

                                  class CString
                                  {
                                  TCHAR m_str;
                                  ...
                                  };

                                  It is more flexible.

                                  Best regards,
                                  Vladimir



                                  ----- Original Message -----
                                  From: "Tim Tabor" <tltabor@...>
                                  To: <wtl@yahoogroups.com>
                                  Sent: Thursday, May 10, 2001 5:05 PM
                                  Subject: RE: [wtl] Re: CString in WTL - How use in a simple console app
                                  project


                                  > This argument makes no sense to me. If basic_string is so
                                  > good, why don't you use it instead of CString? Compatibility
                                  > with an earlier product doesn't make a later product redundant.
                                  >
                                  > // tim
                                  >
                                  > > -----Original Message-----
                                  > > From: Vladimir Voinkov [mailto:voinkovv@...]
                                  > > Sent: Thursday, May 10, 2001 4:06 AM
                                  > > To: wtl@yahoogroups.com
                                  > > Subject: Re: [wtl] Re: CString in WTL - How use in a simple console app
                                  > > project
                                  > >
                                  > >
                                  > > Hi, Brandon
                                  > >
                                  > > What reason to keep MFC compatibility? If MFC is so good what reason to
                                  > > design WTL?
                                  > > Why not to use STL, why not to use STL algorithms?
                                  > > Your right WTL needs to inherit good stuff. But if CString was
                                  > > designed like
                                  > > class template there
                                  > > is no problem like CString dependence on CModule (if no using
                                  LoadString).
                                  > >
                                  > > Best regards,
                                  > > Vladimir
                                  >
                                  >
                                  > To unsubscribe from this group, send an email to:
                                  > wtl-unsubscribe@egroups.com
                                  >
                                  >
                                  >
                                  > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
                                  >
                                  >
                                  >
                                Your message has been successfully submitted and would be delivered to recipients shortly.