堆栈溢出

3751 发表于 2010-06-18 14:30:30

昨天FEP在读取一个客户的项目文件时,居然在std::find里面死掉了,奇怪了很久,结果发现是在某处陷入死循环导致了堆栈溢出…

R6025 -Pure virtual function call

3751 发表于 2010-04-08 17:48:35

今天遇到了一个奇怪的bug,在debug下面固定从某地方开始直接退出程序,没人任何信息。找了很久,然后运行下release,结果弹出了个“R6025 -Pure virtual function call”,上网一查,好像是微软的问题,看这里。照做还是没有搞定问题,疑惑了很久,最后重启了下机器,才能正常运行。

[转]用python实现自动扫雷机

3751 发表于 2010-01-06 08:16:44

原文地址:http://python.djhui.net/post/45.html

捕获WM_MOUSELEAVE消息

3751 发表于 2009-12-31 15:52:27

如何让一个窗口可以捕获到WM_MOUSELEAVE消息了?
以前不知道都是用SetCapture和ReleaseCapture来取得类似的效果,可是使用SetCapture和ReleaseCapture在一些情况下毕竟不方便使用。
其实很简单在OnMouseMove里面写下以下代码即可:
    TRACKMOUSEEVENT tm;
    tm.cbSize = sizeof(TRACKMOUSEEVENT);
    tm.hwndTrack = m_hWnd;
    tm.dwFlags = TME_LEAVE;
    _TrackMouseEvent(&tm);

关于滚动条

3751 发表于 2009-12-25 15:33:39

MSDN里面如是说
The SetScrollRange function is provided for backward compatibility. New applications should use the SetScrollInfo function.
The GetScrollRange function is provided for compatibility only. New applications should use the GetScrollInfo function.
The SetScrollPos function is provided for backward compatibility. New applications should use the SetScrollInfo function.
The GetScrollPos function is provided for backward compatibility. New applications should use the GetScrollInfo function.
另外这段话值得多看几遍
The SetScrollInfo function performs range checking on the values specified by the nPage and nPos members of the SCROLLINFO structure. The nPage member must specify a value from 0 to nMax - nMin +1. The nPos member must specify a value between nMin and nMax - max( nPage– 1, 0). If either value is beyond its range, the function sets it to a value that is just within the range.
我的个人理解是nPage的取值范围是[0, nMax-nMin+1]
nPos的取值范围是[nMin, nMax - max( nPage– 1, 0)]
总觉得有些东西很奇怪,也许是我E文不佳没理解透吧。
关键词(Tag): 滚动条 cscrollbar

关于DT_VCENTER

3751 发表于 2009-12-25 15:06:30

This value is used only with the DT_SINGLELINE value.
MSDN如此说,不过这也是很明显的事情,刚开始没意识到,浪费了不少时间…

C的内存分配

3751 发表于 2009-03-05 11:55:16

以前一直没能记住calloc的名字…不知道为什么叫calloc
阅读203次 评论4条 个人主页 扔小纸条 文件夹: C++

推荐一个好东西VisualSVN Server

3751 发表于 2009-03-04 10:55:27

VisualSVN Server帮助我这种apache菜鸟解决了在windows下架设svn服务器的大难题,推荐之。
关键词(Tag): windows apache svn