{"id":445,"date":"2012-08-22T13:08:42","date_gmt":"2012-08-22T04:08:42","guid":{"rendered":"http:\/\/soundengine.jp\/wordpress\/tips\/?p=445"},"modified":"2014-02-06T23:42:33","modified_gmt":"2014-02-06T14:42:33","slug":"wtl-ctooltipctrl%e3%83%84%e3%83%bc%e3%83%ab%e3%83%81%e3%83%83%e3%83%97%e3%82%b3%e3%83%b3%e3%83%88%e3%83%ad%e3%83%bc%e3%83%ab%e3%82%92mfc%e3%81%a7%e4%bd%bf%e3%81%86","status":"publish","type":"post","link":"https:\/\/soundengine.jp\/wordpress\/tips\/tutorial\/445\/","title":{"rendered":"WTL CToolTipCtrl(\u30c4\u30fc\u30eb\u30c1\u30c3\u30d7\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb)\u3092MFC\u3067\u4f7f\u3046"},"content":{"rendered":"<h2 id=\"content_1_0\">CToolTipCtrl  <a class=\"anchor_super\" id=\"cdcac032\" href=\"http:\/\/soundengine.jp\/backend\/?services%2Ftips%2F2007-08-11#cdcac032\" title=\"cdcac032\"> <\/a><\/h2>\n<p>CToolTipCtrl\u306f\u3001\u30c4\u30fc\u30eb\u30c1\u30c3\u30d7\u3092\u8868\u793a\u3059\u308b\u30af\u30e9\u30b9\u3067MFC\u3068WTL\u3067\u305d\u308c\u305e\u308c\u5b58\u5728\u3057\u3066\u3044\u307e\u3059\u3002MFC\u306eCToolTipCtrl\u306f\u3001<a href=\"http:\/\/msdn2.microsoft.com\/ja-jp\/library\/6b4cb3a5%28VS.80%29.aspx\" rel=\"nofollow\">MSDN<\/a>\u304b\u3089\u5f15\u7528\u3055\u305b\u3066\u3082\u3089\u3046\u3068\u3001<\/p>\n<blockquote>\n<p class=\"quotation\">\u3053\u306e\u30b3\u30f3\u30ed\u30c8\u30fc\u30eb\u306f\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u30c4\u30fc\u30eb\u306e\u76ee\u7684\u3092\u8aac\u660e\u3059\u308b 1 \u884c\u306e\u30c6\u30ad\u30b9\u30c8\u3092\u8868\u793a\u3059\u308b\u5c0f\u3055\u306a\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7 \u30a6\u30a3\u30f3\u30c9\u30a6\u3067\u3059\u3002<\/p>\n<\/blockquote>\n<p>\u3068\u306e\u3053\u3068\u3067\u30011\u884c\u3057\u304b\u8868\u793a\u3067\u304d\u306a\u3044\u4e0a\u306b\u4f7f\u3044\u65b9\u3082\u591a\u5c11\u9762\u5012\u3067\u3059\u3002\u4e00\u65b9WTL\u306eCToolTipCtrl\u306f\u3001Windows\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb<a href=\"http:\/\/msdn2.microsoft.com\/en-us\/library\/aa930144.aspx\" rel=\"nofollow\">ToolTip Control<\/a>\u304b\u3089\u304d\u3066\u304a\u308a\u8907\u6570\u884c\u8868\u793a\u3084\u30d0\u30eb\u30fc\u30f3\u30c4\u30fc\u30eb\u30c1\u30c3\u30d7\u306a\u3069\u3082\u3067\u304d\u307e\u3059\u3002\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4eca\u56de\u306fMFC\u306e\u74b0\u5883\u3067WTL\u306eCToolTipCtrl\u3092\u4f7f\u3046\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<p><!--more--><\/p>\n<div class=\"jumpmenu\">\n<\/div>\n<h2 id=\"content_1_1\">\u30a4\u30f3\u30af\u30eb\u30fc\u30c9  <a class=\"anchor_super\" id=\"g9b52ebb\" href=\"http:\/\/soundengine.jp\/backend\/?services%2Ftips%2F2007-08-11#g9b52ebb\" title=\"g9b52ebb\"> <\/a><\/h2>\n<p>\u30d8\u30c3\u30c0\u30fc\u306e\u30a4\u30f3\u30af\u30eb\u30fc\u30c9\u3068\u3057\u3066\u306f\u3001\u76f4\u63a5\u7684\u306b\u306f<\/p>\n<pre>#include &lt;atlctrls.h&gt;<\/pre>\n<p>\u3092\u3057\u307e\u3059\u3002\u307e\u305f\u3001WTL\u3092\u4f7f\u7528\u3059\u308b\u3068\u3044\u3046\u3053\u3068\u3067stdafx.h\u3042\u305f\u308a\u3067<\/p>\n<pre>#include &lt;atlbase.h&gt;\r\n#include &lt;atlapp.h&gt;<\/pre>\n<p>\u3092\u3059\u308b\u306e\u3067\u3059\u304c\u3001CMenu\u3084CPaintDC\u304cMFC\u306e\u3068\u304b\u3076\u3063\u3066\u3057\u307e\u3046\u306e\u3067#include &lt;atlbase.h&gt;\u306e\u524d\u306b<\/p>\n<pre>#define _WTL_NO_AUTOMATIC_NAMESPACE<\/pre>\n<p>\u3092\u66f8\u304d\u307e\u3059\u3002\u3057\u304b\u3057\u3053\u308c\u3092\u66f8\u3044\u3066\u3082\u30a8\u30e9\u30fc\u304c\u51fa\u307e\u3059\u3002<\/p>\n<blockquote>\n<p class=\"quotation\">c:\\wtl\\include\\atlctrls.h(1986) : error C3861: &#8216;ImageList_Read&#8217;: \u8b58\u5225\u5b50\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f<br \/>\nc:\\wtl\\include\\atlctrls.h(2093) : error C3861: &#8216;ImageList_Read&#8217;: \u8b58\u5225\u5b50\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f<br \/>\nc:\\wtl\\include\\atlctrls.h(2099) : error C3861: &#8216;ImageList_Write&#8217;: \u8b58\u5225\u5b50\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f<br \/>\nc:\\wtl\\include\\atlctrls.h(2106) : error C3861: &#8216;ImageList_ReadEx&#8217;: \u8b58\u5225\u5b50\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f<br \/>\nc:\\wtl\\include\\atlctrls.h(2112) : error C3861: &#8216;ImageList_WriteEx&#8217;: \u8b58\u5225\u5b50\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f<\/p>\n<\/blockquote>\n<p>\u304a\u305d\u3089\u304f\u3053\u3093\u306a\u306e\u304c\u51fa\u3066\u304f\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002\u3053\u308c\u3092\u56de\u907f\u3059\u308b\u306b\u306f\u3001#include &lt;atlbase.h&gt;\u306e\u524d\u306b<\/p>\n<pre>#undef __IStream_INTERFACE_DEFINED__<\/pre>\n<p>\u3053\u306e\u3088\u3046\u306a\u3082\u306e\u3092\u66f8\u3051\u3070\u3088\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u3002\u304a\u305d\u3089\u304f\u3001#include &lt;afxwin.h&gt;\u5185\u306e\u30a4\u30f3\u30af\u30eb\u30fc\u30c9\u9806\u5e8f\u306a\u3069\u3067ImageList_*\u304c\u5b9a\u7fa9\u3055\u308c\u306a\u304f\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u306f\u306a\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<div class=\"jumpmenu\">\n<\/div>\n<h2 id=\"content_1_2\">\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0  <a class=\"anchor_super\" id=\"daba7399\" href=\"http:\/\/soundengine.jp\/backend\/?services%2Ftips%2F2007-08-11#daba7399\" title=\"daba7399\"> <\/a><\/h2>\n<p>\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u306f\u3044\u305f\u3063\u3066\u7c21\u5358\u3067\u3001\u4f7f\u3044\u305f\u3044\u30a6\u30a3\u30f3\u30c9\u30a6\u306e\u30af\u30e9\u30b9\u306e\u30e1\u30f3\u30d0\u30fc\u3067<\/p>\n<pre>WTL::CToolTipCtrl tooltip_;<\/pre>\n<p>\u3092\u5b9a\u7fa9\u3057OnInitDialog\u5185\u3067\u3053\u306e\u3088\u3046\u306a\u3082\u306e\u3092\u66f8\u3051\u3070\u7d42\u4e86\u3067\u3059\u3002<\/p>\n<pre>tooltip_.Create( *this );\r\ntooltip_.Activate( TRUE );\r\ntooltip_.SetMaxTipWidth( 120 );\r\ntooltip_.SetTitle( 1, _T( \"\u30bf\u30a4\u30c8\u30eb\" ) );\r\nWTL::CToolInfo toolinfo( TTF_SUBCLASS, *this, 0, 0, _T( \"\u30c6\u30ad\u30b9\u30c8\" ) );\r\ntooltip_.AddTool( toolinfo );<\/pre>\n<p>\u307e\u305f\u3001OnMouseMove\u306a\u3069\u3067<\/p>\n<pre>tooltip_.UpdateTipText( _T( \"\u79fb\u52d5\u306a\u3069\u306b\\r\\n\u5fdc\u3058\u3066\u5909\u66f4\\r\\nMFC\u306e\u3088\u308a\u3082\u4fbf\u5229\" ), *this );<\/pre>\n<p>\u3053\u306e\u3088\u3046\u306b\u30c6\u30ad\u30b9\u30c8\u3092\u5909\u3048\u308b\u306e\u3082\u6709\u52b9\u3067\u3057\u3087\u3046\u3002\u5b9f\u969b\u4e0b\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<div class=\"img_margin\" style=\"text-align: left\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/soundengine.jp\/backend\/?plugin=ref&amp;page=services%2Ftips%2F2007-08-11&amp;src=tooltipctrl.gif\" alt=\"tooltipctrl.gif\" height=\"156\" width=\"247\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>CToolTipCtrl CToolTipCtrl\u306f\u3001\u30c4\u30fc\u30eb\u30c1\u30c3\u30d7\u3092\u8868\u793a\u3059\u308b\u30af\u30e9 &hellip; <a href=\"https:\/\/soundengine.jp\/wordpress\/tips\/tutorial\/445\/\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-445","post","type-post","status-publish","format-standard","hentry","category-tutorial"],"_links":{"self":[{"href":"https:\/\/soundengine.jp\/wordpress\/tips\/wp-json\/wp\/v2\/posts\/445","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/soundengine.jp\/wordpress\/tips\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/soundengine.jp\/wordpress\/tips\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/soundengine.jp\/wordpress\/tips\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/soundengine.jp\/wordpress\/tips\/wp-json\/wp\/v2\/comments?post=445"}],"version-history":[{"count":4,"href":"https:\/\/soundengine.jp\/wordpress\/tips\/wp-json\/wp\/v2\/posts\/445\/revisions"}],"predecessor-version":[{"id":3280,"href":"https:\/\/soundengine.jp\/wordpress\/tips\/wp-json\/wp\/v2\/posts\/445\/revisions\/3280"}],"wp:attachment":[{"href":"https:\/\/soundengine.jp\/wordpress\/tips\/wp-json\/wp\/v2\/media?parent=445"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/soundengine.jp\/wordpress\/tips\/wp-json\/wp\/v2\/categories?post=445"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/soundengine.jp\/wordpress\/tips\/wp-json\/wp\/v2\/tags?post=445"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}