不用MFC好久了,再用时发现,东西忘了好多:
自绘制按钮也不会做了。
1 btn=new CMyButton;2 CRect rt(10,10,100,100);3 btn->Create("Hello",BS_OWNERDRAW,rt,this,0);4 btn->ShowWindow(SW_SHOW);
这个Create时的BS_OWNERDRAW必须要加上,否则它根本就不调我写的DrawItem和OnDrawItem。