﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-    Update 牌...@ Blog-随笔分类-控件操作</title><link>http://www.cppblog.com/Lee7/category/6205.html</link><description>  当华美的叶片落尽，生命的脉络才历历可见。 －－ 聂鲁达    
</description><language>zh-cn</language><lastBuildDate>Mon, 05 Jan 2009 20:43:52 GMT</lastBuildDate><pubDate>Mon, 05 Jan 2009 20:43:52 GMT</pubDate><ttl>60</ttl><item><title> IP Address Control 控件的使用</title><link>http://www.cppblog.com/Lee7/archive/2009/01/05/71227.html</link><dc:creator>isabc</dc:creator><author>isabc</author><pubDate>Mon, 05 Jan 2009 07:11:00 GMT</pubDate><guid>http://www.cppblog.com/Lee7/archive/2009/01/05/71227.html</guid><wfw:comment>http://www.cppblog.com/Lee7/comments/71227.html</wfw:comment><comments>http://www.cppblog.com/Lee7/archive/2009/01/05/71227.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/Lee7/comments/commentRss/71227.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Lee7/services/trackbacks/71227.html</trackback:ping><description><![CDATA[<span  style="font-family: Consolas; font-size: 12px; line-height: 18px; "><ol start="1" class="dp-c" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; list-style-type: decimal; list-style-position: initial; list-style-image: initial; background-color: rgb(255, 255, 255); padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(92, 92, 92); margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 35px; "><li class="alt" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; list-style-image: initial; list-style-position: outside !important; border-left-width: 3px; border-left-style: solid; border-left-color: rgb(108, 226, 108); margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; line-height: 14px; list-style-type: decimal; padding-top: 2px; padding-right: 0px; padding-bottom: 2px; padding-left: 0px; background-color: rgb(255, 255, 255); color: inherit; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">CString&#160;IP;&#160;&#160;</span></span></li><li class="" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; list-style-image: initial; list-style-position: outside !important; border-left-width: 3px; border-left-style: solid; border-left-color: rgb(108, 226, 108); background-color: rgb(248, 248, 248); color: rgb(92, 92, 92); margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; line-height: 14px; list-style-type: decimal; padding-top: 2px; padding-right: 0px; padding-bottom: 2px; padding-left: 0px; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&#160;&#160;</span></li><li class="alt" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; list-style-image: initial; list-style-position: outside !important; border-left-width: 3px; border-left-style: solid; border-left-color: rgb(108, 226, 108); margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; line-height: 14px; list-style-type: decimal; padding-top: 2px; padding-right: 0px; padding-bottom: 2px; padding-left: 0px; background-color: rgb(255, 255, 255); color: inherit; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">BYTE&#160;f1,f2,f3,f4;&#160;&#160;</span></li><li class="" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; list-style-image: initial; list-style-position: outside !important; border-left-width: 3px; border-left-style: solid; border-left-color: rgb(108, 226, 108); background-color: rgb(248, 248, 248); color: rgb(92, 92, 92); margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; line-height: 14px; list-style-type: decimal; padding-top: 2px; padding-right: 0px; padding-bottom: 2px; padding-left: 0px; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&#160;&#160;</span></li><li class="alt" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; list-style-image: initial; list-style-position: outside !important; border-left-width: 3px; border-left-style: solid; border-left-color: rgb(108, 226, 108); margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; line-height: 14px; list-style-type: decimal; padding-top: 2px; padding-right: 0px; padding-bottom: 2px; padding-left: 0px; background-color: rgb(255, 255, 255); color: inherit; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">TCHAR&#160;temp[10]&#160;=&#160;<span class="string" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: blue; background-color: inherit; ">"\0"</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">;&#160;&#160;</span></span></li><li class="" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; list-style-image: initial; list-style-position: outside !important; border-left-width: 3px; border-left-style: solid; border-left-color: rgb(108, 226, 108); background-color: rgb(248, 248, 248); color: rgb(92, 92, 92); margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; line-height: 14px; list-style-type: decimal; padding-top: 2px; padding-right: 0px; padding-bottom: 2px; padding-left: 0px; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&#160;&#160;</span></li><li class="alt" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; list-style-image: initial; list-style-position: outside !important; border-left-width: 3px; border-left-style: solid; border-left-color: rgb(108, 226, 108); margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; line-height: 14px; list-style-type: decimal; padding-top: 2px; padding-right: 0px; padding-bottom: 2px; padding-left: 0px; background-color: rgb(255, 255, 255); color: inherit; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; "><span class="keyword" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 102, 153); font-weight: bold; background-color: inherit; ">this</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">->m_IPAddress.GetAddress(f1,f2,f3,f4);&#160;&#160;</span></span></li><li class="" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; list-style-image: initial; list-style-position: outside !important; border-left-width: 3px; border-left-style: solid; border-left-color: rgb(108, 226, 108); background-color: rgb(248, 248, 248); color: rgb(92, 92, 92); margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; line-height: 14px; list-style-type: decimal; padding-top: 2px; padding-right: 0px; padding-bottom: 2px; padding-left: 0px; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&#160;&#160;</span></li><li class="alt" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; list-style-image: initial; list-style-position: outside !important; border-left-width: 3px; border-left-style: solid; border-left-color: rgb(108, 226, 108); margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; line-height: 14px; list-style-type: decimal; padding-top: 2px; padding-right: 0px; padding-bottom: 2px; padding-left: 0px; background-color: rgb(255, 255, 255); color: inherit; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">IP&#160;=&#160;_itoa(f1,temp,10);&#160;&#160;</span></li><li class="" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; list-style-image: initial; list-style-position: outside !important; border-left-width: 3px; border-left-style: solid; border-left-color: rgb(108, 226, 108); background-color: rgb(248, 248, 248); color: rgb(92, 92, 92); margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; line-height: 14px; list-style-type: decimal; padding-top: 2px; padding-right: 0px; padding-bottom: 2px; padding-left: 0px; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&#160;&#160;</span></li><li class="alt" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; list-style-image: initial; list-style-position: outside !important; border-left-width: 3px; border-left-style: solid; border-left-color: rgb(108, 226, 108); margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; line-height: 14px; list-style-type: decimal; padding-top: 2px; padding-right: 0px; padding-bottom: 2px; padding-left: 0px; background-color: rgb(255, 255, 255); color: inherit; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">IP&#160;+=&#160;_T(<span class="string" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: blue; background-color: inherit; ">'.'</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">);&#160;&#160;</span></span></li><li class="" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; list-style-image: initial; list-style-position: outside !important; border-left-width: 3px; border-left-style: solid; border-left-color: rgb(108, 226, 108); background-color: rgb(248, 248, 248); color: rgb(92, 92, 92); margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; line-height: 14px; list-style-type: decimal; padding-top: 2px; padding-right: 0px; padding-bottom: 2px; padding-left: 0px; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&#160;&#160;</span></li><li class="alt" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; list-style-image: initial; list-style-position: outside !important; border-left-width: 3px; border-left-style: solid; border-left-color: rgb(108, 226, 108); margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; line-height: 14px; list-style-type: decimal; padding-top: 2px; padding-right: 0px; padding-bottom: 2px; padding-left: 0px; background-color: rgb(255, 255, 255); color: inherit; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">IP&#160;+=&#160;_itoa(f2,temp,10);&#160;&#160;</span></li><li class="" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; list-style-image: initial; list-style-position: outside !important; border-left-width: 3px; border-left-style: solid; border-left-color: rgb(108, 226, 108); background-color: rgb(248, 248, 248); color: rgb(92, 92, 92); margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; line-height: 14px; list-style-type: decimal; padding-top: 2px; padding-right: 0px; padding-bottom: 2px; padding-left: 0px; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&#160;&#160;</span></li><li class="alt" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; list-style-image: initial; list-style-position: outside !important; border-left-width: 3px; border-left-style: solid; border-left-color: rgb(108, 226, 108); margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; line-height: 14px; list-style-type: decimal; padding-top: 2px; padding-right: 0px; padding-bottom: 2px; padding-left: 0px; background-color: rgb(255, 255, 255); color: inherit; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">IP&#160;+=&#160;_T(<span class="string" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: blue; background-color: inherit; ">'.'</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">);&#160;&#160;</span></span></li><li class="" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; list-style-image: initial; list-style-position: outside !important; border-left-width: 3px; border-left-style: solid; border-left-color: rgb(108, 226, 108); background-color: rgb(248, 248, 248); color: rgb(92, 92, 92); margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; line-height: 14px; list-style-type: decimal; padding-top: 2px; padding-right: 0px; padding-bottom: 2px; padding-left: 0px; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&#160;&#160;</span></li><li class="alt" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; list-style-image: initial; list-style-position: outside !important; border-left-width: 3px; border-left-style: solid; border-left-color: rgb(108, 226, 108); margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; line-height: 14px; list-style-type: decimal; padding-top: 2px; padding-right: 0px; padding-bottom: 2px; padding-left: 0px; background-color: rgb(255, 255, 255); color: inherit; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">IP&#160;+=&#160;_itoa(f3,temp,10);&#160;&#160;</span></li><li class="" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; list-style-image: initial; list-style-position: outside !important; border-left-width: 3px; border-left-style: solid; border-left-color: rgb(108, 226, 108); background-color: rgb(248, 248, 248); color: rgb(92, 92, 92); margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; line-height: 14px; list-style-type: decimal; padding-top: 2px; padding-right: 0px; padding-bottom: 2px; padding-left: 0px; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&#160;&#160;</span></li><li class="alt" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; list-style-image: initial; list-style-position: outside !important; border-left-width: 3px; border-left-style: solid; border-left-color: rgb(108, 226, 108); margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; line-height: 14px; list-style-type: decimal; padding-top: 2px; padding-right: 0px; padding-bottom: 2px; padding-left: 0px; background-color: rgb(255, 255, 255); color: inherit; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">IP&#160;+=&#160;_T(<span class="string" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: blue; background-color: inherit; ">'.'</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">);&#160;&#160;</span></span></li><li class="" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; list-style-image: initial; list-style-position: outside !important; border-left-width: 3px; border-left-style: solid; border-left-color: rgb(108, 226, 108); background-color: rgb(248, 248, 248); color: rgb(92, 92, 92); margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; line-height: 14px; list-style-type: decimal; padding-top: 2px; padding-right: 0px; padding-bottom: 2px; padding-left: 0px; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&#160;&#160;</span></li><li class="alt" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; list-style-image: initial; list-style-position: outside !important; border-left-width: 3px; border-left-style: solid; border-left-color: rgb(108, 226, 108); margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; line-height: 14px; list-style-type: decimal; padding-top: 2px; padding-right: 0px; padding-bottom: 2px; padding-left: 0px; background-color: rgb(255, 255, 255); color: inherit; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">IP&#160;+=&#160;_itoa(f4,temp,10); &#160;</span></li></ol></span>
<img src ="http://www.cppblog.com/Lee7/aggbug/71227.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Lee7/" target="_blank">isabc</a> 2009-01-05 15:11 <a href="http://www.cppblog.com/Lee7/archive/2009/01/05/71227.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>视图分割与视图间通信资料汇总！</title><link>http://www.cppblog.com/Lee7/archive/2008/12/22/70036.html</link><dc:creator>isabc</dc:creator><author>isabc</author><pubDate>Mon, 22 Dec 2008 02:17:00 GMT</pubDate><guid>http://www.cppblog.com/Lee7/archive/2008/12/22/70036.html</guid><wfw:comment>http://www.cppblog.com/Lee7/comments/70036.html</wfw:comment><comments>http://www.cppblog.com/Lee7/archive/2008/12/22/70036.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/Lee7/comments/commentRss/70036.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Lee7/services/trackbacks/70036.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 切分窗口分为动态切分窗口和静态切分窗口，它们都是由CsplitterWnd类(MFC类库)来实现的，在这两种表示方式中，创建同一视图类的对象是比较容易的(Cview)，而在同一应用程序使用两个或更多的视图类(如:ClistView、CtreeView等)，相对来说则要困难一些。&nbsp;&nbsp;<a href='http://www.cppblog.com/Lee7/archive/2008/12/22/70036.html'>阅读全文</a><img src ="http://www.cppblog.com/Lee7/aggbug/70036.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Lee7/" target="_blank">isabc</a> 2008-12-22 10:17 <a href="http://www.cppblog.com/Lee7/archive/2008/12/22/70036.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>vc picture控件使用</title><link>http://www.cppblog.com/Lee7/archive/2008/06/16/53537.html</link><dc:creator>isabc</dc:creator><author>isabc</author><pubDate>Mon, 16 Jun 2008 07:08:00 GMT</pubDate><guid>http://www.cppblog.com/Lee7/archive/2008/06/16/53537.html</guid><wfw:comment>http://www.cppblog.com/Lee7/comments/53537.html</wfw:comment><comments>http://www.cppblog.com/Lee7/archive/2008/06/16/53537.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.cppblog.com/Lee7/comments/commentRss/53537.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Lee7/services/trackbacks/53537.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: vc picture控件的分类进行总结,<br>(一) 非动态显示图片(即图片先通过资源管理器载入,有一个固定ID)<br>(二) 动态载入图片(即只需要在程序中指定图片的路径即可载入)&nbsp;&nbsp;<a href='http://www.cppblog.com/Lee7/archive/2008/06/16/53537.html'>阅读全文</a><img src ="http://www.cppblog.com/Lee7/aggbug/53537.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Lee7/" target="_blank">isabc</a> 2008-06-16 15:08 <a href="http://www.cppblog.com/Lee7/archive/2008/06/16/53537.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>VC中Combo Box控件使用大全</title><link>http://www.cppblog.com/Lee7/archive/2008/02/21/43066.html</link><dc:creator>isabc</dc:creator><author>isabc</author><pubDate>Thu, 21 Feb 2008 13:58:00 GMT</pubDate><guid>http://www.cppblog.com/Lee7/archive/2008/02/21/43066.html</guid><wfw:comment>http://www.cppblog.com/Lee7/comments/43066.html</wfw:comment><comments>http://www.cppblog.com/Lee7/archive/2008/02/21/43066.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.cppblog.com/Lee7/comments/commentRss/43066.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Lee7/services/trackbacks/43066.html</trackback:ping><description><![CDATA[<p><strong>一、如何添加/删除Combo Box内容</strong><br>1，在Combo Box控件属性的Data标签里面添加，一行表示Combo Box下拉列表中的一行。换行用ctrl+回车。<br>2，在程序初始化时动态添加<br>如：&nbsp;//控件内容初始化<br>&nbsp;CString strTemp;<br>&nbsp;((CComboBox*)GetDlgItem(IDC_COMBO_CF))-&gt;ResetContent();//消除现有所有内容<br>&nbsp;for(int i=1;i&lt;=100;i++)<br>&nbsp;{<br>&nbsp;&nbsp;strTemp.Format("%d",i);<br>&nbsp;&nbsp;((CComboBox*)GetDlgItem(IDC_COMBO_CF))-&gt;AddString(strTemp);<br>&nbsp;}<br>3，下拉的时候添加<br>如：&nbsp;CString strTemp;<br>&nbsp;int iCount=((CComboBox*)GetDlgItem(IDC_COMBO_CF))-&gt;GetCount();//取得目前已经有的行数<br>&nbsp;if(iCount&lt;1)//防止重复多次添加<br>&nbsp;{<br>&nbsp;&nbsp;((CComboBox*)GetDlgItem(IDC_COMBO_CF))-&gt;ResetContent();<br>&nbsp;&nbsp;for(int i=1;i&lt;=100;i++)<br>&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;strTemp.Format("%d",i);<br>&nbsp;&nbsp;&nbsp;((CComboBox*)GetDlgItem(IDC_COMBO_CF))-&gt;AddString(strTemp);<br>&nbsp;&nbsp;}<br>&nbsp;}<br>4，删除<br>DeleteString( UINT nIndex )//删除指定行，<br>5，插入<br>InsertString( int nIndex, LPCTSTR lpszItem )//将行插入到指定位置<br>6，查找<br>FindString( int nStartAfter, LPCTSTR lpszItem )//可以在当前所有行中查找指定的字符传的位置，nStartAfter指明从那一行开始进行查找。 <br>int SelectString( int nStartAfter, LPCTSTR lpszItem )//可以选中包含指定字符串的行<br><strong>二、如何控制Combo Box的下拉长度</strong></p>
<p>1，首先要知道两点：一、那就是在设计界面里，点击一下Combo Box的下拉箭头，此时出现的调整框就是Combo Box的下拉调整框。<br>2，二、属性里有个 No integral height 钩选项，表示最大长度为设计长度，如果实际内容比设计长度多，就出现滚动条，少就以实际长度显示。</p>
<p><strong>三、选择其中的某行</strong><br>1，选中：<br>int iPos=((CComboBox*)GetDlgItem(IDC_COMBO_CF))-&gt;GetCurSel();//当前选中的行。<br>2，设置<br>((CComboBox*)GetDlgItem(IDC_COMBO_CF))-&gt;SetCurSel(n)//设置第n行内容为显示的内容。</p>
<p>四、取得Combo Box框内容<br>1取当前内容<br>((CComboBox*)GetDlgItem(IDC_COMBO_CF))-&gt;GetWindowText(strTemp);<br><br>2取其他行内容<br>((CComboBox*)GetDlgItem(IDC_COMBO_CF))-&gt;GetLBText(n,strTemp);</p>
<p><strong>&nbsp;四、获得焦点</strong></p>
<p>通常要判断控件是否获得了焦点，可以用GetFocus()函数</p>
<p>例如：if(GetFocus()==GetDlgItem(IDC_EDIT_VALUE2))//判断焦点是否在编辑框IDC_EDIT_VALUE2内。</p>
<p>但是combobox 的焦点不同，因为它是由edit和listbox两部分组成的</p>
所以获得焦点要用GetParent()：if ((GetFocus()-&gt;GetParent())==GetDlgItem(IDC_COMBO_CF))<br><br>转自：http://www.dayjs.com/html/C/kjcz/20070726/7623.html<br><img src ="http://www.cppblog.com/Lee7/aggbug/43066.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Lee7/" target="_blank">isabc</a> 2008-02-21 21:58 <a href="http://www.cppblog.com/Lee7/archive/2008/02/21/43066.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>