VC to convert the number of renminbi to the amount of capital of the simple algorithm to achieve

Source: Internet
Author: User
void Cnumbertormbdlg::onbutton1 () {//Todo:add your control notification handler code here UpdateData (TR  
    int pos = M_sznumber.find (_t ("."));  
    CString Szinteger, Szfloat;  
        if (POS!=-1) {Szinteger = M_sznumber.left (POS);  
        Szfloat = M_sznumber.mid (pos+1);  
        if (Szfloat.getlength () > 2) {szfloat = Szfloat.left (2);  
    }}else{Szinteger = M_sznumber;  
CString sznumberseed = _t ("0 one of the three places Woolu qi ba Nine");  
    More Highlights: http://www.bianceng.cn Szrmbseed = _t ("Million thousand million to pick up Bai thousand thousand million");  
    LPCTSTR Lpinteger = (LPCTSTR) Szinteger;  
    CString SZRMB = _t ("");  
    int icount = 0;  
        for (int i= szinteger.getlength ()-1; i > 1; i--) {char cnumber = lpinteger[i];  
        int nnumber = atoi (&cnumber); SZRMB = Sznumberseed.mid (Nnumber * 2, 2) + Szrmbseed.mid (icount * 2,2) + SZRMB;  
    } CString szrmbfloat = _t ("");  
    LPCTSTR lpfloat = (LPCTSTR) szfloat;  
        if (szfloat.getlength () > 0) {char cnumber = lpfloat[0];  
        int nnumber = atoi (&cnumber);  
    SZRMB + = Sznumberseed.mid (Nnumber * 2, 2) + _t ("Corner");  
        } if (Szfloat.getlength () > 1) {char cnumber = lpfloat[1];  
        int nnumber = atoi (&cnumber);  
    SZRMB + = Sznumberseed.mid (Nnumber * 2, 2) + _t ("min");  
    } M_SZRMB = SZRMB;  
UpdateData (FALSE); }
 01.void Cnumbertormbdlg::D odataexchange (cdataexchange* pDX) 
CDialog::D odataexchange (PDX);
//{{afx_data_map (CNUMBERTORMBDLG)
05. DDX_Text (PDX, Idc_edit_number, M_sznumber);

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.