当前位置:首页 » 软件开发
开发技术指南» 文章正文
    引言: 用C#写Windows程序的时候,我们可以注意到里面有个很有意思并且很有用的东东“Anchor”。
 

 

    摘要:前言: 本文只提供vc6.0的编译说明,如果想知道vc.net下的编译过程请参看原文原文: http://www.voxgratia.org/docs/openh323_windows.html作者 :craig southeren翻译 : richard原文更新日期:2004年11月16日1.介绍 这是一篇彻底讲解如何用msvc6.0建立openh323的文章。这个篇文章是上一篇文章的延续,所以......
 ·windows网络编程     »显示摘要«
    摘要:我把windows网络编程里的例子封装到一类里,这样方便初学者使用初学者在继续深入后可以扩展这个类,另外做成lib , 或者 dll也不错其实这并没有别的功能只是让初学者明白这就是一个最基本的 基于tcp连接的服务端程序了就像 windows的基本框架一样, 有了这个 你就可以继续深入的学习某个协议的 函数,然后不断的丰富这个框架另初学者迷惑的是 一个网络 程序究竟是如何实现的一个网络程序 目前最......


VC6模拟C#的Anchor

用c#写windows程序的时候,我们可以注意到里面有个很有意思并且很有用的东东“anchor”.它可以被指定为“top, bottom, left, right”的组合.这个东西可以简化我们的界面上的很多工作,很多时候都可以不用对布局写代码.以下是我在vc6里给出的模拟解决方案:

#include <map> 【程序编程相关:MFC中PretranslateMess

#pragma warning(disable: 4786) 【推荐阅读:工作线程中调用UI线程创建的窗口的Upd

 ar_none   = 0,   【扩展信息:在VC中做一个选择文件夹的对话框

typedef enum anchor{

 ar_left   = 1,  

 ar_top    = 2,  

 ar_right  = 4, 

 ar_bottom = 8, 

 

 ar_fill = ar_left | ar_top | ar_right | ar_bottom, 

 ar_lefttop = ar_left | ar_top, 

 ar_righttop = ar_right | ar_top, 

 ar_leftbottom = ar_left | ar_bottom,

 ar_rightbottom = ar_right | ar_bottom

}anchor;

typedef std::map<cwnd*, uint> anchormap;

typedef std::map<uint, uint> anchormapbyid;

......

void basedlg::registeranchor(cwnd* child, uint anchor /* = ar_none */)

{

 anchors[child] = anchor;

}

void basedlg::unregisteranchor(cwnd* child)

{

 anchormap::iterator iter = anchors.find(child);

 if (iter != anchors.end())

  anchors.erase(iter);

}

void basedlg::registeranchorbyid(uint itemid, uint anchor /* = ar_none */)

{

 anchorsbyid[itemid] = anchor;

}


...   下一页
 ·dll的export和import     »显示摘要«
    摘要:dll的export和import dll的export是指将dll中的函数和数据输出到其它程式中,以供其使用。dll的import是指使用dll的程式引入dll中的函数和数据。 dll的export dll中包含有一个表,称为export table(以下简称et),其中包含了dll中可以被外部程式使用的所有函数和数据的名字。只有记录在et中的函数和数据才可以被外部程式所使用(如果没有.d......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE