CodeBus
www.codebus.net
Search
Sign in
Sign up
Hot Search :
Source
embeded
web
remote control
p2p
game
More...
Location :
Home
Search - h.3
Main Category
SourceCode
Documents
Books
WEB Code
Develop Tools
Other resource
Sub Category
assembly language
SCSI-ASPI
ELanguage
Disk Tools
Speech/Voice recognition/combine
Editor
Anti-virus
MultiLanguage
MPI
source in ebook
Delphi VCL
OS Develop
MiddleWare
MacOS develop
LabView
e-language
python
Search - h.3 - List
[
Other
]
DCFlash
DL : 0
使用CMemDC类解决应用程序的闪烁问题 在你的MFC程序中解决闪烁问题是个烦心的工作。你可以在书上或者网上找到关于这方面的介绍,但是介绍的技术一般都是很复杂的或者是很难应用到已经存在的程序中去。 一个京城使用的技术叫做双缓冲。双缓冲使用一个新的缓冲来画屏幕,然后把整个的屏幕显示在真正的屏幕上。 这篇文章使用了叫做CMemDC的类,这个类封装了绝大部分写入off-screen缓冲区的方法。在已经存在的MFC或者是ActiveX控件中加入CMemDC类是非常方便的。 怎样在你的MFC程序中使用CMemDC 1.在你的工程中加入memdc.h文件。 2.在stdafx.h中加入代码#include \"memdc.h\" 3.为窗口做WM_ERASEBKGND的消息映射 4.象下面那样改变处理消息的代码:-use CMemDC category of applications to solve the problem flashing in your MFC process is resolved Flicker 000 bother work. You can book online or find this regard, But introducing the technology in general are very complex or difficult to apply to already existing programs. Beijing used a technique called double buffering. Double buffer using a new buffer to paint a screen, then the screen shows that the whole of the real on the screen. This article called CMemDC use of the category, this category included the majority of package off-screen buffer method. The existence of MFC or ActiveX add CMemDC category is very convenient. What in your MFC procedures used CMemDC one. In your works into memdc.h document. 2. In addition stdafx.h code # include "memdc.h" 3. For window W M_ERASEBK
Date
: 2008-10-13
Size
: 2.39kb
User
:
罗成
[
Other
]
TRACEWindow
DL : 0
1,把dout.h加入到要调试的文件中,直接#include \"dout.h\"就行。 2,在需求输出信息的地方添加:dout(调试信息) 3,运行TRACEWindow.exe, 4,运行程序,当运行到dout(..)的地方,TRACEWindow就会收到信息了。-1, dout.h into debugging to the document, # include direct "dout.h" OK. 2, the demand for the output added : dout (debugging information) 3. Operation TRACEWindow.exe, 4, operating procedures, When running to dout (..), TRACEWindow will receive the information.
Date
: 2008-10-13
Size
: 154.9kb
User
:
小笨象
[
Other
]
shortestroute
DL : 0
#include <stdio.h> #include<cstdlib> int W[4] ,R[4] ,C[4] int P[5]={0,3,3,1,1} int Q[5]={2,3,1,1,1}
Date
: 2008-10-13
Size
: 1.03kb
User
:
鹰隼
[
Other
]
wangyue1
DL : 0
使用方法: 1: 包含C++类CCADMgr头文件,如:#include \"CADMgr.h\" 2: 定义变量如:CCADMgr m_cadMgr 3: 设置Ctrl+Alt+Del消息通知窗口,如:m_cadMgr.SetTargetWnd(m_hWnd) 4: 禁用或启用,如:m_cadMgr.DisableCAD(m_bDisabled) 5: 响应消息: 声明函数:afx_msg void OnHotKey(WPARAM wParam, LPARAM lParam) 消息映射:ON_MESSAGE(WM_HOTKEY, OnHotKey) 函数实现: void CTrapCADDlg::OnHotKey(WPARAM wParam, LPARAM lParam) { WORD wKey = HIWORD(lParam) WORD wModifier = LOWORD(lParam) BOOL bAltDown = ((wModifier & VK_MENU) != 0 ? TRUE : FALSE) BOOL bCtrlDown = ((wModifier & VK_CONTROL) != 0 ? TRUE : FALSE) //按下Ctrl + Alt + Del组合键 if(bCtrlDown && bAltDown && wKey == VK_DELETE) AfxMessageBox(\"对不起, Ctrl+Alt+Delete组合键已经被禁用了!\", MB_OK|MB_IConERROR)
Date
: 2008-10-13
Size
: 116.49kb
User
:
王跃
[
Other
]
c_source_program_comment_remover
DL : 0
一个去除源程序.C/.CPP/.H中的注释的工具,开发环境:Turbo C++ 3.0
Date
: 2008-10-13
Size
: 9.42kb
User
:
wanning
[
Other
]
qpsk
DL : 0
% Program 3-5 % qpsk.m % % Simulation program to realize QPSK transmission system % % Programmed by H.Harada and T.Yamamura
Date
: 2009-04-18
Size
: 1.22kb
User
:
xiaxianice@eyou.com
[
Other
]
canf18xx8.h
DL : 21
、 先在microchip网站上找到00738.zip,这个包中有 can18xx8.h,can18xx8.c,将其复制到一个你要编写程度的子目录中,例如C:\testcan下,这个时候这个东东是不能直接用的。 2、 下载一个MPLAB 7.10,直接安装(要求直接下载) 3、 再下载一个PICC18 (HI-TECH的),要正版哦(支持正版,买不起的想其它办法吧) 4、在你的头文件上写上如下的样式: #include "stdio.h" #include "can18xx8.h" #include "pic18fxx8.h"//可能是“pic.h”不太好包含,因此常会报错,直接包含克服之 5、然后设置好PICC和MPLAB,如果MPLAB上没有PICC18,则到PICC的网上下一个安装软件,可以直接运行安装就有了。 6、按照工程的基本要求把你的源代码、添加上两个库(不加也可以) 然后就可以写如下代码了:下面是一个完整版,可以直接使用microchip的库函数,本程序只是仿真调试过,未在多个芯片通信过,仍在制作中。 #include "stdio.h" #include "can18xx8.h" #include "pic18fxx8.h" unsigned long NewMessage; BYTE NewMessageData[8]; BYTE MessageData[8]; BYTE NewMessageLen; enum CAN_RX_MSG_FLAGS NewMessageFlags=1; BYTE RxFilterMatch; void main() { //int a; //int b; CANInitialize(1, 5, 7, 6, 2, CAN_CONFIG_VALID_XTD_MSG); while(1) { // Application specific logic here // Check for CAN message if ( CANIsRxReady() ) { CANReceiveMessage(&NewMessage,NewMessageData,&NewMessageLen,&NewMessageFlags); if ( NewMessageFlags & CAN_RX_OVERFLOW ) { // Rx overflow occurred; handle it } if ( NewMessageFlags & CAN_RX_INVALID_MSG ) { // Invalid message received; handle it } if ( NewMessageFlags & CAN_RX_XTD_FRAME ) { // Extended Identifier received; handle it } else { // Standard Identifier received. } if ( NewMessageFlags & CAN_RX_RTR_FRAME ) { // RTR frame received } else { // Regular frame received. } // Extract receiver filter match, if it is to be used RxFilterMatch = NewMessageFlags & CAN_RX_FILTER_BITS; } // Process received message // Transmit a message due to previously received message or // due to application logic itself. if ( CANIsTxReady() ) { MessageData[0] = 0x01; CANSendMessage( 0x02,MessageData,1,CAN_TX_PRIORITY_0 &CAN_TX_STD_FRAME & CAN_TX_NO_RTR_FRAME); } // Other application specific logic } // Do this forever // End of program } 以上均是参考文档并进行了修正,由于中间总是报错,为了大家让CAN更容易,谢谢大家!
Date
: 2009-05-25
Size
: 10.43kb
User
:
lovelzs2008@126.com
CodeBus
is one of the largest source code repositories on the Internet!
Contact us :
1999-2046
CodeBus
All Rights Reserved.