Visual C++备忘录

来源:互联网 发布:哪个软件可以播音 编辑:程序博客网 时间:2024/06/06 14:12

大笑微笑生气吐舌头吐舌头吐舌头吐舌头吐舌头吐舌头吐舌头吐舌头吐舌头吐舌头吐舌头生气微笑大笑


偷笑我爱北京天安门偷笑


偷笑天安门上太阳升偷笑


偷笑伟大领袖毛主席偷笑


偷笑指引我们向前进偷笑

偷笑大笑大笑大笑大笑大笑大笑大笑大笑大笑大笑大笑大笑大笑大笑大笑大笑偷笑

<p><strong>有些东西,说来好简单,但有时老记不清,拿不准.在此作些备忘录.不要说它"简单",都多少次了,多么久了,你还老记不住,还敢说简单!</strong></p> <p><strong>1.</strong>&nbsp; CRect (32, 64, 352, 304));</p> <p>&nbsp;&nbsp;&nbsp;CRect (left, top, right, bottom);</p> <p>The four parameters passed to <i>CRect</i>'s constructor specify, in order, the rectangle's left, top, right, and bottom screen coordinates.</p> <p><strong>2.</strong>&nbsp; How to disable a "Windows Style" when creating a window?</p> <p>Create (NULL, _T ("Hello"), ~WS_MAXIMIZEBOX &amp; WS_OVERLAPPEDWINDOW | WS_VSCROLL | WS_HSCROLL);</p> <p>Note this:&nbsp;&nbsp; &nbsp;<strong>~WS_MAXIMIZEBOX &amp;</strong>&nbsp;&nbsp;&nbsp; </p> <p>That's the trick!</p> <p><strong>3.</strong>&nbsp; The different&nbsp;character process&nbsp;between ANSI and Unicode:</p><pre>use the ANSI character set:</pre><pre>char szMsg[256]; pWnd-&gt;GetWindowText (szMsg, sizeof (szMsg)); strcat (szMsg, " is the window title"); MessageBox (szMsg);</pre><pre>use the Unicode character set:</pre><pre>TCHAR szMsg[256]; pWnd-&gt;GetWindowText (szMsg, sizeof (szMsg) / sizeof (TCHAR)); _tcscat (szMsg, _T (" is the window title")); MessageBox (szMsg);</pre>