VC雕虫小技集(四)[2]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 he_zhidan 的 blog

       cstring str = t.format("%h - %m  -%s");

       m_wndstatusbar.setpanetext(0,str);

 

}

 

4,模拟鼠标

::setcursorpos((int)ptmouse->x,(int)ptmouse->y);

::mouse_event(mouseeventf_leftdown,0,0,0,0);    

::mouse_event(mouseeventf_leftup,0,0,0,0);   

::mouse_event(mouseeventf_leftdown,0,0,0,0);

::mouse_event(mouseeventf_leftup,0,0,0,0);

 

5,什么是word, dword

 typedef unsigned short word

 typedef unsigned long  dword

 

6,移动控件

 cwnd * pwnd = getdlgitem(idc_button1);

       crect r;

       pwnd->getwindowrect(&r);

       r.left +=50;

       r.right += 50;

       pwnd->movewindow(r);

 

7, 如何让对话框中的cedit响应enter键回车

getdlgitem(idc_edit1)->setwindowtext("111\r\n22");

右键属性

sytle -> multiline选上

最好把want return 也选上

 

8,c语言转化为汇编

vc++ provides this feature.

project->settings...

c/c++ tab

本文关键:VC 雕虫小技集
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top