Convert VC6.0 CString::Init() code to VC7.1.

How to convert the following code to VC7.1?

// Need to declare a descendant of CString to allow access to the Init()
member
class CStackString : public CString
{
public:
    CStackString & operator=(CString const &s);
    CStackString & operator=(CStackString const &s);
    using CString::Init; // Make public
};


inline CStackString & CStackString::operator=(CString const &s)
{
    CString::operator=(s);
    return *this;
}

inline CStackString & CStackString::operator=(CStackString const &s)
{
    CString::operator=(s);
    return *this;
}


class CStackValue
{
public:
    ULONG m_Val[3];
    tStackValue (CString const &v)
    {
        (reinterpret_cast<CStackString*>(m_Val))->Init();        <-**** Not
VS .NET 2003 compatible.
        *(reinterpret_cast<CStackString*>(m_Val)) = v;
    }
};

I realize this code is ugly, what with teh m_Val[3] being cast to a derived
CString and all.  If it is too difficult to make a quick and easy update to
VC7.1 that won't use ::Init(), then maybe I will just attempt to rewrite
this code.



0
Leo
2/18/2004 12:41:27 AM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
870 Views

Similar Articles

[PageSpeed] 40

a simple way. do not use:

using CString::Init();

use an overload instead:

void CStackString::Init(void)
{
#if _MSC_VER <= 1300 // this means that you are not compiling with .net
    CString::Init();
#endif
}

tell me, if this code is working! sometimes i got problems like yours
-- 
kind regards, muechel


0
Muechel (42)
2/18/2004 3:21:56 AM
Reply:

Similar Artilces:

if meets criteria add 1
i need a formula that will look at a text/number in a column and go down the column and add 1 to get a total number of items meeting the criteria. example column D 1, 2P 1P, 2, 3 1, 2 2 1P how do i get it to search for a 1 in the string of text in column D and give me the answer of 4 for the number of times it shows up in that column? Thanks. Hi, =SUMPRODUCT((LEFT(D1:D10,1)="1")*(1)) Mike "r2rcode" wrote: > i need a formula that will look at a text/number in a column and go down the > column and add 1 to get a total number of ite...

How to Convert UTC to localTIme(C# )
I have got the value of user account's lastlogon time. Its type is Int64. This value is stored as a large integer that represents the number of 100 nanosecond intervals since January 1, 1601 (UTC)(Refer to MSDN). I don't know how to convert this value to localTime. The following is my code. ################################################################ DirectoryEntry deUser = new DirectoryEntry(ldappath); DirectorySearcher src = new DirectorySearcher(deUser); src.Filter = "(&(objectClass=user)(SAMAccountName=" + accountNa...

CRM 4.0 Database Move/Migration issue
Hi, I have a test CRM 4.0 enrivonment that I've built up and being evaluating and also migrating data to from our previous CRM database. I have now installed our production CRM 4.0 environment and created a new organisation. This blank installation worked fine. I then wanted to migrate the data from our test environment into the live environment. So I thought I'd try the Data Migration tool from Microsoft. This didn't work. It just pointed the entry in the MSCRM_Config.organization record to the content database on the test server. So, I tried backing up the 2 databases from ...

Convert text to time value
I have a series of time values in a 'General' format. They are of the type: 184525 Which is 18:45:25 or 6:45:25 pm. A time which is am would be of the type: 12345 Which is 1:23:45 am. Is there a way to convert those 'General' values to an Excel serial so that I can figure out the difference between two times? I've seen a bunch of examples on the net, but none of those that I have found deal with this format that I can tell. Thanks. Hi try =--TEXT(A1,"00:00:00") -- Regards Frank Kabel Frankfurt, Germany "Andy" <amelton@gmail.com> schrieb...

how to convert date
Hi, I'm looking for some method to convert mail date, in format: eg. "Sun, 18 Sep 2005 20:57:08 +0200", to computer local time. I tried CTime but without resoults. m. Have you tried COleDateTime::ParseDateTime()? m.wski21.usunto@aust.com wrote: > Hi, > > I'm looking for some method to convert mail date, in format: > eg. "Sun, 18 Sep 2005 20:57:08 +0200", to computer local time. > I tried CTime but without resoults. > > m. >I'm looking for some method to convert mail date, in format: >eg. "Sun, 18 Sep 2005 20:57:08 +0200&qu...

How do I convert dates to text keeping the format?
I'm trying to convert a column of data in date format *m/d/yyyy to a text format without converting to serial numbers. Ie: I want to retain the mm/dd/yyyy format. Is there a way to do this? =TEXT(A1,"MM/DD"/YYYY") "sprlarry" <sprlarry@discussions.microsoft.com> wrote in message news:69669AA6-FD15-47D7-843D-FC768728BF7A@microsoft.com... > I'm trying to convert a column of data in date format *m/d/yyyy to a text > format without converting to serial numbers. Ie: I want to retain the > mm/dd/yyyy format. Is there a way to do this? That ...

Excel: Auto converting text to numbers
I am downloading an Excel sheet, and the numbers come in as text. It basically comes in as "33 %" but Excel registers this as text, not a percentage. I have a cell that will be used to add the numbers, but since they are text it doesn't work. Given this information, is there a way to convert the imported data into numbers. I would prefer to include this into my formula. The potential numbers are: 0, 1, 2, 3, 4, 0 %, 25 %, 33 %, 50 %, 67 %, 75 %, 100 %, and N/A I would prefer a function, again if possible, that could convert any number. Please note, the space between the nu...

1 Cell 2 Values?
Hello All, Is it possible in excel to have it return two values in one cell separated by a comma and spaces? For example I want it to count the number of times in a month the value was positive and the number of times a value was negative and in the cell I want it to show A1: +, - Is this possible? Thanks to all, Shhhh Shhhh wrote... >Is it possible in excel to have it return two values in one cell separated >by a comma and spaces? > >For example I want it to count the number of times in a month the value was >positive and the number of times a value was negative a...

how to convert excel's .cvf file to .csv file
...

Color Coding Email Listings
Hi All, Without using the Followup function. Is there a way to color code the email listings. Mac's are good for this, and Eudors on PC. I may want to highlight an email with color codes... and the entire listing being highlighted is a better visual then the followup flag. And these items really aren't being highlighted for followup.. just for more important future reference. Thanks -Dave Dave Bar <d@d.com> wrote: > Without using the Followup function. > Is there a way to color code the email listings. See if these help: http://www.howto-outlook.com/howto/colore...

MFG 8.0 Error
I recently upgraded from ver 7.5 to 8.0 on our test server, but now I'm getting the error: "A count records operation on table MFGxxxList failed accessing SQL data" whenever I select any of the Manufacturing Lists. xxx represents the specific view e.g. MFGBOMList I think this may be a bug as when I try to view the records of the view MFGBOMList (BOMV1000) I get the same error as when I drill into the details. Has anyone else experienced this error and found solution? A problem has been identified in environments with more languages than en-us installed. This issue ...

USB Issue with WinXP?
I have a bit of a problem with WinXP telling me that one of my USB devices would operate faster if it was connected to a Hi-Speed USB 2 port. But it does not ID the device in question. How do I figure out which device it is referring to? It does not happen all the time, maybe once or twice a day, so it's hard to pin-point. I've attached screen copies of the messages, if that will help ID the source. Any thoughts are appreciated. Thanks Charliec From: <charliec@email.com> | I have a bit of a problem with WinXP telling me that one of my USB | devices would ope...

Whats wrong with ADO code
Hi I am using textimport to import a large file from text into Access table (which is working fine). Then I use DAO to select all the records just imported (which will have last update time stamp empty) to update the time stamp using the follwoing code: (I get invalid argument error) Private Sub cmdImport_Extract_Click() Dim lst_updt_time As Date lst_updt_time = Now() On Error GoTo ErrorCheck DoCmd.TransferText acImportFixed, "EX_GL_DATA_SPEC", "EX_GL_data", varfilename, False Me.lblMessage.Caption = "Importing new data from CSV file" Dim db2 As DAO.D...

Moving from 2 domain controllers to 1 with exchange 2003 in the m
Help!! I would like to demote one domain controller of two leaving me with only one domain controller. The problem is i have Exchange 2003 in the domain which is not necessarily a problem. I am concerned that by demoting the backup domain server that there will be a problem with connectivity with exchange. Does anyone have any suggestions or solutions? Please let me know. Note: the primary domain controller does the Global cataloging and config so this should be not problem right? Hi Rox, AD doesn't really have PDC and BDC like earlier versions of windows. You can certainly dem...

Convert Access97 to 2000
Hello, we're currently running access97 and would like to convert it to 2000, but we don't know what is the administrator password for this database. Also this database is running on multi user and have difference permission for diffence users. Could someone help me how to do make this happen but keep the currently permission retaint. Thanks ...

Convert 2000 Calendar to web page
Greetings, When I convert my calendar for 2005 to a webpage, the page is off by 1 day. Is there a template or fix available to fix this? Thanks, Duane I can edit the html file but this should not be the case. Fixes? Suggestions...other than use Apple? "Duane Perry" <dlp_sr@yahoo.com> wrote in message news:yZRtd.5561$0r.1710@newsread1.news.pas.earthlink.net... > Greetings, > > When I convert my calendar for 2005 to a webpage, the page is off by 1 day. > Is there a template or fix available to fix this? > > Thanks, > > Duane > > Duane, ...

CRM 3.0
Hello all! I have a strange problem that's probably easy to solve but I'm missing some vital details. I have a Win Svr 2k3 machine with MS CRM 3.0 installed. The SQL Server and Reportig Server are installed on another physical server. Everything works fine but for one detail: when I try to access Reports (no matter what user is logged in), I get an error message: "A error has occured. For more information, contact your system administrator." It happens on every workstation. However, if I load CRM into browser locally, on the server the MS CRM is installed on, Report...

Publisher v2.0 #2
I have an old HP PC (Windows 98) and trying to save old Publisher v2.0 documents (kids school work,etc.) prior to getting rid of the computer. Was able to save files to a CD. Installed Publisher 2007 to my new HP (Windows Vista). When I try to open the saved files on the new PC, I get "unable to open files because created with an older version no longer supported (or something like that.) What can I do to open the files in my new computer? Still have the installation discs for Publisher v2.0, but my new computer does not have a floppy disc drive. What can I do? Thanks. "...

XML Note convert to DataSet
Hello, I have this function: object acmResponse = acmLogin.acmString("4001", "", paramFormLogin + paramUserBasics);System.Xml.XmlNode[] acmNodes = (System.Xml.XmlNode[])acmResponse; What I have todo, to convert the XML Object in the DataSet Object? Thank you Matthias ...

In POS 2.0 Under Reports the Custom is Greyed out
Why does POS 2.0 Have a custom option under reports but not let me access it? I am logging in with owner rights and it is still greyed out. Is there someway to activate this feature? The custom option is for the custom reports that you write. "Brad D" wrote: > Why does POS 2.0 Have a custom option under reports but not let me access it? > I am logging in with owner rights and it is still greyed out. Is there > someway to activate this feature? I am needing a custom report. I guess I am needing some insite into how to write them and where to save them. "tommyv...

Convert
Is it possible to convert a Money file created in the USA version to that of the UK version? Thanks in advance The general way is QIF Export then Import. It's involved and has limitations like loan accounts don't QIF. See http://www.bollar.org/msmoney/#Q1. "Crispy" <nowayspammers@hotmail.com> wrote in message news:uQKSfzfyDHA.2500@TK2MSFTNGP09.phx.gbl... > Is it possible to convert a Money file created in the USA version to that of > the UK version? ...

Problem converting from Quicken to M2005
My Quicken files are mostly investment related, and generally converted fine. However all bonds (regular and muni's) converted as Investment type: Mutual Fund, not Bond. (1) How do I prevent that, (2) How do you change the Investment Type for an item? Thank you. In microsoft.public.money, Mike wrote: >My Quicken files are mostly investment related, and generally >converted fine. However all bonds (regular and muni's) converted as >Investment type: Mutual Fund, not Bond. (1) How do I prevent that, (2) Money typically converts custom data types from Quicken into funds. I thou...

Invest 6$ 1 time get HIGHEST Output!!!
Discovers the "Secret of making huge money" in just few weeks.... You shall be amazed that how easy 1 can make money on internet just for doing 1 time work..[I GUREENTED U CAN TOO MAKE BIG$$ WITH THIS PROGRAM]........ [Use IE if can't view the site] http://mysiteinc.com/gohar/index.html ...

worksheet reference displays 0 on blank cell
Hello all - We are working on a spreadsheet that has two worksheets. The second worksheet has references to cells in the first worksheet. These references are just supposed to re-display text that are on the first spreadsheet. Problem is, the references in the second spreadsheet display a '0' when they reference a blank cell. We want them just to be blank when the reference cell is blank. I've done some searching and found a way to globally turn off the display of 0s in the tools menu, but we have other numeric formulas where we do want the zeros displayed. So we just don't ...

vB code
Hi, Can I use vB code when sending messages in Outlook? Thanks. David Possibly, depending on exactly what you have in mind. FYI, there is a = newsgroup specifically for general Outlook programming issues "down the = hall" at microsoft.public.outlook.program_vba or, via web interface, at = http://www.microsoft.com/office/community/en-us/default.mspx?dg=3Dmicroso= ft.public.outlook.program_vba --=20 Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for=20 ...