ÓÑÇéÌáʾ£ºÈç¹û±¾ÍøÒ³´ò¿ªÌ«Âý»òÏÔʾ²»ÍêÕû£¬Çë³¢ÊÔÊó±êÓÒ¼ü¡°Ë¢Ð¡±±¾ÍøÒ³£¡
ºÏ×âС˵Íø ·µ»Ø±¾ÊéĿ¼ ¼ÓÈëÊéÇ© ÎÒµÄÊé¼Ü ÎÒµÄÊéÇ© TXTÈ«±¾ÏÂÔØ ¡ºÊղص½ÎÒµÄä¯ÀÀÆ÷¡»

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

¿ì½Ý²Ù×÷: °´¼üÅÌÉÏ·½Ïò¼ü ¡û »ò ¡ú ¿É¿ìËÙÉÏÏ·­Ò³ °´¼üÅÌÉ쵀 Enter ¼ü¿É»Øµ½±¾ÊéĿ¼ҳ °´¼üÅÌÉÏ·½Ïò¼ü ¡ü ¿É»Øµ½±¾Ò³¶¥²¿! Èç¹û±¾ÊéûÓÐÔĶÁÍ꣬ÏëÏ´μÌÐø½Ó×ÅÔĶÁ£¬¿ÉʹÓÃÉÏ·½ "Êղص½ÎÒµÄä¯ÀÀÆ÷" ¹¦ÄÜ ºÍ "¼ÓÈëÊéÇ©" ¹¦ÄÜ£¡



¡ñ¡¡¡¡¡¡CF_FIXEDPITCHONLY¡ª¡ª¶Ô»°¿òµÄ×ÖÌåÁбíÖÐÖ»ÏÔʾµÈ¿í×ÖÌå¡£

¡ñ¡¡¡¡¡¡CF_LIMITSIZE¡ª¡ª¶Ô»°¿òÏÔʾµÄ×ÖÌå³ß´çÏÞÓÚnSizeMinºÍnSizeMax×Ö¶ÎÖ¸¶¨µÄÊýÖµÖ®¼ä¡£

¡ñ¡¡¡¡¡¡CF_NOSTYLESEL¡ª¡ª¶Ô»°¿òÖв»ÏÔʾ¡°×ÖÐΡ±×éºÏÁбí¿ò¡£

¡ñ¡¡¡¡¡¡CF_NOSIZESEL¡ª¡ª¶Ô»°¿òÖв»ÏÔʾ¡°´óС¡±×éºÏÁбí¿ò¡£

¡ñ¡¡¡¡¡¡CF_SCREENFONTS¡ª¡ª×ÖÌåÁбíÖÐÖ»ÏÔʾÆÁÄ»×ÖÌå¡£

µ÷ÓÃChooseFontº¯Êýʱ£¬º¯Êý»áÍ£ÁôÖ±µ½¶Ô»°¿ò¹Ø±ÕΪֹ£¬µ±Óû§µ¥»÷Á˶Ի°¿òÖеġ¡¡°È·¶¨¡±°´Å¥Ê±£¬º¯Êý·µ»ØTRUE£¬Óû§µ¥»÷¡°È¡Ïû¡±°´Å¥Í˳öʱ£¬º¯Êý·µ»ØFALSE¡£¾ßÌåµÄʹÓÃÀý×Ó¿ÉÒԲο¼Àý×ÓÖеÄ_ChooseFont×Ó³ÌÐò¡£

ÔÚµ÷ÓÃChooseFont֮ǰ£¬lpLogFont×ֶα»Ö¸ÏòÒ»¸öLOGFONT½á¹¹£¬¶Ô»°¿ò¹Ø±ÕµÄʱºò£¬º¯ÊýÔÚLOGFONT½á¹¹µÄlfFaceName×Ö¶ÎÖзµ»Ø×ÖÌåµÄÃû³Æ£¬×ÖÌåµÄЧ¹ûºÍ×ÖÐÎÒ²ÔÚLOGFONT½á¹¹Öзµ»Ø¡£

Óû§Ñ¡ÔñµÄÑÕÉ«ÔÚrgbColors¡¡×Ö¶ÎÖзµ»Ø£¬×ÖÌå´óСÔÚiPointSize×Ö¶ÎÖзµ»Ø£¬ÓÉÓÚµ¥Î»ÊÇ1/10°õ£¬ËùÒÔ·µ»ØµÄÊýÖµµÈÓÚ¶Ô»°¿òÖÐÑ¡ÔñµÄ×ÖÌå´óС³ËÒÔ10¡£

8¡£2¡£3¡¡¡¡Ñ¡ÔñÑÕÉ«¶Ô»°¿ò

Ñ¡ÔñÑÕÉ«¶Ô»°¿òÈçͼ8¡£3Ëùʾ£¬×ó±ßÊÇ»ù±¾µÄÑ¡ÔñϵͳԤ¶¨ÒåÑÕÉ«µÄÇøÓò£¬ÓÒ±ßÊÇÀ©Õ¹µÄÇøÓò£¬¿ÉÒÔÓÉÓû§×Ô¼ºÑ¡Ôñ»òÊäÈëÑÕÉ«Öµ¡£


ͼ8¡£3¡¡¡¡Ñ¡ÔñÑÕÉ«¶Ô»°¿ò

´ò¿ªÑ¡ÔñÑÕÉ«¶Ô»°¿òʹÓú¯ÊýChooseColor£º

invoke¡¡¡¡ChooseFont£¬lpcc

lpccÖ¸ÏòÒ»¸öCHOOSECOLOR½á¹¹£¬Õâ¸ö½á¹¹ÊÇÕâÑù¶¨ÒåµÄ£º

CHOOSECOLORA¡¡STRUCT

¡¡¡¡LStructSize¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡DWORD¡¡¡¡¡¡£¿¡¡¡¡¡¡£»½á¹¹³¤¶È

¡¡¡¡HwndOwner¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡DWORD¡¡¡¡¡¡£¿¡¡¡¡¡¡£»ËùÊô´°¿Ú

¡¡¡¡HInstance¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡DWORD¡¡¡¡¡¡£¿

¡¡¡¡RgbResult¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡DWORD¡¡¡¡¡¡£¿¡¡¡¡¡¡£»Óû§Ñ¡ÔñµÄÑÕÉ«Öµ

¡¡¡¡LpCustColors¡¡¡¡¡¡¡¡¡¡¡¡¡¡DWORD¡¡¡¡¡¡£¿¡¡¡¡¡¡£»Óû§×Ô¶¨ÒåÑÕÉ«»º³åÇø

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

¡¡¡¡LCustData¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡DWORD¡¡¡¡¡¡£¿

¡¡¡¡LpfnHook¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡DWORD¡¡¡¡¡¡£¿

¡¡¡¡LpTemplateName¡¡¡¡¡¡¡¡¡¡DWORD¡¡¡¡¡¡£¿

CHOOSECOLORA¡¡ENDS

½á¹¹Öм¸¸öÖØÒªµÄ×Ö¶Î˵Ã÷ÈçÏ¡£

¡ñ¡¡¡¡¡¡rgbResult¡ª¡ªÈç¹ûFlags×Ö¶ÎÖ¸¶¨ÁËCC_RGBINIT±êÖ¾£¬ÄÇô´´½¨¶Ô»°¿òµÄʱºòʹÓÃÕâ¸ö×Ö¶ÎÀ´³õʼ»¯Ñ¡Ôñ¿òÖеÄÑÕÉ«£»º¯Êý·µ»ØµÄʱºòÔÚÕâÀï·µ»ØÓû§Ñ¡ÔñµÄÑÕÉ«¡£

¡ñ¡¡¡¡¡¡lpCustColors¡ª¡ªÖ¸ÏòÒ»¸ö16¸öË«×Ö³¤¶ÈµÄ»º³åÇø£¬¶¨Òå16ÖÖ×Ô¶¨ÒåÑÕÉ«¡£

¡ñ¡¡¡¡¡¡Flags¡ª¡ª±êÖ¾£¬¿ÉÒÔÊÇÏÂÃæÈ¡ÖµµÄ×éºÏ£º

¡ö¡¡¡¡¡¡CC_FULLOPEN¡ª¡ª¶Ô»°¿òÏÔʾÓұߵÄÀ©Õ¹²¿·Ö£¬Èç¹û²»Ö¸¶¨Õâ¸ö±êÖ¾£¬³õʼ»¯µÄʱºòÀ©Õ¹²¿·Ö²»ÏÔʾ£¬µ«Óû§¿ÉÒÔͨ¹ýµ¥»÷¡°¹æ¶¨×Ô¶¨ÒåÑÕÉ«¡±°´Å¥½«¶Ô»°¿òÕ¹¿ª¡£

¡ö¡¡¡¡¡¡CC_PREVENTFULLOPEN¡ª¡ª½ûÖ¹¡°¹æ¶¨×Ô¶¨ÒåÑÕÉ«¡±°´Å¥£¬Ò²¾ÍÊÇ˵²»ÔÊÐíÓû§Õ¹¿ª¶Ô»°¿òµÄÀ©Õ¹²¿·Ö¡£

¡ö¡¡¡¡¡¡CC_RGBINIT¡ª¡ª¶Ô»°¿òÏÔʾµÄʱºòÓÃrgbResult×ֶεÄÖµ³õʼ»¯Ñ¡Ôñ¿òÖеÄÑÕÉ«¡£

Èç¹ûÓû§µ¥»÷¡°È·¶¨¡±°´Å¥£¬º¯Êý·µ»ØTRUE£¬·ñÔòº¯Êý·µ»ØFALSE¡£¶ÁÕß¿ÉÒÔÔÚÀý×ÓÎļþÖеÄ_ChooseColor×Ó³ÌÐòÖÐÕÒµ½Ê¹ÓÃÕâ¸öº¯ÊýµÄÏêϸ´úÂë¡£

ʹÓÃChooseColorº¯ÊýҪעÒâµÄÊÇ£ºlpCustColorsÖ¸Õë²»ÄÜΪNULL£¬ËùÒÔ±ØÐë·ÖÅäÒ»¸ö16¸öË«×Ö³¤¶È»º³åÇø£¬Èç¹ûÖ¸ÕëÊÇNULL»áµ¼Öº¯ÊýÎ¥¹æ·ÃÎÊ00000000h´¦µÄÄڴ棬¾ÍµÈ×Å¿´¡°·Ç·¨²Ù×÷¡±°É£¡

8¡£2¡£4¡¡¡¡²éÕÒºÍÌæ»»Îı¾¶Ô»°¿ò

²éÕÒÎı¾¶Ô»°¿òÈçͼ8¡£4µÄÉÏͼËùʾ£¬Ìæ»»Îı¾¶Ô»°¿òÈçͼ8¡£4µÄÏÂͼËùʾ£¬ÒªÏÔʾÕâÁ½ÖÖͨÓöԻ°¿ò¿É·Ö±ðʹÓÃFindTextºÍReplaceTextº¯Êý£º

¡¡¡¡¡¡¡¡invoke¡¡¡¡FindText£¬lpfr

¡¡¡¡¡¡¡¡invoke¡¡¡¡ReplaceText£¬lpfr


ͼ8¡£4¡¡¡¡²éÕÒºÍÌæ»»¶Ô»°¿ò

ÕâÁ½¸öº¯Êý¶¼Ê¹ÓÃͬÑùµÄFINDREPLACE½á¹¹£º

FINDREPLACEA¡¡STRUCT

¡¡¡¡LStructSize¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡DWORD¡¡¡¡¡¡¡¡¡¡£¿¡¡¡¡¡¡¡¡¡¡¡¡£»½á¹¹³¤¶È

¡¡¡¡HwndOwner¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡DWORD¡¡¡¡¡¡¡¡¡¡£¿¡¡¡¡¡¡¡¡¡¡¡¡£»ËùÊô´°¿Ú

¡¡¡¡HInstance¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡DWORD¡¡¡¡¡¡¡¡¡¡£¿

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

¡¡¡¡LpstrFindWhat¡¡¡¡¡¡¡¡¡¡¡¡¡¡DWORD¡¡¡¡¡¡¡¡¡¡£¿¡¡¡¡¡¡¡¡¡¡¡¡£»²éÕÒ×Ö·û´®

¡¡¡¡LpstrReplaceWith¡¡¡¡¡¡¡¡DWORD¡¡¡¡¡¡¡¡¡¡£¿¡¡¡¡¡¡¡¡¡¡¡¡£»Ìæ»»×Ö·û´®

¡¡¡¡WFindWhatLen¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡WORD¡¡¡¡¡¡¡¡¡¡¡¡£¿¡¡¡¡¡¡¡¡¡¡¡¡£»²éÕÒ×Ö·û´®³¤¶È

¡¡¡¡WReplaceWithLen¡¡¡¡¡¡¡¡¡¡WORD¡¡¡¡¡¡¡¡¡¡¡¡£¿¡¡¡¡¡¡¡¡¡¡¡¡£»Ìæ»»×Ö·û´®³¤¶È

¡¡¡¡LCustData¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡DWORD¡¡¡¡¡¡¡¡¡¡£¿

¡¡¡¡LpfnHook¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡DWORD¡¡¡¡¡¡¡¡¡¡£¿

¡¡¡¡LpTemplateName¡¡¡¡¡¡¡¡¡¡¡¡DWORD¡¡¡¡¡¡¡¡¡¡£¿

FINDREPLACEA¡¡ENDS

FINDREPLACE¡¡¡¡equ¡¡¡¡



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


µÚ8Õ¡¡Í¨ÓöԻ°¿ò


8¡£2¡¡Ê¹ÓÃͨÓöԻ°¿ò£¨3£©

¡¡¡¡¡¡¡¡
½á¹¹ÖйؼüµÄ×Ö¶Î˵Ã÷ÈçÏ¡£

¡ñ¡¡¡¡¡¡Flags¡ª¡ª±êÖ¾£¬´´½¨¶Ô»°¿òµÄʱºò£¬º¯Êý¸ù¾Ý±êÖ¾ÖеÄÊýÖµ³õʼ»¯¶Ô»°¿òÖи÷¿Ø¼þµÄ״̬£¬·µ»ØµÄʱºò¸ù¾ÝÓû§µÄÑ¡ÔñÀ´ÉèÖñêÖ¾×ֶεÄÄÚÈÝ£¬±êÖ¾×ֶοÉÒÔÊÇÒÔÏÂÈ¡ÖµµÄ×éºÏ£º

¡ö¡¡¡¡¡¡FR_FINDNEXT£¬FR_REPLACE£¬FR_REPLACEALL£¬FR_DIALOGTERM¡ª¡ª·Ö±ð±íʾÓû§µ¥»÷ÁË¡°²éÕÒÏÂÒ»¸ö¡±¡¢¡°Ìæ»»¡±¡¢¡°È«²¿Ìæ»»¡±ºÍ¡°È¡Ïû¡±°´Å¥¡£

¡ö¡¡¡¡¡¡FR_HIDEUPDOWN£¬FR_HIDEMATCHCASEÓëFR_HIDEWHOLEWORD¡ª¡ª³õʼ»¯Ê±Ê¹Ó㬱íʾ¶Ô»°¿òÖв»ÏÔʾ¡°·½Ïò¡±¡¢¡°Çø·Ö´óСд¡±Óë¡°È«×ÖÆ¥Å䡱°´Å¥¡£

¡ö¡¡¡¡¡¡FR_NOMATCHCASE£¬FR_NOUPDOWNÓëFR_NOWHOLEWORD¡ª¡ª³õʼ»¯Ê±½«¡¡¡°Çø·Ö´óСд¡±¡¢¡°·½Ïò¡±Óë¡°È«×ÖÆ¥Å䡱°´Å¥»Ò»¯¡£

¡ö¡¡¡¡¡¡FR_MATCHCASE»òFR_WHOLEWORD¡ª¡ª±íʾÓû§Ñ¡ÖÐÁË¡°Çø·Ö´óСд¡±»ò¡°È«×ÖÆ¥Å䡱¸´Ñ¡¿ò¡£

¡ö¡¡¡¡¡¡FR_DOWN¡ª¡ª°Ñ¡°·½Ïò¡±µ¥Ñ¡Å¥ÉèÖÃΪ¡°ÏòÏ¡±¡£

¡ñ¡¡¡¡¡¡lpstrFindWhat¡ª¡ªÖ¸Ïò°üº¬²éÕÒ×Ö·û´®µÄÖ¸Õ룬»º³åÇøµÄ³¤¶È±ØÐëÖÁÉÙΪ80¡¡B£¬Õâ¸ö×Ö·û´®ÔÚ³õʼ»¯µÄʱºò³öÏÖÔÚ¡°²éÕÒÄÚÈÝ¡±±à¼­¿òÖУ¬º¯ÊýÒ²ÔÚÕâÀï·µ»ØÓû§ÊäÈëµÄÄÚÈÝ¡£

¡ñ¡¡¡¡¡¡lpstrReplaceWith¡ª¡ªÖ¸Ïò°üº¬Ìæ»»×Ö·û´®µÄÖ¸Õ룬Õâ¸ö×Ö·û´®ÔÚ³õʼ»¯µÄʱºò³öÏÖÔÚ¡°Ì滻Ϊ¡±±à¼­¿òÖУ¬º¯ÊýÒ²ÔÚÕâÀï·µ»ØÓû§ÊäÈëµÄÄÚÈÝ¡£Õâ¸ö×Ö¶ÎÔÚʹÓÃFindTextº¯ÊýµÄʱºò¿ÉÒÔΪNULL£¬µ«ÔÚʹÓÃReplaceTextº¯ÊýµÄʱºò±ØÐëÉèÖ㬷ñÔò¶Ô»°¿ò²»»áÏÔʾ¡£

¡ñ¡¡¡¡¡¡wFindWhatLenºÍwReplaceWithLen¡ª¡ªlpstrFindWhatºÍlpstrReplaceWithָʾ»º´æÇøµÄ³¤¶È¡£

²éÕÒºÍÌ滻ͨÓöԻ°¿òµÄʹÓÃÓÐЩÌØÊ⣬ÒòΪÕâÁ½ÖÖ¶Ô»°¿òÊÇ·Çģ̬¶Ô»°¿ò£¬Ò²¾ÍÊÇ˵£¬FindTextºÍReplaceTextº¯Êý±»µ÷Óúó£¬ÏµÍ³ÏÔʾ¶Ô»°¿òºóÂíÉÏ·µ»Ø£¬¶Ô»°¿ò±£³ÖÏÔʾ״̬£¬Ö±µ½Óû§°´ÏÂÁË¡°È¡Ïû¡±°´Å¥ºó¶Ô»°¿ò²Å¹Ø±Õ¡£Èç¹ûÓû§°´ÏÂÁ˶Ի°¿òÖеÄij¸ö°´Å¥£¬¶Ô»°¿òÉèÖÃFINDREPLACE½á¹¹µÄÏà¹Ø×ֶβ¢Í¨¹ý×Ô¶¨ÒåµÄÏûϢ֪ͨ¸¸´°¿ÚµÄ´°¿Ú¹ý³Ì£¬³ÌÐòÖд¦Àí²éÕÒºÍÌæ»»µÄ¹¦Äܼ¯ÖÐÔÚÕâ¸ö×Ô¶¨ÒåÏûÏ¢ÖÐÍê³É¡£ÁíÍ⣬ÓÉÓÚ¶Ô»°¿ò±ØÐëÏò¸¸´°¿Ú·¢ËÍÏûÏ¢£¬ËùÒÔhwndOwner×Ö¶ÎÖбØÐëÖ¸¶¨¸¸´°¿ÚµÄ¾ä±ú£¬¶ø²»ÄÜÏñÆäËûͨÓöԻ°¿òÒ»Ñù¿ÉÒÔ°ÑhwndOwner×Ö¶ÎÉèÖÃΪNULL¡£

ΪÁËÈöԻ°¿òÄܹ»Ê¹ÓÃ×Ô¶¨ÒåÏûÏ¢£¬³ÌÐò±ØÐëÊ×ÏÈʹÓÃRegisterWindowMessageº¯Êý×¢²á×Ô¶¨ÒåÏûÏ¢£¬Õâ¸öº¯Êý×¢²áÏûÏ¢²¢·µ»ØÏûÏ¢ID£¬ÊäÈëµÄ²ÎÊýÊÇÏûÏ¢Ãû³Æ×Ö·û´®£¬MicrosoftµÄ±à³ÌÊÖ²áÖÐ˵Ã÷ҪΪ²éÕÒºÍÌæ»»¶Ô»°¿ò×¢²áFINDMSGSTRINGÏûÏ¢£¬µ«Ã»ÓÐÈκÎ×ÊÁÏ˵Ã÷FINDMSGSTRING¾¿¾¹´ú±íʲô£¬ÊÇ´ú±íÏûÏ¢Ãû³Æ×Ö·û´®Îª¡°FINDMSGSTRING¡±Â𣿲»ÊÇ£¬Êµ¼ÊÉÏËü´ú±í×Ö·û´®¡°mdlg_FindReplace¡±£¬ËùÒÔ£¬ÔÚ¶Ô»°¿òµÄ³õʼ»¯ÏûÏ¢ÖÐÈçÏÂ×¢²áÏûÏ¢£º

idFindMessage¡¡¡¡¡¡¡¡dd¡¡¡¡¡¡¡¡¡¡¡¡£¿

FINDMSGSTRING¡¡¡¡¡¡¡¡db¡¡¡¡¡¡¡¡¡¡¡¡'mdlg_FindReplace'£»0

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

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡invoke¡¡¡¡RegisterWindowMessage£»addr¡¡FINDMSGSTRING

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡mov¡¡¡¡¡¡¡¡¡¡idFindMessage£»eax

×¢Ò⣺Ҫ°ÑRegisterWindowMessageº¯Êý·µ»ØµÄÏûÏ¢ID±£´æÏÂÀ´£¬²¢ÔÚÖ÷´°¿ÚµÄÏûϢѭ»·ÖÐͨ¹ýÅжÏuMsgÊÇ·ñµÈÓÚÕâ¸öÏûÏ¢IDÀ´Åж϶Ի°¿òÊÇ·ñ·¢»ØÏûÏ¢£º

mov¡¡¡¡¡¡¡¡¡¡¡¡¡¡eax£»uMsg

¡£if¡¡¡¡¡¡¡¡¡¡¡¡¡¡eax¡¡¡¡¡¡¡¡¡¡¡¡WM_XXX

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

¡£elseif¡¡¡¡¡¡eax¡¡¡¡¡¡¡¡¡¡¡¡idFindMessage

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡£if¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡stFind¡£Flags¡¡&¡¡FR_DIALOGTERM

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡£»Óû§°´ÏÂÁË¡°È¡Ïû¡±°´Å¥£¬¶Ô»°¿ò¹Ø±Õ

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡£elseif¡¡¡¡¡¡¡¡stFind¡£Flags¡¡&¡¡FR_FINDNEXT

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡£»Óû§°´ÏÂÁË¡°²éÕÒÏÂÒ»¸ö¡±°´Å¥

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡£elseif¡¡stFind¡£Flags¡¡&¡¡FR_REPLACE

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡£»Óû§°´ÏÂÁË¡°Ìæ»»¡±°´Å¥

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡£elseif¡¡stFind¡£Flags¡¡&¡¡FR_REPLACEALL

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡£»Óû§°´ÏÂÁË¡°È«²¿Ìæ»»¡±°´Å¥

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡£endif

ÓÉÓÚÓû§°´ÏÂÁË¡°²éÕÒÏÂÒ»¸ö¡±¡¢¡°Ìæ»»¡±¡¢¡°È«²¿Ìæ»»¡±ºÍ¡°È¡Ïû¡±µÈ°´Å¥Ê±£¬¶Ô»°¿ò¶¼Òª·¢»ØÏûÏ¢£¬ËùÒÔÔÚ´¦Àíʱ»¹Òª¸ù¾Ý²»Í¬µÄ±êÖ¾½øÐв»Í¬µÄ´¦Àí¡£

¡¡ÒòΪ²éÕÒºÍÌæ»»¶Ô»°¿òÊÇ·Çģ̬¶Ô»°¿ò£¬ËùÒÔʹÓÃʱҪ°ÑFINDREPLACE½á¹¹ºÍ×Ö·û´®±äÁ¿·ÅÔÚÈ«¾Ö±äÁ¿ÖУ¬Èç¹û·ÅÔÚ¾Ö²¿±äÁ¿ÖУ¬¶Ô»°¿ò»¹Ã»ÓйرյÄÇé¿öÏ£¬ÕâЩ¾Ö²¿±äÁ¿¾ÍÒѾ­±»ÊÍ·Å£¬ÒÔºó¶Ô»°¿ò´æÈ¡µÄ¾Í»áÊÇÎÞЧµÄµØÖ·¡£

8¡£2¡£5¡¡¡¡Ò³ÃæÉèÖöԻ°¿ò

Ò³ÃæÉèÖöԻ°¿òÓÃÀ´ÉèÖôòÓ¡»ú²ÎÊý£¬Óû§¿ÉÒÔÔÚ¶Ô»°¿òÖÐÑ¡Ôñ´òÓ¡»ú¡¢´òÓ¡Ö½ÕÅ´óС¡¢Ò³±ß¾àºÍÖ½ÕÅ·½Ïò£¬»¹¿ÉÒÔÒý³öÒ»¸ö´òÓ¡»úÊôÐÔµÄÉèÖöԻ°¿ò¡£Óû§¿ÉÒÔÔÚÕâÀïÍê³ÉÓë´òÓ¡ÓйصÄËùÓÐÉèÖù¤×÷£¬Ò³ÃæÉèÖöԻ°¿òÈçͼ8¡£5Ëùʾ¡£

ÏÔʾҳÃæÉèÖöԻ°¿òʹÓÃPageSetupDlgº¯Êý£º

invoke¡¡¡¡PageSetupDlg£¬lppsd


ͼ8¡£5¡¡¡¡Ò³ÃæÉèÖöԻ°¿ò

lppsd²ÎÊýÖ¸ÏòÒ»¸öPAGESETUPDLG½á¹¹£º

PAGESETUPDLGA¡¡STRUCT

¡¡¡¡LStructSize¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡DWORD¡¡¡¡¡¡¡¡¡¡¡¡£¿¡¡¡¡¡¡¡¡¡¡£»½á¹¹³¤¶È

¡¡¡¡HwndOwner¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡DWORD¡¡¡¡¡¡¡¡¡¡¡¡£¿¡¡¡¡¡¡¡¡¡¡£»ËùÊô´°¿Ú

¡¡¡¡HDevMode¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡DWORD¡¡¡¡¡¡¡¡¡¡¡¡£¿¡¡¡¡¡¡¡¡¡¡£»Ö¸ÏòDEVMODE½á¹¹

¡¡¡¡HDevNames¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡DWORD¡¡¡¡¡¡¡¡¡¡¡¡£¿¡¡¡¡¡¡¡¡¡¡£»Ö¸ÏòDEVNAMES½á¹¹

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

¡¡¡¡PtPaperSize¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡POINT¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡£»·µ»ØÖ½Õųߴç

¡¡¡¡RtMinMargin¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡RECT¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡£»·µ»Ø×îСÔÊÐíµÄÒ³±ß¾à

¡¡¡¡RtMargin¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡RECT¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡£»·µ»ØÓû§Ñ¡ÔñµÄÒ³±ß¾à

¡¡¡¡HInstance¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡DWORD¡¡¡¡¡¡¡¡¡¡¡¡£¿

¡¡¡¡LCustData¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡DWORD¡¡¡¡¡¡¡¡¡¡¡¡£¿

¡¡¡¡LpfnPageSetupHook¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡DWORD¡¡¡¡¡¡¡¡¡¡¡¡£¿

¡¡¡¡LpfnPagePaintHook¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡DWORD¡¡¡¡¡¡¡¡¡¡¡¡£¿

¡¡¡¡LpPageSetupTemplateName¡¡¡¡¡¡DWORD¡¡¡¡¡¡¡¡¡¡¡¡£¿

¡¡¡¡HPageSetupTemplate¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡DWORD¡¡¡¡¡¡¡¡¡¡¡¡£¿

PAGESETUPDLGA¡¡ENDS

½á¹¹ÖеÄÓйØ×Ö¶Î˵Ã÷ÈçÏ¡£

¡ñ¡¡¡¡¡¡hDevMode¡ªÈç¹ûÓû§Ñ¡ÔñÁË´òÓ¡»ú£¬ÄÇôÕâÀï·µ»ØÒ»¸öÖ¸Õ룬ָÏò°üº¬DEVMODE½á¹¹µÄÄÚ´æ¿éµØÖ·£¬DEVMODE½á¹¹Öаüº¬ÁË´òÓ¡»úµÄÃû³Æ¡£

¡ñ¡¡¡¡¡¡hDevNames¡ªÈç¹ûÓû§Ñ¡ÔñÁË´òÓ¡»ú£¬ÄÇôÕâÀï·µ»ØÒ»¸öÖ¸Õ룬ָÏò°üº¬DEVNAMES½á¹¹µÄÄÚ´æ¿éµÄµØÖ·£¬DEVNAMES½á¹¹°üº¬ÁË´òÓ¡»úµÄ¸÷ÖÖÊôÐÔ¡£

¡ñ¡¡¡¡¡¡Flags¡ª±êÖ¾£¬¿ÉÒÔÊÇÒÔÏÂÈ¡ÖµµÄ×éºÏ£º

¡ñ¡¡¡¡¡¡PSD_DEFAULTMINMARGINS¡ª½«Ò³±ß¾àÉèÖÃΪ´òÓ¡»úÔÊÐíµÄ×îСҳ±ß¾à¡£

¡ö¡¡¡¡¡¡PSD_DISABLEMARGINS£¬PSD_DISABLEORIENTATIONºÍPSD_DISABLEPAPER¡ª»Ò»¯Ò³±ß¾àÉèÖÃÊäÈë¿ò¡¢Ö½ÕÅ·½ÏòÑ¡Ôñ¿òºÍÖ½ÕÅÑ¡Ôñ¿ò¡£

¡ö¡¡¡¡¡¡PSD_DISABLEPAGEPAINTING¡ª²»»æ»­×îÉÏ·½µÄ´òӡʾÀýͼʾ¡£

¡ö¡¡¡¡¡¡PSD_DISABLEPRINTER¡ª»Ò»¯¡°´òÓ¡»ú¡±°´Å¥¡£

¡ö¡¡¡¡¡¡PSD_MARGINS¡ªº¯ÊýÓÃrtMargin×ֶεÄÖµ³õʼ»¯¶Ô»°¿òÖеÄÊýÖµ¡£

¡ö¡¡¡¡¡¡PSD_RETURNDEFAULT¡ªº¯Êý²»ÏÔʾ¶Ô»°¿ò£¬ÂíÉÏ·µ»Ø²¢ÔÚhDevNamesºÍhDevMode×Ö¶ÎÖзµ»ØĬÈÏ´òÓ¡»úµÄÉèÖÃÇé¿ö¡£

¡ö¡¡¡¡¡¡PSD_INTHOUSANDTHSOFINCHESºÍPSD_INHUNDREDTHSOFMILLIMETERS¡ªÖ¸Ã÷ptPagerSize£¬rtMinMargenÓërtMarginµÈ×Ö¶ÎʹÓõĵ¥Î»ÊÇÓ¢´ç»¹ÊǺÁÃס£

¡ñ¡¡¡¡¡¡ptPaperSize¡ªÒ»¸öPOINT½á¹¹£¬·µ»ØÖ½ÕÅ´óС¡£

¡ñ¡¡¡¡¡¡rtMinMargin¡ª´òÓ¡»úÔÊÐíµÄ×îСҳ±ß¾à¡£

¡ñ¡¡¡¡¡¡rtMargin¡ªÓû§Ñ¡ÔñµÄÒ³±ß¾àÊý¾Ý¡£

µ±Óû§Ñ¡ÔñÁË´òÓ¡»úʱ£¬hDevModeÖзµ»ØµÄÊÇÒ»¸öÖ¸ÏòÄÚ´æ¿éµÄÖ¸Õ룬ËùÒÔÐèÒªÓÃÏÂÃæµÄ´úÂë»ñÈ¡DEVMODE½á¹¹µÄµØÖ·£º

mov¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡eax£»@stPS¡£hDevMode

mov¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡eax£»£§eax£§¡¡¡¡¡¡¡¡£»ÏÖÔÚeaxÊÇDEVMODE½á¹¹µÄµØÖ·

×ܽáͨÓöԻ°¿òµÄʹÓ÷½·¨¿ÉÒÔ·¢ÏÖ£¬Ã¿ÖÖͨÓöԻ°¿òº¯Êý¶¼Ê¹ÓÃÒ»¸öÌض¨µÄ½á¹¹À´µ±×öÊäÈëÊä³öµÄ»º³åÇø£¬³õʼ»¯µÄʱºòº¯Êý¸ù¾Ý½á¹¹ÖеÄÊý¾ÝºÍ±êÖ¾ÉèÖöԻ°¿òÖеÄ×Ó´°¿Ú¿Ø¼þ£¬·µ»ØµÄʱºòÔڽṹµÄÏàӦλÖ÷µ»ØÓû§µÄÊäÈë»òÑ¡Ôñ¡£ÁíÍ⣬ËùÓнṹ¶¼Óм¸¸öÀàËƵÄ×ֶΣ¬ÈçlStructSize×ֶαØÐëÉèÖÃΪÕýÈ·µÄ½á¹¹³¤¶È£»hwndOwnerÖ¸¶¨¶Ô»°¿òµÄ¸¸´°¿Ú£¬Ä£Ì¬¶Ô»°¿òÔڹرÕ֮ǰÊDz»ÔÊÐíÇл»µ½Õâ¸ö¸¸´°¿ÚÖÐÈ¥µÄ¡£



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


µÚ8Õ¡¡Í¨ÓöԻ°¿ò


8¡£3¡¡ä¯ÀÀĿ¼¶Ô»°¿ò£¨1£©

¡¡¡¡¡¡¡¡
8¡£3¡£1¡¡¡¡ä¯ÀÀĿ¼¶Ô»°¿ò¼ò½é

ÔÚÖÚ¶àµÄϵͳÌṩµÄ¶Ô»°¿òÖУ¬»¹ÓÐÒ»¸öºÜ³£ÓõÄä¯ÀÀĿ¼¶Ô»°¿ò£¬¶Ô»°¿òÈçͼ8¡£6Ëùʾ£¬Õâ¸ö¶Ô»°¿òËäȻҲÊÇͨÓÃÐ͵ģ¬µ«ÊÇËüÊÇÓÉShell32¡£dllÌṩµÄ£¬¶ø²»ÊÇÓÉdlg32¡£dllÌṩµÄ£¬ÔÚʵÏֵķ½·¨ÉÏÒ²ºÍÉÏÃæ½éÉܵÄͨÓöԻ°¿òÓкܴóµÄ²»Í¬£¬±¾½ÚÒÔÒ»¸öÀý×ÓÀ´ÑÝʾËüµÄʹÓá£


ͼ8¡£6¡¡¡¡ä¯ÀÀĿ¼¶
·µ»ØĿ¼ ÉÏÒ»Ò³ ÏÂÒ»Ò³ »Øµ½¶¥²¿ ÔÞ£¨0£© ²È£¨0£©
¿ì½Ý²Ù×÷: °´¼üÅÌÉÏ·½Ïò¼ü ¡û »ò ¡ú ¿É¿ìËÙÉÏÏ·­Ò³ °´¼üÅÌÉ쵀 Enter ¼ü¿É»Øµ½±¾ÊéĿ¼ҳ °´¼üÅÌÉÏ·½Ïò¼ü ¡ü ¿É»Øµ½±¾Ò³¶¥²¿!
ÎÂÜ°Ìáʾ£º ο´Ð¡ËµµÄͬʱ·¢±íÆÀÂÛ£¬Ëµ³ö×Ô¼ºµÄ¿´·¨ºÍÆäËüС»ï°éÃÇ·ÖÏíÒ²²»´íŶ£¡·¢±íÊéÆÀ»¹¿ÉÒÔ»ñµÃ»ý·ÖºÍ¾­Ñé½±Àø£¬ÈÏÕæдԭ´´ÊéÆÀ ±»²ÉÄÉΪ¾«ÆÀ¿ÉÒÔ»ñµÃ´óÁ¿½ð±Ò¡¢»ý·ÖºÍ¾­Ñé½±ÀøŶ£¡