上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 25 下一页
摘要: 转自:http://www.cnblogs.com/qytan36/archive/2010/09/27/1836569.html在C中,默认的基础数据类型均为signed,现在我们以char为例,说明(signed) char与unsigned char之间的区别首先在内存中,char与unsigned char没有什么不同,都是一个字节,唯一的区别是,char的最高位为符号位,因此char能表示-128~127, unsigned char没有符号位,因此能表示0~255,这个好理解,8个bit,最多256种情况,因此无论如何都能表示256个数字。在实际使用过程种有什么区别呢?主要是符号位 阅读全文
posted @ 2013-04-10 17:06 fff8965 阅读(213) 评论(0) 推荐(0) 编辑
摘要: gdi截屏// TTTest.cpp : 定义应用程序的入口点。//#include "stdafx.h"#include "TTTest.h"#include <stdio.h>LPVOID screenCaptureData=NULL;HBITMAP hBitmap;HDC hDDC;HDC hCDC;int nWidth;int nHeight;void initGDI(){ // Get screen size nWidth = GetSystemMetrics(SM_CXSCREEN); nHeight = GetSystemMet 阅读全文
posted @ 2013-04-10 16:08 fff8965 阅读(5681) 评论(3) 推荐(0) 编辑
摘要: HCURSOR GetCurrentCursorHandle(){ POINT pt; HWND hWnd; DWORD dwThreadID, dwCurrentThreadID; HCURSOR hCursor = NULL; // Find out which window owns the cursor GetCursorPos(&pt); hWnd = WindowFromPoint(pt); // Get the thread ID for the cursor owner. dwThreadID = GetWindowThre... 阅读全文
posted @ 2013-04-10 13:15 fff8965 阅读(1012) 评论(0) 推荐(0) 编辑
摘要: AttachThreadInput 阅读全文
posted @ 2013-04-10 13:09 fff8965 阅读(157) 评论(0) 推荐(0) 编辑
摘要: int load(char * filaName , char *& buffer){ FILE *file; if((file = fopen("D://a.txt","r")) == NULL) { printf("cant open file!"); } fseek (file, 0, SEEK_END); // non-portable char *c = ""; int size=ftell (file); rewind (file); buffer = new char[size+1]; *(b 阅读全文
posted @ 2013-03-26 23:04 fff8965 阅读(418) 评论(0) 推荐(0) 编辑
摘要: 读文件到文件尾 FILE *file; if((file = fopen("D://a.txt","r")) == NULL) { printf("cant open file!"); } char ch; while((ch = fgetc(file))!=EOF) putchar(ch); if(fclose(file)) printf("file close error!");从键盘输入字符存入文件 FILE *file; if((file = fopen("D://a.txt",&quo 阅读全文
posted @ 2013-03-26 22:52 fff8965 阅读(384) 评论(0) 推荐(0) 编辑
摘要: 绑定元素的大小一般会想到Width和Height但是wpf里的Width和Height如果没有显示的设置过大小那么得到的就是NaN要动态得到元素的大小要用ActualWidth、ActualHeight<UserControl x:Class="园区展示程序.MyRichTextBox" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" . 阅读全文
posted @ 2013-03-26 15:30 fff8965 阅读(288) 评论(0) 推荐(0) 编辑
摘要: 在wpf和C#中Environment.TickCount可以用来获得系统开机到现在的毫秒数 阅读全文
posted @ 2013-03-26 15:27 fff8965 阅读(487) 评论(0) 推荐(0) 编辑
摘要: Mouse.GetPosition(window);可以在任何时间获得相对任意元素的鼠标位置Mouse.Capture(el);可以让某个元素获得所有的鼠标事件不管他应不应该的到鼠标事件Mouse.Capture(null);解除 阅读全文
posted @ 2013-03-25 16:10 fff8965 阅读(849) 评论(0) 推荐(0) 编辑
摘要: this.image.Source = new BitmapImage(new Uri(imgSource, UriKind.Absolute)); this.imgSource = imgSource; 阅读全文
posted @ 2013-03-21 09:45 fff8965 阅读(324) 评论(0) 推荐(0) 编辑
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 25 下一页