ÓÑÇéÌáʾ£ºÈç¹û±¾ÍøÒ³´ò¿ªÌ«Âý»òÏÔʾ²»ÍêÕû£¬Çë³¢ÊÔÊó±êÓÒ¼ü¡°Ë¢Ð¡±±¾ÍøÒ³£¡ÔĶÁ¹ý³Ì·¢ÏÖÈκδíÎóÇë¸æËßÎÒÃÇ£¬Ð»Ð»£¡£¡ ±¨¸æ´íÎó
·É¶ÁÖÐÎÄÍø ·µ»Ø±¾ÊéĿ¼ ÎÒµÄÊé¼Ü ÎÒµÄÊéÇ© TXTÈ«±¾ÏÂÔØ ½øÈëÊé°É ¼ÓÈëÊéÇ©

windows»·¾³ÏÂ32λ»ã±àÓïÑÔ³ÌÐòÉè¼Æ-µÚ74ÕÂ

°´¼üÅÌÉÏ·½Ïò¼ü ¡û »ò ¡ú ¿É¿ìËÙÉÏÏ·­Ò³£¬°´¼üÅÌÉ쵀 Enter ¼ü¿É»Øµ½±¾ÊéĿ¼ҳ£¬°´¼üÅÌÉÏ·½Ïò¼ü ¡ü ¿É»Øµ½±¾Ò³¶¥²¿£¡
¡ª¡ª¡ª¡ªÎ´ÔĶÁÍꣿ¼ÓÈëÊéÇ©ÒѱãÏ´μÌÐøÔĶÁ£¡



¹ÛËƺõ²»ÊǺܺÿ´£¬ËùÒÔÔÚÖ÷´°¿ÚµÄWM_SIZEÏûÏ¢Öл¹ÊÇÐèÒª¶Ô¹¤¾ßÀ¸½øÐе÷Õû¡£²»¹ýµ÷ÕûµÄ·½·¨ºÜ¼òµ¥£¬Ö»Òª¶Ô¹¤¾ßÀ¸·¢ËÍTB_AUTOSIZEÏûÏ¢¾Í¿ÉÒÔÁË£º

invoke¡¡¡¡SendMessage£»hToolbar£»TB_AUTOSIZE£»0£»0

ÏûÏ¢Öв»±ØÖ¸¶¨Î»ÖúʹóС²ÎÊý£¬¹¤¾ßÀ¸»á×Ô¶¯¼ÆËãеĴóС£¬ÏûÏ¢·¢ËÍÒÔºó·Ö¸ôÏßÒ²»á±»µ÷Õûµ½ÕýÈ·µÄ¿í¶È£¬Ò»Çп´ÆðÀ´¾ÍÍêÃÀÁË¡£

3¡£¡¡¹¤¾ßÀ¸°´Å¥µÄά»¤ÏûÏ¢

¹¤¾ßÀ¸°´Å¥¿ÉÒÔÏñ²Ëµ¥ÏîÒ»ÑùÓÐÑ¡ÖС¢ÔÊÐíºÍ»Ò»¯µÈ״̬£¬ÔÚ³ÌÐòÖпÉÒÔʹÓÃÒ»×éTB_ISBUTTONxxxxÀàÐ͵ÄÏûÏ¢À´¼ì²â°´Å¥µÄ״̬£º

¡¡

invoke¡¡¡¡SendMessage£»hToolbar£»TB_ISBUTTONCHECKED£»idButton£»0¡¡£»ÊÇ·ñÔÚÑ¡ÖÐ״̬

invoke¡¡¡¡SendMessage£»hToolbar£»TB_ISBUTTONENABLED£»idButton£»0¡¡£»ÊÇ·ñÔÚÔÊÐí״̬

invoke¡¡¡¡SendMessage£»hToolbar£»TB_ISBUTTONHIDDEN£»idButton£»0¡¡¡¡£»ÊÇ·ñÔÚÒþ²Ø״̬

invoke¡¡¡¡SendMessage£»hToolbar£»TB_ISBUTTONINDETERMINATE£»idButton£»0¡¡£»ÊÇ·ñ»Ò»¯

invoke¡¡¡¡SendMessage£»hToolbar£»TB_ISBUTTONPRESSED£»idButton£»0¡¡£»ÊÇ·ñÔÚ°´ÏÂ״̬

¶ÔÓÚÉÏÃæÕâЩÏûÏ¢£¬Èç¹û´ð°¸Êǿ϶¨µÄ£¬ÄÇôÏûÏ¢·µ»ØTRUE£¬·ñÔòÏûÏ¢·µ»ØFALSE¡£Èç¹ûÏÓÿ´Îµ÷ÓÃÖ»Äܼì²âÒ»ÖÖ״̬ÏԵñȽÏÂé·³£¬Ò²¿ÉÒÔ·¢ËÍTB_GETSTATEÏûÏ¢£º

invoke¡¡¡¡SendMessage£»hToolbar£»TB_GETSTATE£»idButton£»0

º¯Êý»á·µ»Ø°´Å¥ËùÓÐ״̬µÄ×éºÏÖµ£¨TBSTATE_INDETERMINATE£¬TBSTATE¡¡_CHECKED£¬TBSTATE_ENABLED£¬TBSTATE_HIDDEN»òTBSTATE_PRESSEDµÈ״̬µÄ×éºÏ£©¡£ÔÚÉÏÃæÕâЩÏûÏ¢ÖУ¬idButtonÓÃÀ´Ö¸¶¨°´Å¥¶ÔÓ¦µÄÃüÁîID¡£

ÉèÖð´Å¥µÄ״̬Ҳ¿ÉÒÔͨ¹ýÒ»×éÏûÏ¢À´Íê³É£º

invoke¡¡¡¡SendMessage£»hToolbar£»TB_CHECKBUTTON£»idButton£»uState¡¡£»Ñ¡Öа´Å¥

invoke¡¡¡¡SendMessage£»hToolbar£»TB_ENABLEBUTTON£»idButton£»uState¡¡¡¡¡¡¡¡£»ÔÊÐí°´Å¥

invoke¡¡¡¡SendMessage£»hToolbar£»TB_HIDEBUTTON£»idButton£»uState¡¡¡¡£»Òþ²Ø°´Å¥

invoke¡¡¡¡SendMessage£»hToolbar£»TB_PRESSBUTTON£»idButton£»uState¡¡£»°´Ï°´Å¥

¶ÔÓÚÕâЩÏûÏ¢£¬Èç¹ûuStateÖ¸¶¨ÎªTRUE£¬ÄÇô°´Å¥»á·Ö±ð±»ÉèÖÃΪѡÖС¢ÔÊÐí¡¢Òþ²ØºÍ°´ÏÂ״̬£»Èç¹ûuStateÖ¸¶¨ÎªFALSE£¬°´Å¥»á±»ÉèÖÃΪ·ÇÑ¡ÖС¢»Ò»¯¡¢ÏÔʾºÍ͹ÆðµÄ״̬¡£

ͬÑù£¬ÒªÒ»´ÎÐÔÉèÖÃËùÓÐ״̬£¬¿ÉÒÔ·¢ËÍTB_SETSTATEÏûÏ¢£º

¡¡¡¡¡¡¡¡invoke¡¡¡¡SendMessage£»hToolbar£»TB_PRESSBUTTON£»idButton£»uState¡¡

uState²ÎÊý¿ÉÒÔÖ¸¶¨ÎªTBSTATE_INDETERMINATE£¬TBSTATE_CHECKED£¬TBSTATE¡¡_ENABLED£¬TBSTATE_HIDDEN»òTBSTATE_PRESSEDµÈ°´Å¥×´Ì¬µÄ×éºÏÖµ¡£

9¡£3¡£3¡¡¡¡¹¤¾ßÀ¸µÄ֪ͨÏûÏ¢

´ó²¿·ÖͨÓÿؼþÏò¸¸´°¿Ú·¢Ë͵Ä֪ͨÏûÏ¢ÊÇWM_NOTIFY£¬ÎªÁ˱ãÓںͲ˵¥ÏûϢʹÓÃͬһ¶ÎÃüÁî´¦ÀíµÄÂß¼­´úÂ룬µ±°´¶¯¹¤¾ßÀ¸°´Å¥µÄʱºò£¬¹¤¾ßÀ¸¿Ø¼þÏò¸¸´°¿Ú·¢Ë͵ÄÊÇWM_MANDÏûÏ¢£¬µ«ÆäËûÇé¿öÏ·¢Ë͵Ä֪ͨÏûÏ¢ÈÔÈ»ÊÇWM_NOTIFYÏûÏ¢¡£

¹¤¾ßÀ¸·¢Ë͵ÄWM_NOTIFYÏûÏ¢Ö÷ÒªÓÃÓÚÏÔʾ¹¤¾ßÌáʾºÍ¶¨Öƹ¤¾ßÀ¸¡£

1¡£¡¡¹¤¾ßÌáʾ

µ±¹¤¾ßÀ¸µÄ·ç¸ñ°üº¬TBSTYLE_TOOLTIPSµÄʱºò£¬CreateToolbarExº¯Êý×Ô¶¯´´½¨Ò»¸ö¹¤¾ßÌáʾ¿Ø¼þ£¨Tool¡¡Tip£©£¬²¢Îª¹¤¾ßÀ¸ÉϵÄÿ¸ö°´Å¥×¢²áÌáʾÎı¾£¬µ±Êó±êÖ¸ÕëÒƶ¯µ½°´Å¥Éϲ¢Í£ÁôƬ¿ÌµÄʱºò£¬¹¤¾ßÌáʾÐÅÏ¢»á×Ô¶¯ÏÔʾ³öÀ´¡£

¹¤¾ßÌáʾÐÅÏ¢Êǹ¤¾ßÌáʾ¿Ø¼þͨ¹ý°üº¬TTN_NEEDTEXT֪ͨÂëµÄWM_NOTIFYÏûÏ¢Ïò¸¸´°¿ÚË÷È¡µÄ£¬ËùÒÔÕâ¸öWM_NOTIFYÏûÏ¢ÑϸñµØ˵Ӧ¸ÃÊôÓÚ¹¤¾ßÌáʾ¿Ø¼þµÄ֪ͨÏûÏ¢¶ø²»Êǹ¤¾ßÀ¸µÄ֪ͨÏûÏ¢£¬µ«ÕâÀïµÄ¹¤¾ßÌáʾ¿Ø¼þÊÇCreateToolbarExº¯Êý×Ô¶¯´´½¨µÄ£¬ËùÒÔ»¹ÊÇÒ»Æð½éÉÜ¡£

ÔÚ°üº¬TTN_NEEDTEXT֪ͨÂëµÄWM_NOTIFYÏûÏ¢ÖУ¬lParamÖ¸ÏòÒ»¸öTOOLTIPTEXT½á¹¹¡ª¡ªÂý×Å£¡Ç°Ãæ²»ÊÇ˵WM_NOTIFYÏûÏ¢µÄlParam²ÎÊýÖ¸ÏòÒ»¸öNMHDRÂð£¿ÔõôÓÖÊÇTOOLTIPTEXT½á¹¹ÄØ£¿ÓÉÓÚ²»Í¬¿Ø¼þµÄ֪ͨÏûÏ¢¶¼Ê¹ÓÃWM_NOTIFYÏûÏ¢£¬ÓÐЩ֪ͨÏûÏ¢¿ÉÄÜÐèÒª¸½´øÆäËûÊý¾Ý£¬Õâʱ½öʹÓÃÒ»¸öNMHDR½á¹¹À´±í´ïÊDz»¹»µÄ£¬WindowsµÄ´¦Àí°ì·¨ÊÇΪÐèÒª¸½´øÆäËûÊý¾ÝµÄWM_NOTIFYÏûÏ¢¶¨Ò岻ͬµÄÊý¾Ý½á¹¹£¬µ«ÕâЩ½á¹¹Í·²¿¶¼ÊÇÒ»¸öNMHDR½á¹¹£¬NMHDR½á¹¹ÒÔºó²ÅÊÇÆäËû×ֶΣ¬ÕâÑùÔÚµÃ֪֪ͨÂë֮ǰ£¬°ÑlParam²ÎÊýÖ¸Õëµ±×öÒ»¸öNMHDR½á¹¹À´´¦Àí×ÜÊÇÕýÈ·µÄ¡£¶øÇÒÖ»ÓÐÏÈ°ÑlParam²ÎÊýÖ¸Õëµ±×öNMHDR½á¹¹´¦Àí²¢´ÓÖлñȡ֪ͨÂëÒԺ󣬲ÅÕæÕýÖªµÀlParamÖ¸ÏòµÄ¾¿¾¹ÊÇʲô½á¹¹¡£

ºÃÁË£¬ÎÊÌâ½â¾öÁË£¬ÑÔ¹éÕý´«¡£TTN_NEEDTEXT֪ͨÂëµÄlParamÖ¸ÏòÒ»¸öTOOLTIPTEXT½á¹¹£¬Õâ¸ö½á¹¹µÄ¶¨ÒåÊÇ£º¡¡

TOOLTIPTEXT¡¡STRUCT

¡¡¡¡hdr¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡NMHDR¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡£»Í·²¿Î»ÖÃÊÇÒ»¸öNMHDR½á¹¹

¡¡¡¡lpszText¡¡¡¡¡¡¡¡¡¡¡¡¡¡DWORD¡¡¡¡¡¡¡¡¡¡¡¡£¿¡¡¡¡¡¡¡¡£»¹¤¾ßÌáʾ×Ö·û´®Ö¸Õë

¡¡¡¡szText¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡BYTE¡¡80¡¡dup¡¡£¨£¿£©¡¡£»¹¤¾ßÌáʾ×Ö·û´®»º³åÇø

¡¡¡¡hInst¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡DWORD¡¡¡¡¡¡¡¡¡¡¡¡¡¡£¿¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡£»°üº¬×Ö·û´®×ÊÔ´µÄÄ£¿é¾ä±ú

¡¡¡¡uFlags¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡DWORD¡¡¡¡¡¡¡¡¡¡¡¡¡¡£¿¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡£»±êÖ¾

TOOLTIPTEXT¡¡ENDS

µ±ÐèÒªÏÔʾ¹¤¾ßÌáʾÐÅÏ¢µÄʱºò£¬¹¤¾ßÌáʾ¿Ø¼þÏò¸¸´°¿Ú·¢ËÍTTN_NEEDTEXT֪ͨÂ룬¸¸´°¿Ú½«ÐèÒªÏÔʾµÄÌáʾ×Ö·û´®·ÅÔÚTOOLTIPTEXT½á¹¹Öв¢·µ»ØÒԺ󣬹¤¾ßÌáʾ¿Ø¼þ¾Í»á°ÑËüÏÔʾ³öÀ´¡£ÉèÖÃTOOLTIPTEXT½á¹¹µÄ°ì·¨ÓÐ3ÖÖ£¬¶ÁÕß¿ÉÒÔÈÎÑ¡ÆäÒ»£º

£¨1£©×Ö·û´®°üº¬ÔÚ×ÊÔ´ÖУ¬Õâʱ¿ÉÒÔ½«hInst×Ö¶ÎÉèÖÃΪ°üº¬×ÊÔ´µÄÄ£¿é¾ä±ú£¬²¢°ÑlpszText×Ö¶ÎÉèÖÃΪ×Ö·û´®ID£¬ÆäËû×ֶα£³ÖΪNULL£¬¹¤¾ßÌáʾ»á×Ô¼ºÊ¹ÓÃLoadStringº¯Êý×°Èë×Ö·û´®¡£

£¨2£©½«×Ö·û´®·ÅÔÚÄÚ´æÖУ¬½«ÄÚ´æÖ¸Õë·ÅÈëlpszText×Ö¶ÎÖУ¬ÆäËû×ֶα£³ÖNULL¡£

£¨3£©½«×Ö·û´®¿½ÈëszText×Ö¶ÎÖУ¬ÆäËû×ֶα£³ÖNULL¡£

Àý×Ó³ÌÐòʹÓÃÁ˵ÚÒ»ÖÖ°ì·¨¡£ÓÉÓÚNMHDR½á¹¹µÄidFrom×Ö¶ÎÒѾ­·µ»ØÁË°´Å¥µÄÃüÁîID£¬ËùÒÔÔÚ×ÊÔ´½Å±¾ÎļþÖн«×Ö·û´®µÄIDºÍÃüÁîIDÒ»Ò»¶ÔÓ¦¶¨Ò壬ȻºóʹÓõÚÒ»ÖÖ·½·¨ÊÇ×î·½±ãµÄ£¬´úÂëÈçÏ£º

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡£elseif¡¡eax¡¡¡¡¡¡WM_NOTIFY

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡mov¡¡¡¡¡¡¡¡¡¡ebx£»lParam

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡£if¡¡¡¡¡¡¡¡¡¡£§ebx¡¡£«¡¡NMHDRde£§¡¡¡¡TTN_NEEDTEXT

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡assume¡¡¡¡ebx£ºptr¡¡TOOLTIPTEXT

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡mov¡¡¡¡¡¡¡¡¡¡eax£»£§ebx£§¡£hdr¡£idFrom

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡mov¡¡¡¡¡¡¡¡¡¡£§ebx£§¡£lpszText£»eax

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡push¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡hInstance

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡pop¡¡¡¡¡¡¡¡¡¡£§ebx£§¡£hinst

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡assume¡¡¡¡ebx£ºnothing

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡£¡£¡£

¶ÁÕß¿ÉÒÔ×Ô¼º³¢ÊÔÒ»ÏÂÆäËûµÄ·½·¨¡£



¡¡
À´Ô´£ºµç×Ó¹¤Òµ³ö°æÉç¡¡×÷ÕߣºÂÞÔƱò¡¡ÉÏÒ»Ò³¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡»ØÊéÄ¿¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ÏÂÒ»Ò³¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡
ÉÏÒ»Ò³¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡»ØÊéÄ¿¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ÏÂÒ»Ò³¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡


µÚ9Õ¡¡Í¨Óÿؼþ


9¡£3¡¡Ê¹Óù¤¾ßÀ¸£¨6£©

¡¡¡¡¡¡¡¡
2¡£¡¡¶¨Öƹ¤¾ßÀ¸

¶¨Öƹ¦ÄÜÊǹ¤¾ßÀ¸ÖÐ×îÁîÈËÐ˷ܵÄÌØÕ÷£ºµ±¹¤¾ßÀ¸°üº¬CCS_ADJUSTABLE·ç¸ñµÄʱºò£¬Óû§¿ÉÒÔͨ¹ý°´ÏÂShift¼ü²¢Í϶¯¹¤¾ßÀ¸Éϵİ´Å¥À´Òƶ¯°´Å¥Î»Öã»Èç¹û½«°´Å¥Íϳö¹¤¾ßÀ¸µÄ±ß½ç£¬°´Å¥»á±»É¾³ý£»¸üÖØÒªµÄÊÇ£¬Èç¹ûÏò¹¤¾ßÀ¸·¢ËÍTB_CUSTOMIZEÏûÏ¢»òÕßÔÚ¹¤¾ßÀ¸µÄ¿Õ°×´¦Ë«»÷Êó±ê£¬»áÏÔʾ³öÒ»¸öÈçͼ9¡£7ËùʾµÄ¡°×Ô¶¨Ò幤¾ßÀ¸¡±¶Ô»°¿ò£¬¶Ô»°¿òÓұߵÄÁбí¿òÖÐÁгöÁ˵±Ç°ÏÔʾÔÚ¹¤¾ßÀ¸Éϵİ´Å¥£¬×ó±ßÁбí¿òÁгöÁË¿ÉÒÔÌí¼Óµ½¹¤¾ßÀ¸Éϵİ´Å¥£¬Óû§¿ÉÒÔ½«Ò»¸ö°´Å¥ËæÒâÔÚʹÓúͲ»Ê¹ÓÃÖ®¼äÇл»£¬²¢ÇÒ¿ÉÒÔͨ¹ýÍ϶¯°´Å¥µÄÉÏÏÂλÖÃÀ´¾ö¶¨°´Å¥ÔÚ¹¤¾ßÀ¸ÉϵÄλÖá£

¹¤¾ßÀ¸Í¨¹ýһϵÁеÄ֪ͨÐÅÏ¢À´ºÍ¸¸´°¿Ú½»»¥£¬¹²Í¬Î¬»¤¡°×Ô¶¨Ò幤¾ßÀ¸¡±¶Ô»°¿ò£¬ÔÚÕâ¸ö¶Ô»°¿ò½¨Á¢ºÍ¹Ø±ÕµÄʱºò£¬¹¤¾ßÀ¸Í¨¹ýTBN_BEGINADJUSTºÍTBN_ENDADJUST֪ͨÂëÀ´Í¨Öª¸¸´°¿Ú£»Ã¿´Î°´Å¥±»µ÷ÕûµÄʱºò£¬·¢Ë͵ÄÊÇTBN_TOOLBARCHANGE֪ͨÂ룻ÔÚ°´Ï¶Ի°¿òÖеġ°°ïÖú¡±°´Å¥ºÍ¡°ÖØÖá±°´Å¥µÄʱºò£¬·¢Ë͵ÄÊÇTBN_CUSTHELPºÍTBN_RESET֪ͨÂ룬¶ÔÓÚÕâЩ֪ͨÂ룬¸¸´°¿Ú¿ÉÒÔ²»±ØÏìÓ¦£¬Õâ²¢²»»áÓ°Ïì¶Ô»°¿òµÄʹÓá£

Óë¶Ô»°¿òÊÇ·ñÄܹ»Õý³£ÔËÐÐÓйصÄ֪ͨÂëÊÇTBN_QUERYINSERT£¬TBN_QUERYDELETEºÍTBN_GETBUTTONINFO£¬¸¸´°¿Ú±ØÐëÓ¦´ðÕâЩ֪ͨÂë¡£


ͼ9¡£7¡¡¡¡×Ô¶¨Ò幤¾ßÀ¸¶Ô»°¿ò

µ±Óû§ÔÚÖ¸¶¨Î»ÖòåÈëÒ»¸ö°´Å¥µÄʱºò£¬¹¤¾ßÀ¸·¢ËÍTBN_QUERYINSERT֪ͨÂëѯÎʸ¸´°¿ÚÊÇ·ñÔÊÐí´Ë²Ù×÷£¬ÕâʱlParamÖ¸ÏòÒ»¸öTBNOTIFY½á¹¹£¬Õâ¸ö½á¹¹¶¨ÒåÈçÏ£º

TBNOTIFY¡¡STRUCT

¡¡¡¡hdr¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡NMHDR¡¡¡¡¡¡¡¡¡¡¡¡¡¡£»ÏÔÈ»£¬ÕâÀï¿Ï¶¨ÊÇNMHDR½á¹¹

¡¡¡¡iItem¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡DWORD¡¡¡¡¡¡¡¡¡¡¡¡£¿¡¡¡¡£»°´Å¥µÄλÖÃË÷Òý

¡¡¡¡tbButton¡¡¡¡¡¡¡¡¡¡¡¡¡¡TBBUTTON¡¡¡¡£»°üº¬°´Å¥ÐÅÏ¢µÄTBBUTTON½á¹¹

¡¡¡¡cchText¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡DWORD¡¡¡¡¡¡¡¡¡¡¡¡£¿¡¡£»pszTextÖÐ×Ö·û´®µÄ³¤¶È

¡¡¡¡pszText¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡DWORD¡¡¡¡¡¡¡¡¡¡¡¡£¿¡¡£»°´Å¥µÄ˵Ã÷×Ö·û´®

TBNOTIFY¡¡ENDS

¡¡

Èç¹û³ÌÐòÔÊÐíÔÚ´Ë°´Å¥Ç°Ãæ²åÈëÒ»¸öа´Å¥£¬ÄÇô·µ»ØTRUE£¬·ñÔò·µ»ØFALSE¡£ÁíÍâµ±×Ô¶¨Òå¶Ô»°¿ò¸ÕÏÔʾµÄʱºò£¬¸¸´°¿ÚÒ²»áÊÕµ½Õâ¸ö֪ͨÂ룬Õâʱ±ØÐë·µ»ØTRUE£¬·ñÔò¶Ô»°¿òÔÚÆÁÄ»ÉÏÒ»ÉÁ¾ÍÏûʧÁË¡£

µ±Óû§ÒªÉ¾³ýÒ»¸ö°´Å¥µÄʱºò£¬¹¤¾ßÀ¸·¢ËÍTBN_QUERYDELETE֪ͨÂ룬ѯÎʸ¸´°¿ÚÊÇ·ñÔÊÐí´Ë²Ù×÷£¬ÕâʱlParamÒ²Ö¸ÏòÒ»¸öTBNOTIFY½á¹¹£¬ÓÃÀ´ËµÃ÷½«ÒªÉ¾³ýµÄ°´Å¥£¬Èç¹û³ÌÐòÔÊÐí´Ë²Ù×÷Ôò·µ»ØTRUE£¬·ñÔò·µ»ØFALSE¡£

¡¡¡¡¡¡¡¡¡£elseif¡¡£¨£§ebx¡¡£«¡¡NMHDRde£§¡¡¡¡TBN_QUERYINSERT£©¡¡£ü£ü¡¡¡¡¡¡¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡£¨£§ebx¡¡£«¡¡NMHDRde£§¡¡¡¡TBN_QUERYDELETE£©¡¡¡¡£»ÏÖÔÚebx¡¡=¡¡lParam

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡mov¡¡eax£»TRUE

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ret

ÔÚÀý×Ó³ÌÐ
·µ»ØĿ¼ ÉÏÒ»Ò³ ÏÂÒ»Ò³ »Øµ½¶¥²¿ ÔÞ£¨0£© ²È£¨0£©
δÔĶÁÍꣿ¼ÓÈëÊéÇ©ÒѱãÏ´μÌÐøÔĶÁ£¡
ÎÂÜ°Ìáʾ£º ο´Ð¡ËµµÄͬʱ·¢±íÆÀÂÛ£¬Ëµ³ö×Ô¼ºµÄ¿´·¨ºÍÆäËüС»ï°éÃÇ·ÖÏíÒ²²»´íŶ£¡·¢±íÊéÆÀ»¹¿ÉÒÔ»ñµÃ»ý·ÖºÍ¾­Ñé½±Àø£¬ÈÏÕæдԭ´´ÊéÆÀ ±»²ÉÄÉΪ¾«ÆÀ¿ÉÒÔ»ñµÃ´óÁ¿½ð±Ò¡¢»ý·ÖºÍ¾­Ñé½±ÀøŶ£¡