![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++(MFC)
文章平均质量分 71
Crack_fly
嵌入式开发新人
展开
-
WIN 32 文本
#include #include"SystemMetri.h" #include"stdio.h" LRESULT CALLBACK MyPro( // pointer to previous procedure HWND hWnd, // handle to window UINT Msg, // message原创 2014-07-15 19:11:01 · 361 阅读 · 0 评论 -
函数参数是类对象时,特殊的用法!
#include"iostream" using namespace std; const class A { public: A() {}; int c; void set(){ int a=10; } void display(){ cout } }; cl原创 2014-06-20 18:06:16 · 501 阅读 · 0 评论 -
(size_t)&(((s*)0)->m) 的理解
#define offsetof(s,m) (size_t)&(((s *)0)->m) 看了半天没弄懂,空指针怎么会不出错的,他们说没有写入操作,即没有 mov x, dword ptr []。找了下别人的理解,最详细的如下: ((s *)0):强制转化成数据结构指针,并使其指向地址0; ((s *)0)->m:使该指针指向成员m &(((s *)0)->m):获取该成员m的地转载 2014-07-15 15:02:49 · 2074 阅读 · 0 评论 -
MFC 常用数据类型转化
CString可以转换为基本类型LPCTSTR,LPCTSTR根据项目编码可以是const char*或者const wchar_t*;string可以用c_str()转换为const char*,stringw可以用c_str()转换为const w_char*。而CString和string/w都重载了=赋值操作符,可以把char*或者wchar_t*字符串赋值给CString或者string转载 2014-08-05 23:15:03 · 471 阅读 · 0 评论 -
win32 SDK 响应按扭消息
#include #include HDC hdc; POINT pt; BOOL fDraw; LRESULT CALLBACK ChildPro( HWND , // handle to window UINT , // message WPARAM , // first messa原创 2014-07-15 19:05:36 · 378 阅读 · 0 评论 -
MFC 响应自创按扭的消息
// ButtonView.cpp : implementation of the CButtonView class // #include "stdafx.h" #include "Button.h" #include "ButtonDoc.h" #include "ButtonView.h" #ifdef _DEBUG #define new DEBUG_NEW #undef原创 2014-07-15 19:15:06 · 427 阅读 · 0 评论 -
Linux initrd 制作与压缩
cpio格式 initrd 的解压与压缩 cexoyq 2012-04-24 21:55 1.解压 initrd # file initrd.`uname –r`.img (察看格式,不同的linux操作系统,这个文件格式也有不同,这个文件格式可能是cpio 也可能是ext2) 如果是cpio格式 : # mkdir /mnt/tmp # cd /mnt/tmp # cpio转载 2014-09-02 21:41:14 · 653 阅读 · 0 评论