succeeded918 | 1 Sep 2005 03:56
Picon
Favicon

could i use CString in this way

void func(CString& str)
{
  str = L"Will this lead to memory leak?";
}

CString str;
func(str);

is there any memory leak problem? 
i'm not sure because i rarely saw people use CString like this;
most function would look like this
func(LPCTSTR lpStr, int nMax)
{
.
}

------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/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)

Igor Tandetnik | 1 Sep 2005 04:10
Favicon

Re: could i use CString in this way

"succeeded918" <iunknown918@...>
wrote in message news:df5n4k+93m4@...
> void func(CString& str)
> {
>  str = L"Will this lead to memory leak?";
> }
>
> CString str;
> func(str);
>
>
> is there any memory leak problem?

No there is not.

> i'm not sure because i rarely saw people use CString like this;

That's a pretty common idiom, actually.

> most function would look like this
> func(LPCTSTR lpStr, int nMax)

Those are C-style functions, mostly found in APIs that want to be 
compatible with C. MFC routinely wraps such functions into wrappers that 
take CString&. See CWnd::GetWindowText as an example. WTL probably has a 
few examples too, but I'm too lazy to look right now.
--

-- 
With best wishes,
    Igor Tandetnik

(Continue reading)

akshayhh | 1 Sep 2005 07:25

CanimateCtrl problem

In My ATL code. I have one dialog box. I added Animate control on 
dialog box . 
I want display that control while dialog box display. 

I used CanimateCtrl    WTL class. I written code on OnInitDialog  of 
dialog box 

LRESULT CDBSearchDlg::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM 
lParam, BOOL& bHandled)
{	
       CAnimateCtrl	c_oProcessingAnim;
		
       HINSTANCE a_hInstance = (HINSTANCE)LoadLibrary( _T
("Shell32.dll") );
      c_oProcessingAnim.SendMessage( ACM_OPEN, (WPARAM)a_hInstance,  
(LPARAM)MAKEINTRESOURCE( 151 ) );
       FreeLibrary( a_hInstance );
      return 0;	
}

As soon as execute code , it gives me assersion error . 

----------------------------------------------------------------------
--------------------------------------
Error message . 

Debug Assersion Failed ! 

Program : C\DL5140\Dlink4.exe 
File: C:\Program Files\Microsoft Visual Studio\VC98
(Continue reading)

divya rao | 1 Sep 2005 06:58
Picon
Favicon

please tell me about CString

Please tell me how will use CString in my code?I am a newbie.

		
---------------------------------
 Yahoo! India Matrimony: Find your partner online.
Go to http://yahoo.shaadi.com

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

------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/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@...

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

Philip Taron | 1 Sep 2005 07:46
Picon
Gravatar

Re: CanimateCtrl problem

It doesn't look like you created the window.

Philip

On 8/31/05, akshayhh <AkshayFedEx@...> wrote:
> 
> In My ATL code. I have one dialog box. I added Animate control on
> dialog box .
> I want display that control while dialog box display.
> 
> I used CanimateCtrl WTL class. I written code on OnInitDialog of
> dialog box
> 
> 
> LRESULT CDBSearchDlg::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM
> lParam, BOOL& bHandled)
> {
> CAnimateCtrl c_oProcessingAnim;
> 
> HINSTANCE a_hInstance = (HINSTANCE)LoadLibrary( _T
> ("Shell32.dll") );
> c_oProcessingAnim.SendMessage( ACM_OPEN, (WPARAM)a_hInstance,
> (LPARAM)MAKEINTRESOURCE( 151 ) );
> FreeLibrary( a_hInstance );
> return 0;
> }
> 
> 
> As soon as execute code , it gives me assersion error .
> 
(Continue reading)

Istvan Nagy | 1 Sep 2005 10:56
Picon

ATL 70 - ATL 71

Hi!

I built a COM dll module for an application of mine, using ATL70.DLL
On certain versions of Windows XP only ATL71 dll is installed,
therefore my dll would not register with regsvr32. What solution
should I adopt so that my dll would register correctly with both
versions of ATL7x.dll?

Thanks,
Istvan

------------------------ Yahoo! Groups Sponsor --------------------~--> 
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/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@...

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

Serhiy Serbin | 1 Sep 2005 10:59

RE: ATL 70 - ATL 71

Hi,
	you have to deploy this dll with your application. Look in MSDN
should be topic about it. 

Best Regards,
Serhiy Serbin 
-----Original Message-----
From: wtl@...
[mailto:wtl@...] On Behalf Of
Istvan Nagy
Sent: Thursday, September 01, 2005 10:57
To: wtl@...
Subject: [wtl] ATL 70 - ATL 71

Hi!

I built a COM dll module for an application of mine, using ATL70.DLL On
certain versions of Windows XP only ATL71 dll is installed, therefore my
dll would not register with regsvr32. What solution should I adopt so
that my dll would register correctly with both versions of ATL7x.dll?

Thanks,
Istvan

------------------------ Yahoo! Groups Sponsor --------------------~-->
Most low income households are not online. Help bridge the digital
divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/saFolB/TM
--------------------------------------------------------------------~-> 

(Continue reading)

Roger Headrick | 1 Sep 2005 12:21
Picon
Favicon

Re: please tell me about CString

--- In wtl@..., divya rao <divyarao22782 <at> y...> wrote:
> Please tell me how will use CString in my code?I am a newbie.
>  
> 

If you are using Visual Studio 7 or higher (i.e. Visual Studio 2002 
or higher), then you can use the CString class that is shared by ATL 
and MFC.  After you've created a project with the WTL app wizard, 
open the project's stdafx.h file and include the atlstr.h header 
file immediately after atlbase.h, so that stdafx.h in part looks 
like this:

#include <atlbase.h>
#include <atlstr.h>
#include <atlapp.h>

If instead you are using Visual Studio 6, then you must use WTL's 
CString class which is in the atlmisc.h header file that comes with 
WTL.  In this case, after you've created a project with the WTL 
wizard, open the project's main source code file (i.e. cpp file) and 
include atlmisc.h before atlctrls.h.

In either case, the documentation in Visual Studio's Help and at 
MSDN on the CString class and CStringT class is applicable.  Visual 
Studio's Help and MSDN describes CString's members and operators and 
has examples.

-Roger  

------------------------ Yahoo! Groups Sponsor --------------------~--> 
(Continue reading)

MB | 1 Sep 2005 13:52
Picon
Favicon

Port of CString to Boost.StringAlgorithm and Boost.Regex

Hi, supreme gurus.

I find Boost.Range interesting.
I find also that Boost.StringAlgorithm works
with ATL/WTL CString through Range interfaces.
(Boost.Range library has those of MFC::CString, though they are
incomplete.)
I have already written the code, but
I'm afraid somebody has already done it.
Have you ever seen it anywhere else?

In terms of Boost.Regex, it has interfaces of ATL::CString without
WTL::CString.
I bet somebody has already done it. Or how about...?

Regards,
MB
http://p-stade.sourceforge.net/

------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/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 Sep 2005 14:00
Picon
Favicon

Re: CanimateCtrl problem

--- In wtl@..., "akshayhh" <AkshayFedEx <at> n...> wrote:
> In My ATL code. I have one dialog box. I added Animate control on 
> dialog box . 
> I want display that control while dialog box display. 
> 
> I used CanimateCtrl    WTL class. I written code on OnInitDialog  
of 
> dialog box 
> 
> 
> LRESULT CDBSearchDlg::OnInitDialog(UINT uMsg, WPARAM wParam, 
LPARAM 
> lParam, BOOL& bHandled)
> {	
>        CAnimateCtrl	c_oProcessingAnim;
> 		

You need to assign the control's window handle to the instance of 
CAnimateCtrl.  Below assumes the id of the control is IDC_ANIMATE1:

CAnimateCtrl c_oProcessingAnim = GetDlgItem(IDC_ANIMATE1);

Also, in your app's call to AtlInitCommonControls (which is 
typically found in your app's main source code file) add the 
ICC_ANIMATE_CLASS flag.

-Roger

------------------------ Yahoo! Groups Sponsor --------------------~--> 
Most low income households are not online. Help bridge the digital divide today!
(Continue reading)


Gmane