Make edit ctrl look like a DOS

Source: Internet
Author: User

 Casewm_ctlcoloredit: {HWND hshelltext=GetDlgItem (Hdlg,idc_txt_shell); if(Hshelltext = =(HWND) lParam) {HDC HDC=(HDC) WParam; SetTextColor (Hdc,rgb (0,255,0)); SetBkColor (Hdc,rgb (0,0,0)); }            return(INT_PTR) Getsyscolorbrush (Color_background); }         Break;

In response to the above message, you can get black green characters like a DOS window Editctrl, the font is not very similar, the following settings under the font

StaticHfont Hfont = CreateFont ( -,//nheight        0,//nwidth        0,//nescapement        0,//norientationFw_medium,//Nweight        false,//BitalicFALSE,//Bunderline        0,//CstrikeoutDefault_charset,//NcharsetOut_default_precis,//noutprecisionClip_default_precis,//nclipprecisionDefault_quality,//nqualityDefault_pitch |Ff_swiss, _t ("Courier")//Terminal Courier//npitchandfamily        ); HWND Hshelltext=GetDlgItem (Hwnd,idc_txt_shell); SendMessage (Hshelltext,wm_setfont, (WPARAM) Hfont,true); 

It's like a lot.

Make edit ctrl look like a DOS

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: info-contact@alibabacloud.com 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.