首先,声明一个Currency的结构。Currency结构有自己的ToString()重载方法和一个与GetCurrencyUnit()的签名相同的静态方法。这样,就可以用同一个委托变量调用这些方法了: struct Currency { public uint Dollars...
分类:
其他好文 时间:
2014-07-07 17:01:13
阅读次数:
121
在C#中,整形有以下几个sbyte,byte,char,short,ushort,int,uint,long,ulong。下面以表格的形式说明各种整形的取值范围 类型 取值范围 长度 sbyte -128~127 ...
分类:
其他好文 时间:
2014-07-07 10:17:55
阅读次数:
310
一、窗口设计窗口类时: 1 typedef struct _WNDCLASS{ 2 UINT style; //如水平、垂直变化是否重绘,禁用Close,检测双击 3 WNDPROC lpfnWndProc;//窗口过程函数句柄 4 int cbClsExtra;//类附加内存 5 int cbWn...
HRESULT D3DXCreateTexture( __in LPDIRECT3DDEVICE9 pDevice, __in UINT Width, __in UINT Height, __in UINT MipLevels, __in DWORD...
分类:
其他好文 时间:
2014-07-05 22:41:07
阅读次数:
390
步骤/方法
分三个步骤
在头文件中声明函数例如
afx_msg void onNum(UINT uID)
在.cpp文件中添加函数体
void CCalculatorDlg::OnNum(UINT uID)
{
UINT index=uID-IDC_NUM_0;
CString num;
num.Format(_T("%d"),index);
A...
分类:
其他好文 时间:
2014-07-04 00:38:58
阅读次数:
307
1 #include 2 #include "resource.h" 3 4 LRESULT CALLBACK MyWndProc( HWND hwnd, // handle to window 5 UINT uMsg, // message identifier 6...
1 #include 2 3 LRESULT CALLBACK MyWndProc( HWND hwnd, // handle to window 4 UINT uMsg, // message identifier 5 WPARAM wParam, // fi...
1 #include 2 #include "resource.h" 3 4 LRESULT CALLBACK MyWndProc( HWND hwnd, // handle to window 5 UINT uMsg, // message identifier 6...
//农机调度项目代码NOTIFYICONDATA m_notifyData;m_notifyIcon.ChangeIcon(IDI_PAUSE, _T("监控终端server已暂停"));void CMyNotifyIcon::AddIcon(UINT idResourceIcon, LPCTSTR...
分类:
其他好文 时间:
2014-07-01 22:46:22
阅读次数:
342
#include // 编写Windows程序必须包含的头文件LRESULT CALLBACK WndProc(HWND,UINT,WPARAM,LPARAM); // 声明窗口函数原型int WINAPI WinMain(HINSTANCE hInstance, ...