), getsystemmetrics (sm_cyedge )) ); // Fill the base color of the button * poldbrush; If (m_bover) {poldbrush = PDC-> SelectObject ( m_fillactive); dogradientfill (PDC, rect) ;}else {poldbrush = PDC-> SelectObject ( m_fillinactive); dogradientfill (PDC, rect );} // draw the internal border if (m_bover | m_bselected) drawinsideborder (PDC, rect) based on the button status; PDC-> SelectObject (poldbrush ); // display the button text if (strtext! = NULL) {cfont * hfont = getfont (); cfont * hol
device const rect * LPRC, // hbrush HBr in the rectangular area // fill painting brush );
Region structure: typedef struct _ rect {long left; // long top on the left side of the rectangle (x coordinate in the upper left corner); // long right on the top side of the rectangle (Y coordinate in the upper left corner; // long bottom on the right side of the rectangle (x coordinate in the lower right corner); // rectangular bottom edge (Y coordinate in th
(hedit, wm_char, (wparam) 'A', 0x00000001 );
3. Current Time:Ctime T = ctime: getcurrenttime ();Cstring STR; Str. Format ("% d-% d", T. getyear (), T. getmonth (), T. getday ());STR + = T. Format ("-- % H-% m-% s ");Afxmessagebox (STR );Must use ctime: getcurrenttime (); getcurrenttime () is an outdated function.
4, // change the background color of the button.Hbrush crectwindow2view: onctlcolor (CDC * PDC, cwnd * pwnd, uint nctlcolor){Hbrush HBr = c
96.
B = as: 24 // audio bitrate
B = RR: 1800
B = RS: 600
A = control: streamid = 1 // send audio through media stream 1
A = range: Treaty = 0-72.080000 // specifies the length of the media stream.
A = length: Treaty = 72.080000
A = rtpmap: 96 MPEG4-GENERIC/32000/2 // rtpmap information, indicating the audio for AAC its sample is 32000
A = fmtp: 96 profile-level-id = 15; mode = AAC-hbr; sizelength = 13; indexlength = 3; indexdeltalength = 3; config =
not repeat the variable declaration to determine the type of the variable. Table 1-1 lists the typical Hungarian prefixes of variables. Table 1-1 variable's Hungarian prefix Variable type Hungary prefixInteger I or NWord (16-bit) W or SDouble Word (32-bit unsigned) DWLong (32-Bit Signed) LChar CString SZPointer PLong pointer lpHandle HWindow handle hwndStruct size CBYou can see some traces of early windows. LP or long pointer. In INTEL 16-bit programming mode, the pointer is divided into two sh
VC/mfc how to set the background color of the dialog box
1. Overload onctlcolor (CDC * PDC, cwnd * pwnd, uint nctlcolor), that is, wm_ctlcolor message.---- ① Add a member variable of cbrush to the header file of cexampledlgdlg:Class cexampledlgdlg: Public cdialog{...Protected:Cbrush m_brush;...};---- ② Add the following to the oninitdialog () function: Code :Bool cexampledlgdlg: oninitdialog (){...// Todo: add extra initialization hereM_brush.createsolidbrush (RGB (0,255, 0); // ge
required functions Note all functions in the SDKBOOL Drawframecontrol (///This function draws a frame of the specified type controlHDC HDC,//Handle to device context DCLprect LPRC,//bounding rectangle holding areaUINT Utype,//Frame-control typeUINT ustate//Frame-control state status See MSDN specifically);
int DrawText (//output text in the specified rectangular area)HDC HDC,//Handle to DCLPCTSTR lpstring,//text to drawint ncount,//Text lengthLprect lprect,//Formatting dimensionsUINT Uformat//t
MFC dialog box to modify the background color:
In Cxxxdlg::oninitdialog (), add the following:Cdialogex::setbackgroundcolor (RGB (155,170,190));The effect is as follows:
MFC dialog box to add a background image:
In Cxxxdlg::oninitdialog (), add the following:
Cdialogex::setbackgroundimage (IDB_BITMAP1);
The effect is as follows:
MFC controls are consistent with the background: static controls
Add the OnCtlColor () function to the dialog box:Effect:You can see that only text boxes with the stat
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.