<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[alphabuilder的专栏]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/alphabuilder</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; alphabuilder]]></copyright><item><title><![CDATA[构造函数中调用虚函数]]></title><link>https://blog.csdn.net/alphabuilder/article/details/43408585</link><guid>https://blog.csdn.net/alphabuilder/article/details/43408585</guid><author>alphabuilder</author><pubDate>Mon, 02 Feb 2015 19:41:21 +0800</pubDate><description><![CDATA[在生成派生类Derive的实例时，由Derive的构造函数来调用Base的构造函数先完成基类Base的构建。Base的构造函数中调用虚函数Foo，此时从虚函数表中获取的只能是Base类的虚函数表的地址，因此虚函数Foo绑定的是Base类的Foo，只能执行Base的Foo。]]></description><category></category></item><item><title><![CDATA[链表宏]]></title><link>https://blog.csdn.net/alphabuilder/article/details/43202939</link><guid>https://blog.csdn.net/alphabuilder/article/details/43202939</guid><author>alphabuilder</author><pubDate>Tue, 27 Jan 2015 21:24:18 +0800</pubDate><description><![CDATA[#define Destroy(_p) {if (((layer_type *)(_p))->Canvas != NULL) delete[] ((layer_type *)(_p))->Canvas; free(_p);}

 #define Destroy_(Head, _p) {if (((layer_type *)(_p))->src == (ListNode *)((layer_ty]]></description><category></category></item><item><title><![CDATA[c++类模板特例化]]></title><link>https://blog.csdn.net/alphabuilder/article/details/42835887</link><guid>https://blog.csdn.net/alphabuilder/article/details/42835887</guid><author>alphabuilder</author><pubDate>Sun, 18 Jan 2015 15:27:55 +0800</pubDate><description><![CDATA[#include 
#include 

using namespace std;

template 
class A
{
 public:

  A(){cout << typeid(*this).name() << " construction" << endl;}
  ~A(){}

  T1 m_a1;
  T2 m_a2;
  T3 m_a3;
};]]></description><category></category></item><item><title><![CDATA[__declspec(naked) int add(int a, int b)]]></title><link>https://blog.csdn.net/alphabuilder/article/details/9918475</link><guid>https://blog.csdn.net/alphabuilder/article/details/9918475</guid><author>alphabuilder</author><pubDate>Mon, 12 Aug 2013 10:45:35 +0800</pubDate><description><![CDATA[__declspec(naked) int add(int a, int b)
{
 _asm
  {
   mov eax, dword ptr [esp + 0x4]
   add eax, dword ptr [esp + 0x8]
   ret
  }
}


因为函数开头没有
push ebp    
mov ebp, esp

ebp没有入栈，所以函数参数]]></description><category></category></item><item><title><![CDATA[Photoshop马赛克效果]]></title><link>https://blog.csdn.net/alphabuilder/article/details/8468515</link><guid>https://blog.csdn.net/alphabuilder/article/details/8468515</guid><author>alphabuilder</author><pubDate>Sat, 05 Jan 2013 14:10:50 +0800</pubDate><description><![CDATA[void _alpha__fastcall_pre_ TAlpha::Mosaic(AlphaPara *Para)
{
 int left;
 int top;
 int right = (left = Para->X) + Para->Width - 1;
 int bottom = (top = Para->Y) + Para->Height - 1;
 int linebyte]]></description><category></category></item><item><title><![CDATA[单图处理的接口函数 Process_Plus]]></title><link>https://blog.csdn.net/alphabuilder/article/details/8466210</link><guid>https://blog.csdn.net/alphabuilder/article/details/8466210</guid><author>alphabuilder</author><pubDate>Fri, 04 Jan 2013 21:31:01 +0800</pubDate><description><![CDATA[void TAlpha::Process_Plus(HDC hdc, int X, int Y, int Width, int Height, typeprocess_plus_op_fun_ptr op_fun_ptr, void *funPara)
{
 Process_PlusPara pluspara;
 AlphaPara para;

 para.X = X;
 para.]]></description><category></category></item><item><title><![CDATA[TAlpha类的灰色浮雕处理函数GrayEmboss_1000]]></title><link>https://blog.csdn.net/alphabuilder/article/details/8464540</link><guid>https://blog.csdn.net/alphabuilder/article/details/8464540</guid><author>alphabuilder</author><pubDate>Fri, 04 Jan 2013 14:42:18 +0800</pubDate><description><![CDATA[//灰色浮雕[maxwidth:1000]
void TAlpha::GrayEmboss_1000(byte &r, byte &g, byte &b, byte &a, int x, int y, int width, int height, void *Para)
{
 const int maxsize = 1000;
 static byte rgb[maxsize];]]></description><category></category></item><item><title><![CDATA[结构体类型数组int成员变量求和函数]]></title><link>https://blog.csdn.net/alphabuilder/article/details/8055365</link><guid>https://blog.csdn.net/alphabuilder/article/details/8055365</guid><author>alphabuilder</author><pubDate>Wed, 10 Oct 2012 10:48:18 +0800</pubDate><description><![CDATA[struct stru1
{
 int a;
 float b;
 int c;
 int d;
};

struct stru2
{
 int a;
 char b[100];
 int c;
 stru1 d;
};


struct stru1 s1[100];
struct stru2 s2[100];

...

int sum1 = supe]]></description><category></category></item><item><title><![CDATA[一维二维数组共用一次new]]></title><link>https://blog.csdn.net/alphabuilder/article/details/8035626</link><guid>https://blog.csdn.net/alphabuilder/article/details/8035626</guid><author>alphabuilder</author><pubDate>Mon, 01 Oct 2012 19:48:51 +0800</pubDate><description><![CDATA[优化前
//非共用的
int Height;

...

const int COL = 3;
int *dgree = new int[Height];
byte *grgb = new byte[Height * COL];

...

delete[] dgree;
delete[] grgb;

优化后
//共用的
int Height;

...]]></description><category></category></item><item><title><![CDATA[嵌套优化版括号匹配检查]]></title><link>https://blog.csdn.net/alphabuilder/article/details/7959937</link><guid>https://blog.csdn.net/alphabuilder/article/details/7959937</guid><author>alphabuilder</author><pubDate>Sun, 09 Sep 2012 11:31:02 +0800</pubDate><description><![CDATA[设置三个计数器初值设为零，分别记录小括号、中括号、大括号。开始进行第一次扫描，从左向右依次扫描每个字符，遇到左括号计数器加一，遇到右括号计数器减一，出现计数器小于零时，报错退出。扫描结束后，若三个计数器有一个不为零说明括号不匹配，报错结束检查。
       第一步扫描结束，如果正确说明三种括号本身匹配正确。现在可能出现的错误只可能是不同括号出现交叉，比如 {(}{)}，({[)]}。]]></description><category></category></item><item><title><![CDATA[#if 宏处理循环双流水]]></title><link>https://blog.csdn.net/alphabuilder/article/details/7927013</link><guid>https://blog.csdn.net/alphabuilder/article/details/7927013</guid><author>alphabuilder</author><pubDate>Thu, 30 Aug 2012 22:36:30 +0800</pubDate><description><![CDATA[#define SIZE 5

int a[SIZE] = {1, 2, 3, 4, 5};

#if SIZE & 1
 //SIZE是奇数
 int s = a[0];
 for (int i = 1; i < SIZE; i += 2)
  {
   s += a[i];
   s += a[i + 1];
  }
#else
 //SIZE是偶数
 int s]]></description><category></category></item><item><title><![CDATA[MDI切换到上次显示的子窗口]]></title><link>https://blog.csdn.net/alphabuilder/article/details/7914928</link><guid>https://blog.csdn.net/alphabuilder/article/details/7914928</guid><author>alphabuilder</author><pubDate>Tue, 28 Aug 2012 10:15:14 +0800</pubDate><description><![CDATA[void __fastcall TMainBuilder::mnuWindow_LastVisitedClick(TObject *Sender)
{
 const HWND hwnd = m_hLastActiveChild;

 if (IsWindow(hwnd))
  {
   bool bmaximized;
   HWND hwndactivechild = (HWND)]]></description><category></category></item><item><title><![CDATA[[转]让程序只运行一个实例的四种方法]]></title><link>https://blog.csdn.net/alphabuilder/article/details/7776830</link><guid>https://blog.csdn.net/alphabuilder/article/details/7776830</guid><author>alphabuilder</author><pubDate>Mon, 23 Jul 2012 20:19:02 +0800</pubDate><description><![CDATA[源代码下载：http://d.download.csdn.net/down/907655/magictong
 
综述：让一个程序只运行一个实例的方法有多种，但是原理都类似，也就是在程序创建前，有窗口的程序在窗口创建前，检查系统中是否已经设置了某些特定标志了，如果有说明已经有一个实例在运行了，则当前程序通知用户怎样怎样，然后程序退出，当然方法有这么多，各自也就有自己的优缺点了。
 
方法一]]></description><category></category></item><item><title><![CDATA[[转]绝对绝对不要TerminateThread]]></title><link>https://blog.csdn.net/alphabuilder/article/details/7776815</link><guid>https://blog.csdn.net/alphabuilder/article/details/7776815</guid><author>alphabuilder</author><pubDate>Mon, 23 Jul 2012 20:15:03 +0800</pubDate><description><![CDATA[听过无数次不要TerminateThread，只是工作中常用，貌似也没有什么问题。今天在高强度测试中发现了一个不可原谅的错误。参看下面的例子
 

DWORD __stdcall mythread(void* )
{
    while( true )
    {
        char* p = new char[1024];

        delete p;]]></description><category></category></item><item><title><![CDATA[[转]理解EnterCriticalSection 临界区]]></title><link>https://blog.csdn.net/alphabuilder/article/details/7771566</link><guid>https://blog.csdn.net/alphabuilder/article/details/7771566</guid><author>alphabuilder</author><pubDate>Sat, 21 Jul 2012 23:17:12 +0800</pubDate><description><![CDATA[通俗解释就像上厕所： 
门锁了，就等着，等到别人出来了，进去锁上，然后该干什么干什么，干完了，把门打开 
门没锁，就进去，锁上，然后该干什么干什么，干完了，把门打开 
-------------------------------------------------- 
多线程中用来确保同一时刻只有一个线程操作被保护的数据 
InitializeCriticalSection(&cs);]]></description><category></category></item><item><title><![CDATA[gcc内联汇编将结构体成员清零]]></title><link>https://blog.csdn.net/alphabuilder/article/details/7693860</link><guid>https://blog.csdn.net/alphabuilder/article/details/7693860</guid><author>alphabuilder</author><pubDate>Tue, 26 Jun 2012 17:49:49 +0800</pubDate><description><![CDATA[typedef struct tagstru
{
 int a;
 int b;
 int c;
}stru;	
 
 stru sa;
 sa.a = 0x123;
 sa.b = 0x456;
 sa.c = 0x789;

 printf("stru: a=%d b=%d c=%d\n", sa.a, sa.b, sa.c);

 __asm__ __volati]]></description><category></category></item><item><title><![CDATA[void Mask_1 - gcc汇编]]></title><link>https://blog.csdn.net/alphabuilder/article/details/7671495</link><guid>https://blog.csdn.net/alphabuilder/article/details/7671495</guid><author>alphabuilder</author><pubDate>Sun, 17 Jun 2012 19:41:04 +0800</pubDate><description><![CDATA[void Mask_1(unsigned char * const ptrDestBuffer, const unsigned char * const ptrSrcBuffer, int Width, int Height, int idLineAdd, int isLineAdd, int idPixelAdd, int isPixelAdd, int MaskColor)
{
 cons]]></description><category></category></item><item><title><![CDATA[内联汇编优化的TAlpha::FillSolidColor]]></title><link>https://blog.csdn.net/alphabuilder/article/details/7668520</link><guid>https://blog.csdn.net/alphabuilder/article/details/7668520</guid><author>alphabuilder</author><pubDate>Sat, 16 Jun 2012 10:43:44 +0800</pubDate><description><![CDATA[#ifndef __GNUC__
   #define _calpha_using_inlineasm_  1
#else
   #define _calpha_using_gccinlineasm_  1
   #ifdef _calpha_using_inlineasm_
      #undef _calpha_using_inlineasm_
   #endif
#endif]]></description><category></category></item><item><title><![CDATA[内联汇编优化的TAlpha::Mask 部分汇编]]></title><link>https://blog.csdn.net/alphabuilder/article/details/7662651</link><guid>https://blog.csdn.net/alphabuilder/article/details/7662651</guid><author>alphabuilder</author><pubDate>Thu, 14 Jun 2012 13:21:15 +0800</pubDate><description><![CDATA[内联汇编优化版
 #ifdef _calpha_using_inlineasm_
    i = Height - 1;
    if (i < 0)
     return;

    __asm
     {
      mov ecx, Width
      mov eax, ptrDest
      mov edx, ptrSrc
      mov esi, i]]></description><category></category></item><item><title><![CDATA[内联汇编优化的TAlpha::FillSolidColor 部分汇编]]></title><link>https://blog.csdn.net/alphabuilder/article/details/7648212</link><guid>https://blog.csdn.net/alphabuilder/article/details/7648212</guid><author>alphabuilder</author><pubDate>Sat, 09 Jun 2012 15:24:04 +0800</pubDate><description><![CDATA[if ((lr & 1) == 1)
  {
   asm
    {
     cld
    }
   lr >>= 1;
   for (; i >= 0; i--)
    {
     //memcpy(ptrDest, ptrBuffer, lr);
     asm
      {
       mov ecx, 1
       mov esi, ptrB]]></description><category></category></item></channel></rss>