//两个单片机通讯,使用中断法
#include
#define uchar unsigned char
#define uint unsigned int
#define key_port P1
#define dis_port P2
void main (void)
{
uchar key_in=0xff;
SCON=0x50; //MODER1,REN=1;
TMOD=0x20...
分类:
其他好文 时间:
2015-01-27 16:26:08
阅读次数:
126
#include
#define uchar unsigned char
#define uint unsigned int
sbit rs=P3^5;
sbit lcden=P3^4;
sbit dula=P2^6;
sbit wela=P2^7;
uchar table1[]="TX-51STAR MCU";
uchar table2[]="WWW.TXMCU.COM";
void delay...
分类:
其他好文 时间:
2015-01-26 17:07:57
阅读次数:
183
MessageBox这个函数可以在VC里面显示一个标准对话框,是比较常用的一个信息对话框,其不仅能够定义显示的信息内容、信息提示图标,而且可以定义按钮组合及对话框的标题,是一个功能齐全的信息对话框。
函数原型及参数
int MessageBox(HWND hWnd, LPCTSTR lpText, LPCTSTR lpCaption, UINT, uType);
参数含义:
HWND ...
分类:
其他好文 时间:
2015-01-26 17:06:42
阅读次数:
174
加深记忆------ 经常用到这些,做个记录!这里列出两种遍历方式...用到的函数原型: 1 HWND GetWindow( 2 HWND hWnd, // handle to original window 3 UINT uCmd // relationship flag ...
分类:
编程语言 时间:
2015-01-24 00:23:29
阅读次数:
280
前面写过一篇关于视频对比的文章,后来又做了一些修缮,用代码实现了一遍。
//定时器,解码
void Cvideo4Dlg::OnTimer(UINT nIDEvent)
{
//输出视频解码
WaitForSingleObject(AfxBeginThread(Decode_out_Thread, this), INFINITE);
//输入视频解码
WaitForSingleObjec...
分类:
其他好文 时间:
2015-01-23 18:24:32
阅读次数:
146
①、线程同步的必要性:int g_Num = 0;UINT __cdecl ThreadProc(LPVOID lpParameter){for (int idx = 0; idx < 100; ++idx) { g_Num = g_Num+1; CString strNum; strNum.For...
分类:
编程语言 时间:
2015-01-23 11:09:38
阅读次数:
243
//示例代码:CStringArray g_ArrString;UINT __cdecl ThreadProc(LPVOID lpParameter){int startIdx = (int)lpParameter;for (int idx = startIdx; idx #include #def...
分类:
编程语言 时间:
2015-01-23 10:51:56
阅读次数:
187
1 // StockServerDlg.h : 头文件 2 // 3 4 #pragma once 5 #include "afxwin.h" 6 7 UINT ThreadProc(LPVOID pParm); 8 9 struct threadInfo10 {11 char re...
分类:
编程语言 时间:
2015-01-23 00:37:30
阅读次数:
430
之前在做windows服务器迁移到linux的过程中,出现了一个编译类的问题代码中定义了如下结构体struct MsgInfo{ union { struct { OBJID idType; UINT unExp; }; ...
分类:
系统相关 时间:
2015-01-22 13:00:42
阅读次数:
194
GetMessage()原型:BOOL GetMessage(LPMSG lpMsg, HWND hWNd, UINT wMsgFilterMin, UINT wMsgFilterMax);Retrieves a message from the calling threads queque. Th...
分类:
其他好文 时间:
2015-01-21 14:42:22
阅读次数:
115