锘??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美亚洲国产精品久久久久,99re这里只有精品热久久,久久久噜噜噜久久中文字幕色伊伊 http://m.shnenglu.com/flyingxu/category/1483.htmlto get ready...zh-cnMon, 19 May 2008 13:03:25 GMTMon, 19 May 2008 13:03:25 GMT60Memory leak in CWinThread?http://m.shnenglu.com/flyingxu/archive/2006/07/26/10557.htmlflyingxuflyingxuWed, 26 Jul 2006 11:11:00 GMThttp://m.shnenglu.com/flyingxu/archive/2006/07/26/10557.htmlhttp://m.shnenglu.com/flyingxu/comments/10557.htmlhttp://m.shnenglu.com/flyingxu/archive/2006/07/26/10557.html#Feedback3http://m.shnenglu.com/flyingxu/comments/commentRss/10557.htmlhttp://m.shnenglu.com/flyingxu/services/trackbacks/10557.html綾諱技鐨勯棶棰樿http://www.experts-exchange.com/Programming/Programming_Languages/MFC/Q_20084406.html

涓嬮潰鐨勪唬鐮侊紝褰撶敤AfxBeginThread寮濮嬩竴涓嚎紼嬫椂錛屽疄闄呬笂鏄湁鍐呭瓨娉勬紡鐨?/p>

for 聽(ii聽 = 0 ;聽ii聽 < 1000 ;聽ii ++ )聽
{
聽聽CWinThread聽
*
pWinThread;聽
聽聽pWinThread聽
=
聽AfxBeginThread(ThreadLBProc,聽NULL);
聽聽::Sleep(
500
);
}

UINT聽ThreadLBProc(LPVOID聽pParam)
{
聽聽
return 0
;
}

VC杈撳嚭鐨勫吀鍨嬫彁紺轟負錛?br />Detected memory leaks!
Dumping objects ->
thrdcore.cpp(166) : {782} client block at 0x00425300, subtype 0, 112 bytes long.
瀹為檯涓婏紝鍙鐪嬪埌鏄?font style="BACKGROUND-COLOR: #ffff00">thrdcore.cpp(166) 鐨勫唴瀛樻硠婕忥紝鍩烘湰灝辨槸鍚屼竴涓師鍥狅紝鍜屼笂闈㈢殑浠g爜涓鏍楓?br />瑙e喅鏂規硶錛?br />step 1)
鍦ㄧ嚎紼嬪嚱鏁頒腑錛岃寰楀啓AfxEndThread();(涓嶢fxBeginThread瀵瑰簲錛屽叾浠栫殑寮濮嬬嚎紼嬬殑鍑芥暟錛屾湁鐩稿簲鐨勫嚱鏁?
step 2)
鐢?:WaitForSingleObject()紜繚綰跨▼褰誨簳閫鍑?br />
step 2鏄瘮杈冨鏄撳拷鐣ョ殑錛岀敤sleep鍑芥暟鍙兘渚ュ垢鐨勪繚璇佺嚎紼嬮鍑猴紝浣嗕笉鑳界‘淇濄?img src ="http://m.shnenglu.com/flyingxu/aggbug/10557.html" width = "1" height = "1" />

flyingxu 2006-07-26 19:11 鍙戣〃璇勮
]]>
鍐嶈皟璇曠姸鎬佷笅錛屾寜涓婩12錛岀▼搴忓氨鍑洪敊浜嗭紙VC錛?/title><link>http://m.shnenglu.com/flyingxu/archive/2006/07/13/9818.html</link><dc:creator>flyingxu</dc:creator><author>flyingxu</author><pubDate>Thu, 13 Jul 2006 10:29:00 GMT</pubDate><guid>http://m.shnenglu.com/flyingxu/archive/2006/07/13/9818.html</guid><wfw:comment>http://m.shnenglu.com/flyingxu/comments/9818.html</wfw:comment><comments>http://m.shnenglu.com/flyingxu/archive/2006/07/13/9818.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/flyingxu/comments/commentRss/9818.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/flyingxu/services/trackbacks/9818.html</trackback:ping><description><![CDATA[鐢╒C璋冭瘯紼嬪簭錛屽彧瑕佹寜涓婩12錛岀▼搴忓氨鍑洪敊浜嗭紝鍑洪敊鐨勪唬鐮佽繕寰堝鎬紝鍐峆eekMessage涓紝浣嗘槸鍙嚭鐜板湪璋冭瘯錛堟寜F5錛夛紝涓嶅嚭鐜板湪鍏ㄩ熻繍琛岋紙Ctrl+F5錛夛紝release鐗堟湰涔熸病鏈夐棶棰?br />緗戜笂鐨勮В絳?<br /><a >http://support.microsoft.com/kb/q130667/</a>聽F12灞呯劧灝辨槸榪欎箞瀹氫箟鐨勶紝ft<br /><br />鎵浠ワ紝鍦ㄥ畾涔夌▼搴忓姛鑳界殑鏃跺欙紝灝卞敖閲忎笉瑕佺敤鍒癋12 錛屽搱<img src ="http://m.shnenglu.com/flyingxu/aggbug/9818.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/flyingxu/" target="_blank">flyingxu</a> 2006-07-13 18:29 <a href="http://m.shnenglu.com/flyingxu/archive/2006/07/13/9818.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>bug錛?OnIdle called only while mouse's movinghttp://m.shnenglu.com/flyingxu/archive/2006/07/09/9593.htmlflyingxuflyingxuSat, 08 Jul 2006 18:03:00 GMThttp://m.shnenglu.com/flyingxu/archive/2006/07/09/9593.htmlhttp://m.shnenglu.com/flyingxu/comments/9593.htmlhttp://m.shnenglu.com/flyingxu/archive/2006/07/09/9593.html#Feedback1http://m.shnenglu.com/flyingxu/comments/commentRss/9593.htmlhttp://m.shnenglu.com/flyingxu/services/trackbacks/9593.htmlhttp://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.vc.mfc&mid=1aa1eddf-7bcf-407b-84fe-234fe0975331&sloc=en-us錛?br />
I聽need聽to聽update聽one聽class聽data聽and聽the聽view聽during聽the聽idle,聽I聽used聽this聽聽
method聽
in聽the聽Cdoc:
void聽CMyAppDoc::OnIdle(){

聽聽聽聽theClass
->
Update();
聽聽聽聽POSITION聽pos聽
=
聽GetFirstViewPosition();
聽聽聽聽CView
*聽pView聽=
聽GetNextView(pos);
聽聽聽聽pView
->Invalidate(true
);
聽聽聽聽pView
->
UpdateWindow();聽聽聽聽
}


It聽works聽only聽when聽I聽move聽the聽mouse,聽what
's聽wrong?聽Z_Z
榪欎釜闂鐨勭‘姣旇緝鎼烇紝瑕佸ソ濂界湅mfc婧愮爜鐨勶紝涓嬮潰鏄垜鐨勫洖絳?br />Nothing is wrong, I can explain it聽 is by design.
Please take a look at the source code of int CWinThread::Run(), in that function, IsIdleMessage() is called, and in IsIdleMessage() WM_PAINT is ignored, which means WM_PAINT will not cause OnIdle to be called, for windows think it's just a WM_PAINT message and will not change the UI.
Your UpdateWindow() only post a WM_PAINT message, the message queue is not empty but it's ignored by IsIdleMessage(), that's why.
But when you move your mouse, the message queue is filled with some WM_MOUSEMOVE and it's not ignored for the position changes. So your OnIdle() is called again.
-
My suggestion is to move your Invalidate & UpdateWindow code to somewhere else.
OnIdle錛堬級鐨勭‘鏄釜鏈夌偣澶嶆潅鐨勯棶棰橈紝鎴戝彲鑳借繕浼氬啓鍑犵瘒鏂囩珷 錛氾級
榪欓噷錛?a >http://groups.google.com/group/microsoft.public.vc.mfc/browse_thread/thread/14f20aa5ffd6994d/66b6e5949a31bfa2?lnk=st&q=AfxUnlockTempMaps&rnum=40&hl=zh-CN#66b6e5949a31bfa2錛夋湁綃囨枃绔犺鐨勫緢鍒頒綅

flyingxu 2006-07-09 02:03 鍙戣〃璇勮
]]>
_asm int 3 鐨勪竴涓簲鐢細鍦ㄧ▼搴忚繍琛屽悗鍐嶈繘鍏ヨ皟璇曞櫒http://m.shnenglu.com/flyingxu/archive/2006/07/06/9493.htmlflyingxuflyingxuThu, 06 Jul 2006 09:35:00 GMThttp://m.shnenglu.com/flyingxu/archive/2006/07/06/9493.htmlhttp://m.shnenglu.com/flyingxu/comments/9493.htmlhttp://m.shnenglu.com/flyingxu/archive/2006/07/06/9493.html#Feedback8http://m.shnenglu.com/flyingxu/comments/commentRss/9493.htmlhttp://m.shnenglu.com/flyingxu/services/trackbacks/9493.html1錛夊惎鍔ㄨ皟璇曞櫒錛屾瘮濡俈C
2錛夊湪VC涓鏂偣
3錛夋搷浣滅▼搴忥紝浣垮緱紼嬪簭榪愯鍒版柇鐐癸紝鍋滀笅鏉?br />浣嗘槸鐜板湪鎴戦亣鍒頒竴涓儏鍐碉紝甯屾湜璋冭瘯鐨勬儏鏅槸榪欐牱鐨勶細鍙屽嚮鏌愪釜鏂囦歡錛屾垜鐨勭▼搴忓惎鍔ㄥ悗錛岃繖涓椂鍊欐垜鎯崇▼搴忓仠涓嬫潵錛岃鎴戝湪VC涓皟璇曞畠銆?br />浣嗘槸錛屽弻鍑繪枃浠跺悗鍚姩鐨勭▼搴忥紝鏄釜鐙珛鐨別xe榪愯紼嬪簭錛岃偗瀹氫笉鏄湪VC鐨勮繍琛屾帶鍒朵笅鐨勶紝VC涓緗殑鏂偣涓嶈搗浣滅敤鐨勩傛庝箞鍔炲憿錛?br />榪欎釜鏃跺欏彲浠ュ湪鎯寵紼嬪簭鍋滀笅鏉ョ殑鍦版柟澧炲姞鎸囦護_asm int 3錛宒ebug涓嬬紪璇戝ソ銆傚弻鍑繪枃浠跺悗榪愯榪欎釜exe錛屽湪exe榪愯鍒癬asm int 3鏃訛紝灝變細涓柇錛岃屾妸褰撳墠鐨別xe榪愯涓庝竴涓柊鐨勮皟璇曞櫒錛堜竴涓柊鐨刅C榪涚▼錛夌粨鍚堣搗鏉ャ傛帴涓嬫潵灝卞儚涓鑸殑璋冭瘯浜嗐?br />榪欐椂鐨勮皟璇曟楠ょ被浼間笌錛?br />1錛夌▼搴忚繍琛?br />2錛夐亣鍒扮壒瀹氭潯浠舵椂錛宊asm int 3鎶婂綋鍓峞xe涓庝竴涓柊鐨勮皟璇曞櫒錛屾瘮濡備竴涓柊鐨刅C榪涚▼錛岃仈緋昏搗鏉?br />3錛夊湪璋冭瘯鍣ㄤ腑璋冭瘯exe

錛氾級

flyingxu 2006-07-06 17:35 鍙戣〃璇勮
]]>
緙栬瘧浼樺寲閫夐」涓嶅尮閰嶅紩璧風殑涓涓猙ughttp://m.shnenglu.com/flyingxu/archive/2006/06/02/8075.htmlflyingxuflyingxuFri, 02 Jun 2006 02:32:00 GMThttp://m.shnenglu.com/flyingxu/archive/2006/06/02/8075.htmlhttp://m.shnenglu.com/flyingxu/comments/8075.htmlhttp://m.shnenglu.com/flyingxu/archive/2006/06/02/8075.html#Feedback0http://m.shnenglu.com/flyingxu/comments/commentRss/8075.htmlhttp://m.shnenglu.com/flyingxu/services/trackbacks/8075.html浠婂ぉ閬囧埌涓涓棶棰樻洿濂囨?閮芥槸debug鐗堟湰,浣嗘槸exe鍜宒ll鐨刼ptimizations璁劇疆涓嶄竴鏍?閮戒細鍑鴻帿鍚嶇殑閿欒,鍑洪敊琛屾洿鎼炵瑧,鏄?br />m_ComboBox.AddString(_T("") )
鎬庝箞鏌ヤ篃鏌ヤ笉鍑洪棶棰?鎶婁紭鍖栭夐」鏀規垚涓鑷撮棶棰樺氨娌℃湁浜?鎼炰笉鎳?img src ="http://m.shnenglu.com/flyingxu/aggbug/8075.html" width = "1" height = "1" />

flyingxu 2006-06-02 10:32 鍙戣〃璇勮
]]>
閿欒鎻愮ず"An unsupported operation was attempted"鐨勫師鍥?/title><link>http://m.shnenglu.com/flyingxu/archive/2006/05/31/7963.html</link><dc:creator>flyingxu</dc:creator><author>flyingxu</author><pubDate>Wed, 31 May 2006 09:27:00 GMT</pubDate><guid>http://m.shnenglu.com/flyingxu/archive/2006/05/31/7963.html</guid><wfw:comment>http://m.shnenglu.com/flyingxu/comments/7963.html</wfw:comment><comments>http://m.shnenglu.com/flyingxu/archive/2006/05/31/7963.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/flyingxu/comments/commentRss/7963.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/flyingxu/services/trackbacks/7963.html</trackback:ping><description><![CDATA[緙栬瘧濂戒簡,榪愯涓涓▼搴?璇曞浘鎵撳紑涓涓璇濇鏃?瀵硅瘽妗嗗嚭涓嶆潵,鍙嶅掓槸鍑烘潵涓涓敊璇彁紺?<br />"An unsupported operation was attempted"<br />鎼滀簡涓涓?<a ><br />http://www.experts-exchange.com/Programming/Programming_Languages/MFC/Q_21023191.html</a>閲岄潰鏈夊洖絳?鐨勭‘鏄偅鏍風殑,鏄痳esource id鐨勯棶棰?<br /><br />閿欒鍘熷洜:<br />寮濮?緇欎竴涓猺adio鏄犲皠浜嗕竴涓彉閲?<br /><div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><span style="COLOR: #000000"><font face="Courier New">聽DDX_Radio(pDX,聽IDC_RADIO1,聽m_nFindType);</font></span></div>鍚庢潵鍙戠幇<u>IDC_RADIO1</u>榪欎釜id涓嶅ソ,鏀逛負聽DDX_Radio(pDX, <u>IDC_RADIO_BIT,</u> m_nFindType);<br />緙栬瘧褰撶劧涓嶄細鍑洪敊,榪愯鏃?灝卞嚭鐜板紓甯鎬簡.濡傛灉鍦ㄤ笂闈㈢殑浠g爜涓婅涓柇鐐?鐒跺悗璺熻釜榪涘幓,鐪嬬殑闈炲父娓呮.<br /><br /><img src ="http://m.shnenglu.com/flyingxu/aggbug/7963.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/flyingxu/" target="_blank">flyingxu</a> 2006-05-31 17:27 <a href="http://m.shnenglu.com/flyingxu/archive/2006/05/31/7963.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鍦∣nPaint()浣跨敤涓ゆCPaintDC錛屽叧浜?:BeginPaint()/::EndPaint()http://m.shnenglu.com/flyingxu/archive/2006/05/22/7517.htmlflyingxuflyingxuMon, 22 May 2006 15:39:00 GMThttp://m.shnenglu.com/flyingxu/archive/2006/05/22/7517.htmlhttp://m.shnenglu.com/flyingxu/comments/7517.htmlhttp://m.shnenglu.com/flyingxu/archive/2006/05/22/7517.html#Feedback3http://m.shnenglu.com/flyingxu/comments/commentRss/7517.htmlhttp://m.shnenglu.com/flyingxu/services/trackbacks/7517.html榛樿鐨勪唬鐮佸涓嬶細
void聽CHideSplitterWnd::OnPaint()聽
{
聽聽聽聽CPaintDC聽dc(
this);聽//
聽device聽context聽for聽painting
聽聽聽聽
//
聽TODO:聽Add聽your聽message聽handler聽code聽here
聽聽聽聽
//聽Do聽not聽call聽CSplitterWnd::OnPaint()聽for聽painting聽messages

}
wizard娣誨姞鐨勪唬鐮佸眳鐒舵湁榪欐牱涓琛岋細//聽Do聽not聽call聽CSplitterWnd::OnPaint()聽for聽painting聽messages錛屽悗闈㈡湁涓寽嫻嬨?br />鐒跺悗鎴戠戶緇啓鎴戠殑鍑芥暟錛?br />
void聽CHideSplitterWnd::OnPaint()聽
{
聽聽聽聽CPaintDC聽dc(
this);聽//
聽device聽context聽for聽painting
聽聽聽聽
聽聽聽聽
//聽璋冪敤鍩虹被錛屽厛

聽聽聽聽CSplitterWnd::OnPaint();
聽聽聽聽
聽聽聽聽聽//
鍒╃敤dc鐢諱竴浜涘埆鐨勪笢瑗匡紝浣嗘槸瀹為檯涓婏紝瀹冧滑姘歌繙涓嶄細琚敾鍑烘潵
聽聽聽//闄ら潪涓嶈皟鐢ㄥ熀綾葷殑OnPaint()

聽聽聽聽m_rectButton.DrawButton(&dc);
}
緇撴灉鎴戞坊鍔犵殑涓滆タ鎬庝箞涔熶笉浼氳鐢誨嚭鏉ワ紝涓轟粈涔堜細榪欐牱錛?br />

鐪嬩簡CSplitterWnd::OnPaint()鐨勪唬鐮侊紝鍙戠幇瀹冧篃鐢ㄤ簡涓涓狢PaintDC錛岃屼笖涔熸槸涓復鏃跺彉閲?br />
void聽CSplitterWnd::OnPaint()
{
聽聽聽聽ASSERT_VALID(
this
);
聽聽聽聽CPaintDC聽dc(
this);
鑰屽叧閿殑鍦版柟灝卞湪CPaintDC鐨刢tor鍜宒tor涓簡錛氬湪CPaintDC鐨刢tor涓皟鐢ㄤ簡
::BeginPaint(m_hWnd聽=聽pWnd->m_hWnd,聽&m_ps)
鑰屽湪CPaintDC鐨刣tor涓皟鐢ㄤ簡
::EndPaint(m_hWnd,聽&m_ps);
鑰岋細BeginPaint鏄紑濮嬫牴鎹綋鍓嶇殑cliprect鏉ョ敾錛孍ndPaint鍒欎細娓呯┖褰撳墠鐨刢liprect銆?br />

鎵浠ワ紝鍓嶉潰璋冪敤鍩虹被鐨凮nPaint鐨勮繃紼嬬粨鏉熷悗錛屽綋鍓嶇殑cliprect涓篘ULL錛屾墍浠ワ紝絎簩涓狢PaintDC鍦ㄨ鍥劇敾鐐逛粈涔堟椂錛宑liprect宸茬粡涓篘ULL錛屽綋鐒朵粈涔堜篃鐢諱笉涓婂幓浜?錛氾級

濡傛灉鎴戜竴瀹氭兂鍐嶇敤CPaintDC鐢葷偣浠涔堬紝鎬庝箞鍔烇紵鍐嶆璋冪敤InvalidateRect錛屼嬌寰梒liprect涓嶄負絀恒?/font>
void聽CHideSplitterWnd::OnPaint()聽
{
聽聽聽 //娉ㄦ剰涓存椂鍙橀噺澹版槑鐨勯『搴忥紝鍥犱負BeginPaint/EndPaint鏄笉鏀寔宓屽鐨?br />聽聽聽聽//CPaintDC聽dc(
this);聽//
聽device聽context聽for聽painting
聽聽聽聽
聽聽聽聽
//聽TODO:聽Add聽your聽message聽handler聽code聽here

聽聽聽聽CSplitterWnd::OnPaint();
聽聽聽聽
聽聽聽 //絎簩姝よ皟鐢?br />聽聽聽聽InvalidateRect(
&
m_rectButton,FALSE);
聽聽聽聽CPaintDC聽dc(
this);聽//聽鍦ㄨ繖閲岋紝device聽context聽for聽painting

聽聽聽聽m_rectButton.DrawButton(&dc);
聽聽聽聽
聽聽聽聽
//聽Do聽not聽call聽CSplitterWnd::OnPaint()聽for聽painting聽messages

}
鎵浠ワ紝鎴戠寽嫻嬶紝鎵鏈夌敤浜咰PaintDC鐨勫湴鏂癸紝MFC閮戒細鍔犱竴鍙ワ細涓嶈璋冪敤鍩虹被鐨勫嚱鏁板暒锝?br />
鍛靛懙錛屼笉鐭ラ亾鎴戣娓呮娌℃湁

flyingxu 2006-05-22 23:39 鍙戣〃璇勮
]]>
鎶婁唬鐮佺Щ妞嶆垚UNICODEhttp://m.shnenglu.com/flyingxu/archive/2006/05/18/7356.htmlflyingxuflyingxuThu, 18 May 2006 08:09:00 GMThttp://m.shnenglu.com/flyingxu/archive/2006/05/18/7356.htmlhttp://m.shnenglu.com/flyingxu/comments/7356.htmlhttp://m.shnenglu.com/flyingxu/archive/2006/05/18/7356.html#Feedback2http://m.shnenglu.com/flyingxu/comments/commentRss/7356.htmlhttp://m.shnenglu.com/flyingxu/services/trackbacks/7356.html 鍔ㄦ満 : 鍦ㄦ病鏈夎涓枃瀛椾綋鐨勬満鍣ㄤ笂鏄劇ず涓枃

濡傛灉涓嶆槸unicode,鏌愪簺涓枃瀛楃浼氬湪涓嶅悓鐨?/span>codepage涓婂嚭鐜頒貢鐮?/span>;濡傛灉褰撳墠codepage涓洪煩鏂囨椂,鏌愪簺涓枃瀛椾細鍙樻垚闊╂枃鐨勬牱瀛?/span>,濂囨?/span>.

Step1: define _UNICODE, undefine _MBCS

瀹忓畾涔?/span>UNICODE, _UNICODE瀹氫箟涓や釜涔熷彲浠?/span>,瀹氫箟涓涓篃鍙互,windows鐨勫ご鏂囦歡浼氫繚璇佷袱涓兘浼氳瀹氫箟.

#ifdef聽_UNICODE
#ifndef聽UNICODE
#define 聽UNICODE聽 // 聽UNICODE聽is聽used聽by聽Windows聽headers

#endif
#endif


#ifdef聽UNICODE
#ifndef聽_UNICODE
#define 聽_UNICODE聽聽聽聽聽聽聽聽 // 聽_UNICODE聽is聽used聽by聽C-runtime/MFC聽headers
#endif
#endif

Step2: 鏇存敼鍙橀噺綾誨瀷

姣斿 char -> TCHAR

浣嗘槸 ,騫朵笉鏄鎵鏈夌殑char綾誨瀷閮戒笉鑳界敤浜?/span>.濡傛灉闇瑕佺敤,騫朵笖鍑芥暟鐨勫弬鏁?/span>/榪斿洖鍊間粈涔堢殑閮戒笉鍐茬獊,char綾誨瀷榪樻槸鍙互鐢ㄧ殑.

Step3: 鏇存敼甯擱噺瀛楃涓插艦寮?/span>

" abc " -> _T(" abc ")

鍥犱負寮濮嬪啓紼嬪簭鏃舵病鏈夋敞鎰?/span> ,閫犳垚榪欐牱鐨勫父閲忓瓧絎︿覆褰㈠紡闈炲父澶?/span>,涓涓釜鏀硅搗鏉ュ緢鐑?/span>,鎴戝啓浜嗕釜灝忔彃浠?/span>,鍙互璁?/span> 鈥?/span> abc 鈥?/span> 閫変腑鍚庣偣涓涓?/span> button灝辮兘鍙樻垚_T( 鈥?/span> abc 鈥?/span> ),鏈夌偣鐢?/span>,浠g爜涔熼潪甯哥殑鐭?/span>.

Step4: 鏇挎崲鏌愪簺鍑芥暟

姣斿atoi -> _ttoi

鍦ㄨ繖閲岄亣鍒頒竴涓棶棰?/span>,灝辨槸atof鐨勬浛鎹?/span>.

鎸夌収msdn, atof搴旇琚?/span>_ttof鏇挎崲

TCHAR.H routine

_UNICODE & _MBCS not defined

_MBCS defined

_UNICODE defined

_tstof

atof

atof

_wtof

浣嗘槸濂囨殑鏄?/span>,VC6閲岄潰涓嶈璇?/span>_tstof榪欎釜鍑芥暟,VC.net 2003灝卞彲浠?/span>.

鏈変袱涓В鍐崇殑鍔炴硶:

1)聽聽聽聽聽 鍥犱負atof鍙槸鏇挎崲涓烘誕鐐規暟,鎵浠ヨ繖閲岀敤WideCharToMultiByte杞寲涓涓嬩箣鍚庡啀璋冪敤atof涔熸槸鍙鐨?/span>

2)聽聽聽聽聽 鍛靛懙,鐢?/span>strtod鐨勬浛鎹㈠嚱鏁?/span>_tcstod,鍝堝搱,褰撶劧鍙傛暟瑕佸彉涓涓?鎴戣寰楄繖涓柟娉曚笉閿?涓嶈琚玬sdn闄愬埗姝諱簡

Step5: 媯鏌ヤ竴涓嬭皟鐢ㄥ叾浠?/span> dll 鐨勬帴鍙e嚱鏁?/span>

鍥犱負欏圭洰榪樼敤浜嗗彟澶栦竴涓?/span>dll,鍏朵腑鏈変簺鎺ュ彛闇瑕?/span>char*鍙傛暟,榪欎釜鏃跺欏氨蹇呴』鐢?/span>WideCharToMultiByte杞崲涓涓嬩簡.

VC閲岄潰鐨勮緗?
1) 絳夋妸鎵鏈夌殑緙栬瘧error鏀瑰畬浜嗕箣鍚庝竴緙栬瘧,闄や簡涓猯ink閿欒,涓嶈繃msdn鏈夎В閲?
If you are using Unicode and MFC, you will get an unresolved external on _WinMain@16 if you don鈥檛 create an entrypoint to wWinMainCRTStartup. Use the /ENTRY option or type this value in the Project Settings dialog box. (To find this option in the development environment, click Settings on the Project menu, then click the Link tab, and click Output in the Category box.)

2)緇堜簬緙栬瘧鎴愬姛浜?璋冭瘯鐨勬椂鍊欏嵈鍙戠幇CString鐨勫間笉鑳藉湪QuickWatch紿楀彛涓樉紺轟簡
tools->option->
in the debug tab u can find a check box Labeled "Display unicode strings"
Check it.

闂 : 鐩存帴鐢?/span> ANSI 鐨?/span> dll 涓殑 CString

鍦ㄤ嬌鐢?/span>dll鐨勬椂鍊?/span>,闇瑕佺洿鎺ヤ嬌鐢?/span>dll涓殑涓涓彉閲?/span>,鏄?/span>CString綾誨瀷,鍥犱負榪欎釜dll榪樻病鏈夋敼涓?/span>unicode,鎵浠ュ湪鐩存帴浣跨敤鍏跺彉閲忔椂鏈夌偣闂,浣垮緱鍊間笉瀵?/span>.(鏄笉鏄繖涓師鍥犺繕娌℃湁瀹屽叏楠岃瘉,搴旇鏄殑)

鍒拌繖閲?/span> , 瀹e竷縐繪澶辮觸 !

/*琛ュ厖錛?br />緇撴灉鏄け璐ワ紝浣嗘槸鍩烘湰縐繪浠g爜鐨勬墍鏈夋楠ら兘鏈変簡銆傝屼笖錛屼篃鎸囧嚭浜嗗鏋滈渶瑕佽皟鐢ㄧ殑dll涓嶆槸unicode錛屾瘡嬈¤皟鐢?浼犻掑弬鏁版椂錛岄兘瑕佽漿鎹紝寰堢儲銆?br />鍚庢潵鎴戞妸dll鐨勪唬鐮佷篃縐繪浜嗕笅錛岀幇鍦ㄨ繍琛岀殑寰堝ソ錛岄煩鏂囥佷腑鏂囬兘鍙互鏄劇ず錛屼笉綆′綘褰撳墠璇█鏄粈涔堛?br />*/

榪樻湁涓綃囪縐繪姝ラ鐨?鏇村叏闈?閫傚悎鏇村鏉傜殑鎯呭喌:
Cheat Sheet:Unicode-enabling Microsoft C/C++ Source Code (http://www.i18nguy.com/unicode/c-unicode.html)



flyingxu 2006-05-18 16:09 鍙戣〃璇勮
]]>
涓涓笉鑳借皟璇旸LL鐨勯棶棰?/title><link>http://m.shnenglu.com/flyingxu/archive/2006/04/17/5754.html</link><dc:creator>flyingxu</dc:creator><author>flyingxu</author><pubDate>Mon, 17 Apr 2006 07:20:00 GMT</pubDate><guid>http://m.shnenglu.com/flyingxu/archive/2006/04/17/5754.html</guid><wfw:comment>http://m.shnenglu.com/flyingxu/comments/5754.html</wfw:comment><comments>http://m.shnenglu.com/flyingxu/archive/2006/04/17/5754.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/flyingxu/comments/commentRss/5754.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/flyingxu/services/trackbacks/5754.html</trackback:ping><description><![CDATA[鏈変袱涓伐紼媁.exe, 鍜宑.dll<br />姣忔鎴戜粠w璋冭瘯c鐨勬椂鍊欓兘鏄彲浠ョ洿鎺ヤ粠w宸ョ▼璁炬柇鐐?璋冭瘯榪涘叆c婧愮爜鐨?c鐨勬簮鐮佹垜鏈?鍦ㄥ彟澶栦竴涓洰褰曚笅.榪欐槸涓垜瑙夊緱寰堝ソ鐨勫姛鑳?<br />緇撴灉鏈変竴澶?鎴戞嫹浜嗕釜鏂扮殑c宸ョ▼,緙栬瘧鍚?鍙戠幇浠巜榪涗笉浜哻浠g爜浜?鍗充嬌鍕夊己榪涘幓浜?灞呯劧涓嶆槸鍋滃湪鍑芥暟鐨勭涓鍙?鑰屾槸鍦ㄦ煇涓驚鐜綋鍐?<br />...<br />...<br />鍚庢潵鐪嬩簡涓涓?鍘熸潵,鍦╳宸ョ▼鐨刣ebug鐩綍涓?榪樻湁涓猚.lib鍜宑.dll鐨勮佺増鏈?鑰屾柊鐗堢殑c.lib鍜宑.dll鍦╳宸ョ▼鐨勬牴鐩綍涓?鑰岃皟璇曠殑鏃跺?debug鐩綍涓嬬殑dll lib鏄紭鍏堢殑(鐚滄祴)<br />...<br />...<br />鎵浠?鍙槸涓矖蹇冪殑闂,涓嶆槸鎶鏈棶棰?<img src ="http://m.shnenglu.com/flyingxu/aggbug/5754.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/flyingxu/" target="_blank">flyingxu</a> 2006-04-17 15:20 <a href="http://m.shnenglu.com/flyingxu/archive/2006/04/17/5754.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://m.shnenglu.com/" title="精品视频久久久久">精品视频久久久久</a> <div class="friend-links"> </div> </div> </footer> <a href="http://www.fifacn.cn" target="_blank">久久婷婷人人澡人人爽人人爱</a>| <a href="http://www.mdss.net.cn" target="_blank">香港aa三级久久三级</a>| <a href="http://www.51fsyf.cn" target="_blank">久久久久久亚洲精品影院</a>| <a href="http://www.duopudz.cn" target="_blank">亚洲国产精品嫩草影院久久</a>| <a href="http://www.996acg.cn" target="_blank">久久99热这里只有精品国产</a>| <a href="http://www.yeziseo.cn" target="_blank">久久人人爽人人爽人人片av高请</a>| <a href="http://www.ddvxo.cn" target="_blank">国产精品九九九久久九九</a>| <a href="http://www.75063.com.cn" target="_blank">久久久精品日本一区二区三区 </a>| <a href="http://www.22du.net.cn" target="_blank">午夜久久久久久禁播电影</a>| <a href="http://www.sem588.cn" target="_blank">69久久夜色精品国产69</a>| <a href="http://www.bbctp.cn" target="_blank">午夜精品久久久久久</a>| <a href="http://www.bev5l.cn" target="_blank">久久精品无码午夜福利理论片</a>| <a href="http://www.cate365.cn" target="_blank">精品久久人人妻人人做精品</a>| <a href="http://www.yiyaosheji.cn" target="_blank">亚洲精品国产字幕久久不卡</a>| <a href="http://www.bwab.cn" target="_blank">久久国产精品偷99</a>| <a href="http://www.numakj.cn" target="_blank">久久国产精品成人影院</a>| <a href="http://www.xkart.cn" target="_blank">国内精品伊人久久久久妇</a>| <a href="http://www.3-gold.cn" target="_blank">一本久久久久久久</a>| <a href="http://www.anatolia.com.cn" target="_blank">伊人久久精品无码av一区</a>| <a href="http://www.secwatch.com.cn" target="_blank">国产成人久久777777</a>| <a href="http://www.masiah.com.cn" target="_blank">久久青青草原精品国产</a>| <a href="http://www.taoke140.cn" target="_blank">久久亚洲电影</a>| <a href="http://www.zfse4m.cn" target="_blank">久久国产精品视频</a>| <a href="http://www.gebendongxi.cn" target="_blank">日韩亚洲欧美久久久www综合网</a>| <a href="http://www.shishanfz.cn" target="_blank">久久久一本精品99久久精品88</a>| <a href="http://www.oy14.cn" target="_blank">久久精品99无色码中文字幕</a>| <a href="http://www.zenavo.cn" target="_blank">久久青青草原国产精品免费</a>| <a href="http://www.g8360.cn" target="_blank">国产毛片欧美毛片久久久</a>| <a href="http://www.25jt.cn" target="_blank">综合久久精品色</a>| <a href="http://www.034867.cn" target="_blank">亚洲国产成人久久综合一区77</a>| <a href="http://www.pareng.cn" target="_blank">久久99热这里只有精品国产</a>| <a href="http://www.ysaoyx.cn" target="_blank">亚洲综合精品香蕉久久网97</a>| <a href="http://www.ahzyjlr.cn" target="_blank">99久久精品国产高清一区二区</a>| <a href="http://www.grandfreshop.cn" target="_blank">av色综合久久天堂av色综合在</a>| <a href="http://www.grayhound.cn" target="_blank">亚洲国产一成久久精品国产成人综合 </a>| <a href="http://www.ndtym.cn" target="_blank">.精品久久久麻豆国产精品</a>| <a href="http://www.wuyezizhi.cn" target="_blank">久久中文字幕人妻丝袜</a>| <a href="http://www.xzxms.cn" target="_blank">久久中文字幕精品</a>| <a href="http://www.fvnnv.cn" target="_blank">伊人久久无码精品中文字幕</a>| <a href="http://www.00053119.cn" target="_blank">一97日本道伊人久久综合影院</a>| <a href="http://www.dartools.cn" target="_blank">热综合一本伊人久久精品</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>