Is there a method in CString equivalent to std::string::replace?

Hi.

How can I replace a substring in a CString? Isn't there an equvalent
CString method? For example I can write:

std::string s("C:\Temp\Some")
s.replace(s.begin()+8, s.end(), "*.*", 3);

After replacing 's' contains "C:\Temp\*.*";

How to implement this using 'CString'?

Thanks in advance
Martin

0
martin-g (64)
4/5/2007 10:59:28 AM
vc.mfc 33608 articles. 0 followers. Follow

14 Replies
909 Views

Similar Articles

[PageSpeed] 40

No, 'CStringT::Replace' does quite a different thing:

A snip from MSDN:

int Replace(
   PCXSTR pszOld,
   PCXSTR pszNew
);
int Replace(
   XCHAR chOld,
   XCHAR chNew
);

This function replaces instances of the specified character or
substring with instances of the new character or substring.


On Apr 5, 6:21 pm, "Check Abdoul" <check abdoul at mvps dot org>
wrote:
>     Take a look at the Replace()  member function.
>
> Cheers
> Check Abdoul
> ---------------------

0
martin-g (64)
4/5/2007 12:59:09 PM
you can use the combination of Delete and Insert
"Martin" <martin-g@mail.ru> wrote in message 
news:1175777949.605611.76530@y66g2000hsf.googlegroups.com...
> No, 'CStringT::Replace' does quite a different thing:
>
> A snip from MSDN:
>
> int Replace(
>   PCXSTR pszOld,
>   PCXSTR pszNew
> );
> int Replace(
>   XCHAR chOld,
>   XCHAR chNew
> );
>
> This function replaces instances of the specified character or
> substring with instances of the new character or substring.
>
>
> On Apr 5, 6:21 pm, "Check Abdoul" <check abdoul at mvps dot org>
> wrote:
>>     Take a look at the Replace()  member function.
>>
>> Cheers
>> Check Abdoul
>> ---------------------
> 


0
mubi (159)
4/5/2007 1:16:24 PM
    Take a look at the Replace()  member function.

Cheers
Check Abdoul
---------------------

"Martin" <martin-g@mail.ru> wrote in message 
news:1175770768.539469.127420@l77g2000hsb.googlegroups.com...
> Hi.
>
> How can I replace a substring in a CString? Isn't there an equvalent
> CString method? For example I can write:
>
> std::string s("C:\Temp\Some")
> s.replace(s.begin()+8, s.end(), "*.*", 3);
>
> After replacing 's' contains "C:\Temp\*.*";
>
> How to implement this using 'CString'?
>
> Thanks in advance
> Martin
> 


0
Check
4/5/2007 1:21:43 PM
On Apr 5, 6:16 pm, "Mubashir Khan" <m...@yahoo.com> wrote:
> you can use the combination of Delete and Insert"Martin" <marti...@mail.ru> wrote in message
>
> news:1175777949.605611.76530@y66g2000hsf.googlegroups.com...
>
>
>
> > No, 'CStringT::Replace' does quite a different thing:
>
> > A snip from MSDN:
>
> > int Replace(
> >   PCXSTR pszOld,
> >   PCXSTR pszNew
> > );
> > int Replace(
> >   XCHAR chOld,
> >   XCHAR chNew
> > );
>
> > This function replaces instances of the specified character or
> > substring with instances of the new character or substring.
>
> > On Apr 5, 6:21 pm, "Check Abdoul" <check abdoul at mvps dot org>
> > wrote:
> >>     Take a look at the Replace()  member function.
>
> >> Cheers
> >> Check Abdoul
> >> ---------------------- Hide quoted text -
>
> - Show quoted text -

Hehe, I know. But it's strange for CStringT to lack such a
functionality...

0
martin-g (64)
4/5/2007 1:38:15 PM
"Martin" <martin-g@mail.ru> wrote in message 
news:1175770768.539469.127420@l77g2000hsb.googlegroups.com...
> Hi.
>
> How can I replace a substring in a CString? Isn't there an equvalent
> CString method? For example I can write:
>
> std::string s("C:\Temp\Some")
> s.replace(s.begin()+8, s.end(), "*.*", 3);
>
> After replacing 's' contains "C:\Temp\*.*";
>
> How to implement this using 'CString'?
>

You're right, there doesn't seem to be a member function for this.  Most of 
us treat CString as an immutable object, so we would do something like

  s = s.Left(8) + _T("*.*");

You could always do :

  LPTSTR p = s.LockBuffer();
  lstrcpy (p+8, _T("*.*"));
  s.UnlockBuffer();

but I would not recommend this.


-- David 


0
dc2983 (3206)
4/5/2007 2:22:56 PM
There's no equivalent of this.  I'd consider

CString s = _T("C:\Temp\Some");
int n = s.ReverseFind(_T("\\"));
s = s.Left(n) + _T("*.*");

(error checking left as an Exercise For The Reader)
				joe

On 5 Apr 2007 03:59:28 -0700, "Martin" <martin-g@mail.ru> wrote:

>Hi.
>
>How can I replace a substring in a CString? Isn't there an equvalent
>CString method? For example I can write:
>
>std::string s("C:\Temp\Some")
>s.replace(s.begin()+8, s.end(), "*.*", 3);
>
>After replacing 's' contains "C:\Temp\*.*";
>
>How to implement this using 'CString'?
>
>Thanks in advance
>Martin
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
4/5/2007 3:47:31 PM
A bigger problem for this kind of thing is that it is really difficult to 
extend CString to add functionality, but as others have shown you it's 
pretty easy to work around it if you only need to do it once and it is scary 
to assume the placement of the characters anyway.

Tom

"Martin" <martin-g@mail.ru> wrote in message 
news:1175770768.539469.127420@l77g2000hsb.googlegroups.com...
> Hi.
>
> How can I replace a substring in a CString? Isn't there an equvalent
> CString method? For example I can write:
>
> std::string s("C:\Temp\Some")
> s.replace(s.begin()+8, s.end(), "*.*", 3);
>
> After replacing 's' contains "C:\Temp\*.*";
>
> How to implement this using 'CString'?
>
> Thanks in advance
> Martin
> 

0
tom.nospam (3240)
4/5/2007 4:14:32 PM
I assumed the +8 was illustrative because it is unlikely anyone would be silly enough to
actually wire a number like that into a program.
					joe

On Thu, 5 Apr 2007 09:14:32 -0700, "Tom Serface" <tom.nospam@camaswood.com> wrote:

>A bigger problem for this kind of thing is that it is really difficult to 
>extend CString to add functionality, but as others have shown you it's 
>pretty easy to work around it if you only need to do it once and it is scary 
>to assume the placement of the characters anyway.
>
>Tom
>
>"Martin" <martin-g@mail.ru> wrote in message 
>news:1175770768.539469.127420@l77g2000hsb.googlegroups.com...
>> Hi.
>>
>> How can I replace a substring in a CString? Isn't there an equvalent
>> CString method? For example I can write:
>>
>> std::string s("C:\Temp\Some")
>> s.replace(s.begin()+8, s.end(), "*.*", 3);
>>
>> After replacing 's' contains "C:\Temp\*.*";
>>
>> How to implement this using 'CString'?
>>
>> Thanks in advance
>> Martin
>> 
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
4/5/2007 7:49:27 PM
Well, I've seen stranger things and any routine written to generalize this 
sort of operation would likely want to preclude that sort of thing from 
happening.  I would most likely do something like:

CString cs = _T("C:\\MyPath\\OldFileSpec.*");
CString csNewPath = AddPathAndFile(GetFolderOnly(cs),_T("*.*"));

Which is very similar to what you suggested only using the SHLWAPI 
functions.  I wish that CString was easy to extend so that we could create 
CMyString, but, alas, it is what it is.

Tom

//
// Returns the folder portion from a path
//
CString GetFolderOnly(LPCTSTR Path)
{
    // Strip off the file name so we can direct the file scanning dialog to 
go
    // back to the same directory as before.
     CString temp = (LPCTSTR) Path; // Force CString to make a copy
     ::PathRemoveFileSpec(temp.GetBuffer(0));
     temp.ReleaseBuffer(-1);
     return temp;
}

//
// Adds a folder path and file together to make a file path
//
CString AddPathAndFile(LPCTSTR Folder, LPCTSTR File)
{
     CString cs = Folder;
     ::PathAddBackslash(cs.GetBuffer(_MAX_PATH));
     ::PathAppend(cs.GetBuffer(_MAX_PATH),File);
     cs.ReleaseBuffer(-1);
     return cs;
}

"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
news:4lka13tiulb7k23s4aet4fscb2agn2t4g6@4ax.com...
>I assumed the +8 was illustrative because it is unlikely anyone would be 
>silly enough to
> actually wire a number like that into a program.
> joe

0
tom.nospam (3240)
4/5/2007 8:45:54 PM
BTW, I mistakenly added this to your message.  I really meant it for OP. 
Apologies.

Tom

"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
news:4lka13tiulb7k23s4aet4fscb2agn2t4g6@4ax.com...
>I assumed the +8 was illustrative because it is unlikely anyone would be 
>silly enough to
> actually wire a number like that into a program.
> joe

0
tom.nospam (3240)
4/5/2007 8:47:49 PM
Thank you guys! Only in the process of using MFC, especially its
containers, I understood how well STL is thought-out.

Martin

0
martin-g (64)
4/6/2007 3:31:40 PM
See below...
On Thu, 05 Apr 2007 14:22:56 GMT, "David Ching" <dc@remove-this.dcsoft.com> wrote:

>"Martin" <martin-g@mail.ru> wrote in message 
>news:1175770768.539469.127420@l77g2000hsb.googlegroups.com...
>> Hi.
>>
>> How can I replace a substring in a CString? Isn't there an equvalent
>> CString method? For example I can write:
>>
>> std::string s("C:\Temp\Some")
>> s.replace(s.begin()+8, s.end(), "*.*", 3);
>>
>> After replacing 's' contains "C:\Temp\*.*";
>>
>> How to implement this using 'CString'?
>>
>
>You're right, there doesn't seem to be a member function for this.  Most of 
>us treat CString as an immutable object, so we would do something like
>
>  s = s.Left(8) + _T("*.*");
>
>You could always do :
>
>  LPTSTR p = s.LockBuffer();
>  lstrcpy (p+8, _T("*.*"));
>  s.UnlockBuffer();
>
>but I would not recommend this.
****
This would work only as long as the replacement ("*'*") is equal or shorter in length to
what was already there.  If the string was

c:\temp\a

then the above solution would overwrite whatever was beyond the string buffer, causing
serius damage.
					joe

>
>
>-- David 
>
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
4/7/2007 5:47:07 PM
Hi, Tom!
Your code is OK.
However, you could make it one line shorter (I mean your  AddPathAndFile(..) 
implementation) :)
You don't need to call PathAddBackslash before PathAppend since, according 
to MSDN, PathAppend "... automatically inserts a backslash between the two 
strings, if one is not already present".

Regards,
Victor

"Tom Serface" <tom.nospam@camaswood.com> wrote in message 
news:E0436BB1-0088-4815-A556-FC3A8BB14501@microsoft.com...
> Well, I've seen stranger things and any routine written to generalize this 
> sort of operation would likely want to preclude that sort of thing from 
> happening.  I would most likely do something like:
>
> CString cs = _T("C:\\MyPath\\OldFileSpec.*");
> CString csNewPath = AddPathAndFile(GetFolderOnly(cs),_T("*.*"));
>
> Which is very similar to what you suggested only using the SHLWAPI 
> functions.  I wish that CString was easy to extend so that we could create 
> CMyString, but, alas, it is what it is.
>
> Tom
>
> //
> // Returns the folder portion from a path
> //
> CString GetFolderOnly(LPCTSTR Path)
> {
>    // Strip off the file name so we can direct the file scanning dialog to 
> go
>    // back to the same directory as before.
>     CString temp = (LPCTSTR) Path; // Force CString to make a copy
>     ::PathRemoveFileSpec(temp.GetBuffer(0));
>     temp.ReleaseBuffer(-1);
>     return temp;
> }
>
> //
> // Adds a folder path and file together to make a file path
> //
> CString AddPathAndFile(LPCTSTR Folder, LPCTSTR File)
> {
>     CString cs = Folder;
>     ::PathAddBackslash(cs.GetBuffer(_MAX_PATH));
>     ::PathAppend(cs.GetBuffer(_MAX_PATH),File);
>     cs.ReleaseBuffer(-1);
>     return cs;
> }
>
> "Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
> news:4lka13tiulb7k23s4aet4fscb2agn2t4g6@4ax.com...
>>I assumed the +8 was illustrative because it is unlikely anyone would be 
>>silly enough to
>> actually wire a number like that into a program.
>> joe
> 


0
4/7/2007 6:15:09 PM
Hey, good point.  I learned something new.  I use that code all the time so 
I'll update it.

Thanks

Tom

"Victor" <nijegorodov.otpusk@freenet.de> wrote in message 
news:ODvYqCUeHHA.4564@TK2MSFTNGP03.phx.gbl...
> Hi, Tom!
> Your code is OK.
> However, you could make it one line shorter (I mean your 
> AddPathAndFile(..) implementation) :)
> You don't need to call PathAddBackslash before PathAppend since, according 
> to MSDN, PathAppend "... automatically inserts a backslash between the two 
> strings, if one is not already present".
>
> Regards,
> Victor

0
tom.nospam (3240)
4/8/2007 4:27:33 AM
Reply:

Similar Artilces:

(New Object).Method
Is there a simpler acceptable syntax for (New Class).Method than With New Class .Method End With In VB.NET you can use Call Call (New Class).Method but this syntax is not acceptable in VB6 (with or without the () at the end). FYI I am looking for VB6 and VB.NET answers, if they are different. (Using Call in VB.NET is "acceptable", I'm just wondering if there is an alternative syntax I haven't thought of.) BTW Note that if you define an "identity" function: Function Identity(ByVal C As Class) As Class Identity = C End Function (And...

Can I Install SQL Express on SBS 2008 Std.?
I have a standard version of SBS 2008 (64-bit). SQL is installed by default for SBSMonitoring and other services. I'd like to be able to use this copy of SQL to host one of my own tables. I need to be able to connect to the database from one of my desktops in my network. When creating a System DSN to make the connection it returns server not found or permission denied. I'm using windows authentication for the DNS. I am able to manage the SQL instance when logged into the server itself but not remotely from the desktop. Is not possible or am I doing something wrong? ...

Int to CString conversion
Is there a simple function that can convert from an int to CString? TIA Tony "Tony" <lazyherbert@homeandresting.com> wrote in message news:e7TjX6EgEHA.3428@TK2MSFTNGP11.phx.gbl... > Is there a simple function that can convert from an int to CString? > > TIA > > Tony > > int SomeIntegerValueThatYouWantToConvert; CString temp; temp.Format("%d", SomeIntegerValueThatYouWantToConvert); "Bill Thompson" <billt61@rgv.rr.com> wrote in message > > int SomeIntegerValueThatYouWantToConvert; > CString temp; > temp.Format(&q...

pass CString?
I want to pass an array of UINT to another window through postmessage. in first winodw, dump those data to the string using string.Format. In the next window, I have to calulate the length and use atoi to get the data. Any other simpler way of doing this? I got to use the CString object to pass around, cause sometimes, I have to pass string. thanks sscanf "Patrick Zou" <patrick_zou@no_spam_hotmail.com> wrote in message news:OkiWLdeZEHA.2500@TK2MSFTNGP09.phx.gbl... > I want to pass an array of UINT to another window through postmessage. in > first winodw, dump those d...

Random replacement of data in a cell with a #####
I've opened up some saved spread sheets and a few random cells display ##### instead of the data that was entered. When placing the cursor over the cell the correct data shows in a balloon. Deleting the ###### and attempting to replace the data doesn't work, the ###### just reappears. How can I fix this???? HI Just widen the columns where the #####'s appear -- Regards Roger Govier "hondo" <hondo@discussions.microsoft.com> wrote in message news:C9B1E7C4-3B96-4FED-81E3-38D0DFEB9230@microsoft.com... > I've opened up some saved spread she...

ReadBinHex method
Hi, I'm trying to read binary information from an XMLTextReader and to save it to a .jpg file, using a FileStream. I don't want to use an XmlDocument because of performance reasons. But the only example code I could find is: byte[] binhex = new byte[1000]; do { binhexlen = reader.ReadBinHex(binhex, 0, 50); for (int i=0; i < binhexlen; i++) Console.Write(binhex[i]); } while (reader.Name == "BinHex"); Is there any way to discover the length of the binary data on beforehand? Or can someone give me a hint on how to complete my code her...

Should my properties be a method or set by a method
I am in the process of building a VB6 class that represents the Windows startbutton. Currently it has two properties, one to set the caption of the button and one to enable or disable it. Currently setting either property sets that property of the actual start button. Should I be setting these properties via a method? "Leo" <Leo@discussions.microsoft.com> wrote > I am in the process of building a VB6 class that represents the Windows > startbutton. Currently it has two properties, one to set the caption of the > button and one to enable or disable it. Cu...

Evaluate Method.
Hi, I need help with evaluate Method. What I am trying to do is write for loop for following. UserForm2.Label1.Caption = "" UserForm2.Label2.Caption = "" UserForm2.Label3.Caption = "" UserForm2.Label4.Caption = "" UserForm2.Label5.Caption = "" UserForm2.Label6.Caption = "" UserForm2.Label7.Caption = "" UserForm2.Label8.Caption = "" I tried this(below) and many other thing, but nothing seem to work. Any suggestion on making this work? For i = 1 T...

Object dosent support this property or method
This code behind a command button should check to see if a record exists and open a form with that data if it does. If record does not exist it will open the form in data entry mode. I don't understand this error??? Private Sub cmdMember_Click() On Error GoTo Err_cmdMember_Click Dim stDocName As String Dim stLinkCriteria As String Dim dbcurrent As DAO.Database Dim rstemp As DAO.Recordset If IsNull([cmdMember]) Then MsgBox "Please enter a Member # before proceeding." Exit Sub Else 'Check to see if a record already exis...

Overtime Methods
I can't seem to find any information on how the overtime methods work in Advanced Payroll. I have read the online manual and looked in Knowledgebase, but I can't find anything about it. Any ideas where I can get help with this? Perhaps a kb number or something? Thanks! Tracey D What manual are you reading? For the overtime rates you need to read the overtime rate manager manual. You should be able to download it from CustomerSource. You can also send an e-mail to me. Take out the "nospam" part of the address. -- Charles Allen, MVP "Tracey D" wrote: ...

new string started on PF contact folder issue
Thanks so much for taking the time to look at my question. I wanted to clear the air on my original message, I think it had some confusing/incorrect syntax. As I re-read my post, it doesn't make sense, so I'll rephrase. Forget all the references to the GAL as in my 1st post. When the SBS server user creates a PF containg contact items, by default the properties/OAB tab/'show this folder as an email address list' ISN'T ticked. When he does tick it on the server-side, the Outlook 2003 clients open a new email clicks on To: and in the address lists available, the newly c...

Is there a method in CString equivalent to std::string::replace?
Hi. How can I replace a substring in a CString? Isn't there an equvalent CString method? For example I can write: std::string s("C:\Temp\Some") s.replace(s.begin()+8, s.end(), "*.*", 3); After replacing 's' contains "C:\Temp\*.*"; How to implement this using 'CString'? Thanks in advance Martin No, 'CStringT::Replace' does quite a different thing: A snip from MSDN: int Replace( PCXSTR pszOld, PCXSTR pszNew ); int Replace( XCHAR chOld, XCHAR chNew ); This function replaces instances of the specified character or subs...

CString problem?
hello, CString str; str="hello wolrd"; how can i get first 4 letter of str? is there any function to get it? sorry i am new in visual c++ field, thanks halmuratov@gmail.com wrote: > hello, > > CString str; > str="hello wolrd"; > > how can i get first 4 letter of str? > > is there any function to get it? > > sorry i am new in visual c++ field, halmuratov: CString::Left(); You should be able to find this in the Help. If you know the name of the class, just look at the members (for CString in VS2002 and up you actually have to look...

change valuation method
1. My company uses standard costing (FIFO periodic) on all items. We want to move to FIFO perpetual for one group of items. We do not want to create brand new items. What is the best way to convert the existing items in Great Plains from FIFO periodic to FIFO perpetual. 2. We tried changing overhead accounts on one item and got the error that you cant edit this account number as there are unposted receipts for this item. What tables do I check for this. We use manufacturing module too and are on GP 8. 3. When we receive an item on purchase receipt, we get PPV and also material overhead entri...

CheckHealth Method
Hi All, I want to confirm something related to CheckHealth method. I've read somewhere that if during operation for device say PosPrinter PrintNormal some error/exception occurs and you want to make sure this error is because of device like out of paper use the checkHealth internal method if it gives exception then indeed device is in error case i.e its not healthy. The problem is if I use External Health it gives me correct error in case paper is out but Internal Check Health returns ok. As per my understanding both should return error or exception. Am I right in my understa...

Pro VS Std suite user and workflow automation
If a Pro user creates a workflow rule can the std suite user apply that rule to an account they own? You cannot have Professional and Standard licences for the same module in the same deployment. thgus, the only way that this could work is with Sales professional and Standard Service, or Service Professional and Sales Standard. You could not have Suite Standard users in the same deployment as any Professional users. "Tony@lanit" wrote: > If a Pro user creates a workflow rule can the std suite user apply that rule > to an account they own? ...

CView method
I have a CView class which is instatiated as a runtime class. I have overridden the OnCreate( ) method but it never gets called. Here is how I the CView (MyView) object is created: pDocTemplate = new CMultiDocTemplate( IDR_MAINFRAME, RUNTIME_CLASS(MyDoc), RUNTIME_CLASS(ChildFrame), RUNTIME_CLASS(MyView)); And here is my OnCreate method: int MyView::OnCreate(LPCREATESTRUCT lpCreateStruct) { AfxMessageBox("oncreate is getting called"); } Why is OnCreate not being called? Thanks. Jess Have you provided the entry ON_WM_CREATE in the message map of your view class? -VSP &q...

Deleting part of a string
I have a field in a report that is a comma delimited list. What I'd like is a function that will delete all after the first comma, so that I get the first value only. For example "Fred, Barney, Wilma" becomes "Fred". In other words, I'd like whatever the VBA equivalent is of: s/,.*// If "Replace" is the fxn I need, I'm not sure how to make it do this. Thanks in advance, John On Thu, 31 Dec 2009 16:34:05 -0800 (PST), John Harrington wrote: > I have a field in a report that is a comma delimited list. > > What...

Boolean parameter in ActiveX method: wrong ole conversion?
Hi, I'm using Visual Studio 2005 and unmanaged C++ to write an MFC ActiveX Control. I want to add a method that takes a boolean parameter. Through the wizard I add this parameter as VARIANT_BOOL and so the wizard adds the following line in my idl file: [id(1), helpstring("method Test")] void Test(VARIANT_BOOL bParam); Moreover, it adds the following line in my control header file: void Test(VARIANT_BOOL bParam); I write the following simple code for the new method: void MyCtrl::Test(VARIANT_BOOL bParam) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); ...

How to set an string element's value to a CDATA block?
I've got a class hierarchy generated from a .xsd schema file using the XSD.EXE tool. One of the elements will have its "inner text" set to a CDATA block. The XSD.EXE tool exposed a "Value" property on that element to allow setting that inner text. After I create the object hierarchy and specify all the appropriate elements, attributes, etc., I serialize the objects to a .xml file using XmlSerializer. If I simply specify the "element.Value" property to the string data (what should go inside the CDATA), the string simply becomes the inner text - it's ...

convert class CString *' to 'short *'
Can anybody help to how to convert class CString *' to 'short *' thank you "priyanka" <priyanka.surjan@yahoo.com> wrote in message news:1165990681.329320.211480@l12g2000cwl.googlegroups.com... > Can anybody help to how to convert class CString *' to 'short *' > thank you The question makes no sense - like converting the address of an elephant to the address of a mouse. What exactly do you want to do and why do you want to do it? Dave -- David Webber Author MOZART the music processor for Windows - http://www.mozart.co.uk For discussion/sup...

Flow of called methods in MFC
Hi all! Does someone know where I can find the sequence of methods that are called when I use this Microsoft's framework? Thanks in advance. Under what conditions? There are several thousand methods in MFC. For startup, it calls the virtual methods CWinApp::InitInstance, CWinApp::PumpMessage and CWinApp::ExitInstance. You can override these, but in practice you only want to override the InitInstance and ExitInstance. After that, you need to say a lot more about what you want to know. joe On Thu, 25 Sep 2008 09:19:57 -0700 (PDT), ScottBright762 <emersonespinola@gmail.com> ...

Methods overloading?
Hi, i'm writing an activex control with MS VC++ 6.0,capable of drawing a certain number of graphs (max 5 graphs),which i want the user to choose. I would like to insert the data to be drawn with an InsertData method,but i've discovered with a little disappoint that i can't overload activex methods:indeed i would like the control to call the appropriate InsertData function depending on the number of quantities chosen,and i had thought of writing 5 different versions of the InsertData method,but,as already said,it isn't possible. Can you give me some advice? Mittik wro...

Searching Mails with a part of a string
I´ve got a network with several Exchange2003 Enterprise Servers. With only one of them I have the following Problem: The Client can search a Mail with Outlook2003. If the user puts the whole string of a word in the search field the mail is found, for example if the word "test" is part of the mail and you enter test as search string, the mail will be found. If you only enter "est" as search string, the Mail will not be found. This concerns all Mailboxes on one server. All Mailboxes on the other servers do work fine. The index is configured in the same way on ever...

The equivalent of a Find & Replace option
Is there way to "Find & Replace" some text (current date) in a multitude of graphs/charts in Excel? I have a workbook with 17 tabs with around 80 graphs/charts that need to have the date changed on a weekly basis. Currently I am copying the new date and pasting into each one, but figured someone would have a better solution. Any ideas are greatly appreciated. Thank you! Put the date into a cell. Next time you replace them all in the charts, inset a textbox that's linked to this cell. The easy way to do this is to select the chart, click in the formula bar, type =, th...