Katex
2012年1月28日 星期六
MFC : Linker error
Link error message:
nafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z) already defined in libcpmtd.lib(newaop.obj)
修正方式:
在
Project->Property->configuration Properties->Linker->Input->Additional Dependencies
和
Project->Property->configuration Properties->Linker->Input->Ignore Specific Library
加入:
nafxcwd.lib
libcpmtd.lib
如下:
2012年1月26日 星期四
MFC : SetROP2
一般用 R2_NOT, 在畫第二次時就會把第一次畫的清為底色
afx_msg void OnMouseMove(UINT, CPoint point)
{
if (this == GetCapture() )
{
CClientDC aDC(this);
aDC.SetROP2(R2_NOT);
aShape->draw(aDC);
aShape->SetEndPoint(point);
aShape->draw(aDC, lcolor);
}
}
- R2_BLACK Pixel is always black.
- R2_WHITE Pixel is always white.
- R2_NOP Pixel remains unchanged.
- R2_NOT Pixel is the inverse of the screen color.
- R2_COPYPEN Pixel is the pen color.
- R2_NOTCOPYPEN Pixel is the inverse of the pen color.
- R2_MERGEPENNOT Pixel is a combination of the pen color and the inverse of the screen color (final pixel = (NOT screen pixel) OR pen).
- R2_MASKPENNOT Pixel is a combination of the colors common to both the pen and the inverse of the screen (final pixel = (NOT screen pixel) AND pen).
- R2_MERGENOTPEN Pixel is a combination of the screen color and the inverse of the pen color (final pixel = (NOT pen) OR screen pixel).
- R2_MASKNOTPEN Pixel is a combination of the colors common to both the screen and the inverse of the pen (final pixel = (NOT pen) AND screen pixel).
- R2_MERGEPEN Pixel is a combination of the pen color and the screen color (final pixel = pen OR screen pixel).
- R2_NOTMERGEPEN Pixel is the inverse of the R2_MERGEPEN color (final pixel = NOT(pen OR screen pixel)).
- R2_MASKPEN Pixel is a combination of the colors common to both the pen and the screen (final pixel = pen AND screen pixel).
- R2_NOTMASKPEN Pixel is the inverse of the R2_MASKPEN color (final pixel = NOT(pen AND screen pixel)).
- R2_XORPEN Pixel is a combination of the colors that are in the pen or in the screen, but not in both (final pixel = pen XOR screen pixel).
- R2_NOTXORPEN Pixel is the inverse of the R2_XORPEN color (final pixel = NOT(pen XOR screen pixel)).
C++ - 判斷同類別
例如:
有基本物件
class MyShape;
和三個繼承物件
class MyLine : MyShape;
class MyRect : MyShape;
class MyEllipse : MyShape;
MyShape *aShape = (MyShape*)new MyLine;
MyShape *aShape = (MyShape*)new MyRect;
MyShape *aShape = (MyShape*)new MyEllipse;
要判斷 aShape 是哪種類別, 可用:
typeid(*aShape) == typeid(MyLine)
使用時要
有基本物件
class MyShape;
和三個繼承物件
class MyLine : MyShape;
class MyRect : MyShape;
class MyEllipse : MyShape;
MyShape *aShape = (MyShape*)new MyLine;
MyShape *aShape = (MyShape*)new MyRect;
MyShape *aShape = (MyShape*)new MyEllipse;
要判斷 aShape 是哪種類別, 可用:
typeid(*aShape) == typeid(MyLine)
使用時要
#include
是 class type_info
也可以用 cout << typeid(*aShape).name() << endl;
直接印出類別名稱.
2012年1月22日 星期日
Mysql
1. Download/Install SQL server
http://dev.mysql.com/downloads/mysql/
2. MySQL GUI client
Heidi-SQL
http://www.heidisql.com/download.php
http://dev.mysql.com/downloads/mysql/
http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.20-winx64.msi/from/http://mysql.ntu.edu.tw/
2. MySQL GUI client
Heidi-SQL
http://www.heidisql.com/download.php
2011年1月24日 星期一
2002年11月6日 星期三
C language
C 是由美國 Dennis Ritchie 所設計, 為了和 K. Thompson 發展 Unix 而開發的電腦語言.
C language keywords
struct
enum
union
運算 Operation
函數 Function
http://www.cplusplus.com/reference/clibrary/
資料結構 Data Structure
演算法 Algorithm
http://caterpillar.onlyfun.net/Gossip/AlgorithmGossip/AlgorithmGossip.htm
資料庫
Borland
C language keywords
struct
enum
union
運算 Operation
函數 Function
http://www.cplusplus.com/reference/clibrary/
資料結構 Data Structure
linked list
STL
STL
演算法 Algorithm
http://caterpillar.onlyfun.net/Gossip/AlgorithmGossip/AlgorithmGossip.htm
資料庫
速度
(auto) int v.s. register int
-- 懷舊 --
Borland
訂閱:
文章 (Atom)
熱門文章
-
深淵求索 - Deepseek 之道列表 -- 最近有 Google AI 幫助科學家加速研究的新聞 Google’s new AI co-scientist aims to speed up the scientific discovery process 不過這似乎離我有...
-
整理光碟時, 發現十年前日劇 Trick2 的主題曲. 流星群 / 鬼束ちひろ 作詞‧作曲:鬼束ちひろ 編曲:羽毛田丈史 言葉にならない夜は 無法言喻的夜晚 貴方が上手に伝えて 你高明地表達了 絡み付い...