{"id":313,"date":"2014-08-09T09:07:14","date_gmt":"2014-08-09T18:07:14","guid":{"rendered":"http:\/\/blog.box.kr\/?p=313"},"modified":"2014-08-09T09:07:14","modified_gmt":"2014-08-09T18:07:14","slug":"mfc-%ec%8b%9c%ec%8a%a4%ed%85%9c%ec%9d%98-%ec%a0%84%ec%9b%90-%eb%b2%a0%ed%84%b0%eb%a6%ac-%ec%a0%95%eb%b3%b4-%ea%b0%80%ec%a0%b8%ec%98%a4%ea%b8%b0","status":"publish","type":"post","link":"https:\/\/blog.box.kr\/?p=313","title":{"rendered":"\u00a0[MFC] &#8211; \uc2dc\uc2a4\ud15c\uc758 \uc804\uc6d0 \/ \ubca0\ud130\ub9ac \uc815\ubcf4 \uac00\uc838\uc624\uae30"},"content":{"rendered":"<h3 class=\"title\" style=\"font-weight: bold; color: #ffffff;\"><\/h3>\n<div class=\"article\" style=\"color: #000000;\">\n<p>SYSTEM_BATTERY_STATE sys_bat;<\/p>\n<p>if(0 == CallNtPowerInformation(SystemBatteryState,NULL,0,&amp;sys_bat,sizeof(sys_bat)))<br \/>\n{<\/p>\n<p>strText.Format(L&#8221;AcOnLine %d &#8220;, sys_bat.AcOnLine); \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0 \/\/ \ud604\uc7ac \uc804\uc6d0 AC \uc0ac\uc6a9 \uc720\ubb34<br \/>\nMessageBox(strText);<\/p>\n<p>strText.Format(L&#8221;BatteryPresent %d &#8220;, sys_bat.BatteryPresent); \/\/ \ubca0\ud130\ub9ac \uc0ac\uc6a9\uc720\ubb34 \ud655\uc778<br \/>\nMessageBox(strText);<\/p>\n<p>strText.Format(L&#8221;Charging %d &#8220;, sys_bat.Charging); \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\/\/ \ud604\uc7ac \ucda9\uc804\uc911\uc778\uc9c0 \ud655\uc778<br \/>\n<span id=\"callbacknestwabartistorycom34876\"><\/span>\u00a0 \u00a0 \u00a0MessageBox(strText);<\/p>\n<p>strText.Format(L&#8221;Discharging %d &#8220;, sys_bat.Discharging); \u00a0 \u00a0 \u00a0\u00a0 \/\/ \ud604\uc7ac \uc0ac\uc6a9\uc73c\ub85c \uc778\ud55c \ubc29\uc804\uc911\uc778\uc9c0 \ud655\uc778<br \/>\nMessageBox(strText);<\/p>\n<p>strText.Format(L&#8221;EstimatedTime %d &#8220;, sys_bat.EstimatedTime);\u00a0 \/\/\ubca0\ud130\ub9ac \uc794\uc5ec\ub7c9\uc744 \uc2dc\uac04\uc73c\ub85c \ud45c\uc2dc<br \/>\nMessageBox(strText); \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0 \/\/\uc2dc\uc2a4\ud15c\uc5d0\ub530\ub77c \uc548\ub098\uc62c\uc218\ub3c4\uc788\uc74c<\/p>\n<p>strText.Format(L&#8221;MaxCapacity %d &#8220;, sys_bat.MaxCapacity); \u00a0\u00a0 \/\/\ubca0\ud130\ub9ac\uc758 \ucd1d\ub7c9<br \/>\nMessageBox(strText);<\/p>\n<p>strText.Format(L&#8221;RemainingCapacity %d &#8220;, sys_bat.RemainingCapacity);\u00a0 \/\/ \ubca0\ud130\ub9ac\uc758 \uc794\uc5ec\ub7c9<br \/>\nMessageBox(strText);<br \/>\n}<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>SYSTEM_BATTERY_STATE sys_bat; if(0 == CallNtPowerInformation(SystemBatteryState,NULL,0,&amp;sys_bat,sizeof(sys_bat))) { strText.Format(L&#8221;AcOnLine %d &#8220;, sys_bat.AcOnLine); \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0 \/\/ \ud604\uc7ac \uc804\uc6d0 AC \uc0ac\uc6a9 \uc720\ubb34 MessageBox(strText); strText.Format(L&#8221;BatteryPresent %d &#8220;, sys_bat.BatteryPresent); \/\/ \ubca0\ud130\ub9ac \uc0ac\uc6a9\uc720\ubb34 \ud655\uc778 MessageBox(strText); strText.Format(L&#8221;Charging %d &#8220;, sys_bat.Charging); \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\/\/ \ud604\uc7ac \ucda9\uc804\uc911\uc778\uc9c0 \ud655\uc778 \u00a0 \u00a0 \u00a0MessageBox(strText); strText.Format(L&#8221;Discharging %d &#8220;, sys_bat.Discharging); \u00a0 \u00a0 \u00a0\u00a0 \/\/ \ud604\uc7ac \uc0ac\uc6a9\uc73c\ub85c \uc778\ud55c \ubc29\uc804\uc911\uc778\uc9c0 \ud655\uc778 MessageBox(strText); strText.Format(L&#8221;EstimatedTime %d &#8220;, sys_bat.EstimatedTime);\u00a0 \/\/\ubca0\ud130\ub9ac \uc794\uc5ec\ub7c9\uc744 \uc2dc\uac04\uc73c\ub85c \ud45c\uc2dc MessageBox(strText); \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0 \/\/\uc2dc\uc2a4\ud15c\uc5d0\ub530\ub77c \uc548\ub098\uc62c\uc218\ub3c4\uc788\uc74c strText.Format(L&#8221;MaxCapacity %d &#8220;, sys_bat.MaxCapacity); \u00a0\u00a0 \/\/\ubca0\ud130\ub9ac\uc758 \ucd1d\ub7c9 MessageBox(strText); strText.Format(L&#8221;RemainingCapacity %d &#8220;, sys_bat.RemainingCapacity);\u00a0 \/\/ \ubca0\ud130\ub9ac\uc758 \uc794\uc5ec\ub7c9 MessageBox(strText); }<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"ngg_post_thumbnail":0,"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[9,19,7],"tags":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5q9Zn-53","jetpack-related-posts":[{"id":216,"url":"https:\/\/blog.box.kr\/?p=216","url_meta":{"origin":313,"position":0},"title":"BSTR &#8211; char*\uac04\uc758 \ubcc0\ud658 \ubc0f BSTR\uc5d0 \ub300\ud574&#8230;","date":"2014-07-23","format":false,"excerpt":"BSTR - char*\uac04\uc758 \ubcc0\ud658 #include <afxconv.h>void BSTRtoCHAR(char *Msg[], const BSTR conv) { USES_CONVERSION; strcpy( *Msg, OLE2T(conv) ); }void CHARtoBSTR( BSTR *Msg, const char *conv ) { USES_CONVERSION; *Msg = T2OLE(conv); \/\/ *Msg = SysAllocString( A2W(conv) ); } \u00a0strText=SysAllocStringLen(szOleChar,iLen); \u00a0 \/\/ BSTR\uc5d0 \uacf5\uac04 \ud560\ub2f9.. printf(\"SysStringLen(strText) = %un\",SysStringLen(strText)); \u00a0 \u00a0\/\/ BSTR String\uc758\u2026","rel":"","context":"In &quot;C\/C++&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":441,"url":"https:\/\/blog.box.kr\/?p=441","url_meta":{"origin":313,"position":1},"title":"CStirng \u2194 char * (Unicode \u2194 ANSI)","date":"2014-12-15","format":false,"excerpt":"\u203b\u00a0Format \uc9c0\uc815 \uac00\ub2a5 (CString \u2192 char *) \/\/\u00a0Static CString strText = _T(\"casting test\"); char szText[128]; sprintf_s(szText, 128, \"%S\", strText); \/\/ Using\u00a0szText... \/\/ Dynamic CString strText = _T(\"casting test\"); const size_t size = strText.GetLength(); char *pszText = new char[size]; sprintf_s(pszText,\u00a0size, \"%S\", strText); \/\/ Using\u00a0pszText... \/\/ \ub625 \uce58\uc6b0\ub294 \uac70 \uc78a\uc9c0\ub9d0\uc790 delete\u00a0pszText; \u203b\u2026","rel":"","context":"In &quot;C\/C++&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":311,"url":"https:\/\/blog.box.kr\/?p=311","url_meta":{"origin":313,"position":2},"title":"\u00a0MFC &#8211; \ucf64\ubcf4\ubc15\uc2a4","date":"2014-08-09","format":false,"excerpt":"[\ucf64\ubcf4 \ubc15\uc2a4 \uc0ac\uc6a9 \uc608] 1. \ub2e4\uc774\uc5bc\ub85c\uadf8 \ub4f1\uc5d0, \ucf64\ubcf4\ubc15\uc2a4\ub97c \ub4dc\ub798\uadf8 \ud558\uc5ec \uc62c\ub824\ub454\ub2e4. 2. \ucee8\ud2b8\ub864 \ud0c0\uc785\uc758 \ubcc0\uc218 \uc120\uc5b8. 3. \ucf64\ubcf4\uc5d0 \ub4e4\uc5b4\uac08 \ubaa9\ub85d\uc744 \ubc30\uc5f4\ub85c \uc791\uc131 \uc608) CString combo_value[] = {\"1\ubd84 \ud6c4\",\"2\ubd84 \ud6c4\",\"3\ubd84 \ud6c4\",\"5\ubd84 \ud6c4\",\"10\ubd84 \ud6c4\",\"15\ubd84 \ud6c4\",\"20\ubd84 \ud6c4\",\"25\ubd84 \ud6c4\",\"30\ubd84 \ud6c4\",\"45\ubd84 \ud6c4\",\"1\uc2dc\uac04 \ud6c4\",\"2\uc2dc\uac04 \ud6c4\",\"3\uc2dc\uac04 \ud6c4\",\"4\uc2dc\uac04 \ud6c4\",\u00a0\"5\uc2dc\uac04 \ud6c4\",\"\uc0ac\uc6a9\uc548\ud568\"}; 4.\u00a0\ubc30\uc5f4\ub85c \uc791\uc131\ud55c \ubaa9\ub85d\uc744 \ucf64\ubcf4\ubc15\uc2a4\uc5d0 \ucd94\uac00 .... m_CtrlComBo_VideoTime.ResetContent();\u00a0\u00a0\u00a0\/\/ \ucf64\ubcf4\u2026","rel":"","context":"In &quot;C\/C++&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":162,"url":"https:\/\/blog.box.kr\/?p=162","url_meta":{"origin":313,"position":3},"title":"[Tip] WM_COPYDATA \uba54\uc2dc\uc9c0\ub85c \ud504\ub85c\uadf8\ub7a8\uac04\uc5d0 \ub370\uc774\ud130 \uc8fc\uace0\ubc1b\ub294 \ubc29\ubc95","date":"2014-07-08","format":false,"excerpt":"\ud2b8\ub799\ubc31 \uc8fc\uc18c : http:\/\/www.tipssoft.com\/bulletin\/tb.php\/FAQ\/319 \ud301\uc2a4\uc18c\ud504\ud2b8\uc5d0\uc11c \uc81c\uacf5\ud558\ub294 \ud504\ub85c\uadf8\ub798\ubc0d\uacfc \uad00\ub828\ub41c \uc790\ub8cc\ub098 \uc815\ubcf4\ub4e4\uc744 \ubb34\ub2e8\uc73c\ub85c \ubcf5\uc81c\ud558\uac70\ub098 \uac8c\uc7ac\ud558\ub294 \ud589\uc704\ub294 \uc0c1\ud638\uac04\uc758 \uc2e0\ub8b0\ub97c \ubb34\ub108\ub728\ub9ac\ub294 \ud589\uc704\uc774\uba70, \ubc95\uc801\uc778 \ubb38\uc81c\ub97c \uc57c\uae30\ud560 \uc218 \uc788\uc73c\ubbc0\ub85c \uac01\ubcc4\ud55c \uc8fc\uc758\ub97c \ub2f9\ubd80\ub4dc\ub9bd\ub2c8\ub2e4. * \ud301\uc2a4\uc18c\ud504\ud2b8 \uc800\uc791\uad8c \uc815\ucc45 \ubcf4\uae30 - http:\/\/www.tipssoft.com\/bulletin\/tb.php\/FAQ\/637 \uc774 \uc790\ub8cc\ub4e4\uc740 \ud301\uc2a4\uc18c\ud504\ud2b8\uc5d0\uc11c \uc81c\uacf5\ud558\ub294 [ \uc54c\uc9dc\ubc30\uae30 ] \ud504\ub85c\uadf8\ub7a8\uc744 \uc774\uc6a9\ud558\uba74 \ub354 \ud3b8\ub9ac\ud558\uac8c \ubcfc\uc218 \uc788\uc2b5\ub2c8\ub2e4. * \uc54c\uc9dc\ubc30\uae30 \ud504\ub85c\uadf8\ub7a8 \ubc1b\uae30\u2026","rel":"","context":"In &quot;\uc77c\uc0c1&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":254,"url":"https:\/\/blog.box.kr\/?p=254","url_meta":{"origin":313,"position":4},"title":"HTML \ud30c\uc2f1\ud574\uc11c \uc6d0\ud558\ub294 \uc815\ubcf4 \uac00\uc838\uc624\uae30","date":"2014-07-23","format":false,"excerpt":"\u00a0\u00a0 \ucd9c\ucc98 :\u00a0http:\/\/findfun.tistory.com\/tag\/C%23%20%EB%B8%8C%EB%9D%BC%EC%9A%B0%EC%A0%B8 System.Windows.Forms \uc5d0 \uc788\ub294 Browser \ucee8\ud2b8\ub864\uc744 \uc774\uc6a9\ud558\uc5ec \ube0c\ub77c\uc6b0\uc838\ub97c \ub9cc\ub4e4\uace0 \uc6d0\ud558\ub294 \uc815\ubcf4\ub97c \uc5bb\uc744 \uc218 \uc788\uc2b5\ub2c8\ub2e4.(\uc606\uc758 \uc774\ubbf8\uc9c0\ub97c \ud074\ub9ad\ud558\uc2dc\uba74 \ud06c\uac8c \ubcf4\uc2e4 \uc218 \uc788\uc2b5\ub2c8\ub2e4.) \uc774 \uc608\uc2dc\ub294 \ub2e4\ub098\uc640 \uc0ac\uc774\ud2b8\uc758 \uce74\ub4dc\/\ud604\uae08 \ub3d9\uc77c\ubab0 \uc911 \uac00\uc7a5 \uc2fc \uac00\uaca9\uc744 \uc54c\uc544\ub0b4\ub294 \uac83\uc73c\ub85c \ud0c0\uac9f\uc744 \uc815\ud588\uc2b5\ub2c8\ub2e4. \ucd5c\uc800\uac00\ub97c MessageBox\ub85c \ub098\ud0c0\ub098\uac8c \ud558\ub294 \uc544\uc8fc \uae30\ucd08\uc801\uc778 \ud504\ub85c\uadf8\ub7a8\uc785\ub2c8\ub2e4. \uc774 \uc18c\uc2a4\ub294 \ub2e4\ub098\uc640 \uc0ac\uc774\ud2b8\uc758 \uad6c\uc870\uc5d0 \ub9de\uac8c \uad6c\uc131\ub418\uc5b4\u2026","rel":"","context":"In &quot;C\/C++&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":166,"url":"https:\/\/blog.box.kr\/?p=166","url_meta":{"origin":313,"position":5},"title":"\uba54\uc2dc\uc9c0 \ud6c5(Message Hook)","date":"2014-07-08","format":false,"excerpt":"\uba54\uc2dc\uc9c0 \ud6c5(Message Hook) \u00a0 \ud504\ub85c\uadf8\ub7a8\uc5d0\uc11c \ubc1c\uc0dd\ud558\ub294 \uba54\uc2dc\uc9c0\ub97c \uac10\uc2dc\ud558\uba74\uc11c \ud2b9\uc815 \uba54\uc2dc\uc9c0\uac00 \ucc98\ub9ac\ub418\uae30 \uc804\uc5d0 \ud574\ub2f9 \uba54\uc2dc\uc9c0\ub97c \uac00\ub85c\ucc44\uc5b4 \ubcc4\ub3c4\ub85c \uc815\uc758\ub41c \uae30\ub2a5\uc744 \uc218\ud589\ud558\ub3c4\ub85d \uc9c0\uc6d0\ud558\ub294 \ud504\ub85c\uadf8\ub798\ubc0d \uae30\ubc95\uc744 \uc758\ubbf8\ud569\ub2c8\ub2e4. \uc774\ub7ec\ud55c \ub9e4\ucee4\ub2c8\uc998\uc744 \uc774\uc6a9\ud558\uc5ec \ub2e4\ub978 \ud504\ub85c\uadf8\ub7a8\uc758 \ucc98\ub9ac\uac00 \uc77c\uc5b4\ub098\uae30 \uc804\uc5d0 \uc6d0\ud558\ub294 \uae30\ub2a5\uc744 \uc218\ud589\ud558\ub3c4\ub85d \uad6c\ud604\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. 1. \ud6c5\uc758 \uc885\ub958 1) \uc804\uc5ed \ud6c5 \uc708\ub3c4\uc6b0 \uc804\uccb4 \uc601\uc5ed\uc5d0 \ubc1c\uc0dd\ud558\ub294 \uba54\uc2dc\uc9c0\ub97c \uac10\uc2dc \ubcc4\ub3c4\uc758\u2026","rel":"","context":"In &quot;MFC &amp; WINDOWS&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/blog.box.kr\/index.php?rest_route=\/wp\/v2\/posts\/313"}],"collection":[{"href":"https:\/\/blog.box.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.box.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.box.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.box.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=313"}],"version-history":[{"count":0,"href":"https:\/\/blog.box.kr\/index.php?rest_route=\/wp\/v2\/posts\/313\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.box.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.box.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.box.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}