2012年10月8日

C 语言中的有符号数和无符号数

摘要: 首先看一段程序:View Code 1 #include "stdio.h" 2 3 int main(void) 4 { 5 if ( 1 > 2) 6 { 7 printf("1 > 2 \n"); 8 } 9 10 if (-1 > 2u)11 {12 printf("-1 > 2u \n");13 }14 15 if (-1 > 0u)16 {17 printf("-1 > 0u \n");18 }19 20 return 0;21 }上面为用VC... 阅读全文

posted @ 2012-10-08 22:42 沉沉-_- 阅读(621) 评论(0) 推荐(0) 编辑

GetWindowRect() 和 GetClientRect() 的区别

摘要: 新建一个基于对话框的MFC的exe程序:删除对话框的所有按钮,并添加一个test按钮,添加一个Static控件,ID为IDC_STATIC:双击test按钮,在响应函数中添加以下代码:View Code 1 void CTestMapDlg::OnBtnTest() 2 { 3 // TODO: Add your control notification handler code here 4 CRect rect; 5 CString str; 6 7 CWnd* pStatic = (CWnd*) GetDlgItem(IDC_STATIC);... 阅读全文

posted @ 2012-10-08 17:42 沉沉-_- 阅读(1314) 评论(1) 推荐(0) 编辑

导航