您好,欢迎访问本站炒股如何开户台
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧
  • 网站所有资源均来自网络,如有侵权请联系站长删除!

VC中DDX_Control控件数组的使用技巧

配资之家 炒股如何开户 2026-04-13 11 次浏览 0个评论

/////////////////////////////////////////////////////////////////////////////

// used for App About

class :

:

();

// Data

//{{()

enum { IDD = };

//}}

//

//{{()

:

void (* pDX);    // DDX/DDV

//}}

//

:

//{{()

//}}

()

};

::() : (::IDD)

//{{()

//}}

void ::(* pDX)

::(pDX);

//{{()

//}}

(, )

//{{()

// No

//}}

()

/////////////////////////////////////////////////////////////////////////////

//

::(CWnd* /*=NULL*/)

: (::IDD, )

//{{()

// NOTE: the will add here

//}}

// Note that does not a in Win32

= ()->();

void ::(* pDX)

::(pDX);

//{{()

(pDX, , );

(pDX, , );

(pDX, , );

(pDX, , );

(pDX, , );

(pDX, , m_Off);

//}}

(, )

//{{()

()

()

()

(, OnOff)

(, )

(, )

(, )

//}}

()

/////////////////////////////////////////////////////////////////////////////

//

BOOL ::()

::();

// Add "About..." menu item to menu.

// must be in the range.

(( & ) == );

( < );

CMenu* = (FALSE);

if ( != NULL)

.();

if (!.())

->();

->(, , );

// Set the icon for this .  The does this

//  when the 's main is not a

(, TRUE); // Set big icon

(, FALSE); // Set small icon

// TODO: Add extra here

.(0,-1);                           //选上所有内容

.("关闭");   //显示编辑框2内容

state(,);//绿色灯

.(0,-1);                           //选上所有内容

.("关闭");   //显示编辑框2内容

state(,);//绿色灯

CDialog class CAboutDlg message handlers CKEYTESTDlg dialog initialization_vc ddx_control 控件数组

TRUE;  // TRUE   you set the focus to a

void ::(UINT nID, )

if ((nID & ) == )

.();

else

::(nID, );

// If you add a to your , you will need the code below

//  to draw the icon.  For MFC using the /view model,

//  this is done for you by the .

void ::()

if (())

dc(this); // for

(, () dc.(), 0);

// icon in

int = ();

int = ();

CRect rect;

(&rect);

int x = (rect.Width() - + 1) / 2;

int y = (rect.() - + 1) / 2;

// Draw the icon

dc.(x, y, );

else

::();

// The calls this to the to while the user drags

//  the .

::()

() ;

void ::OnOff()

// TODO: Add your code here

.(0,-1);                           //选上所有内容

.("关闭");   //显示编辑框2内容

state(,);//绿色灯

.(0,-1);                           //选上所有内容

.("关闭");   //显示编辑框2内容

state(,);//绿色灯

void ::()

// TODO: Add your code here

.(0,-1);                           //选上所有内容

.("打开");   //显示编辑框2内容

state(,);//红色灯

.(0,-1);                           //选上所有内容

.("打开");   //显示编辑框2内容

state(,);//红色灯

void ::()

// TODO: Add your code here

if(sba=0)

.(0,-1);                           //选上所有内容

.("关闭");   //显示编辑框2内容

state(,);//绿色灯

sba=0;

char sPos;                  //存放字符数组缓冲区

itoa(sba,sPos,10);       //整形数转换成字符数组

.(sPos);

void ::()

// TODO: Add your code here

if(sbb=0)

.(0,-1);                           //选上所有内容

.("关闭");   //显示编辑框2内容

state(,);//绿色灯

sbb=0;

char sPos;                  //存放字符数组缓冲区

itoa(sbb,sPos,10);       //整形数转换成字符数组

.(sPos);

void ::state(int xID, int color)

CRect ;

CWnd *pWnd=(xID);//在图象控件中设圆形状态指示灯

CDC *pDC=pWnd->GetDC();

::(pWnd->,);

(()color);//指示灯为color色

*=pDC->(&);

pDC->(.right/2,./2);

pDC->(-22,-22,22,22);

pDC->();

pWnd->(pDC);