Programming °æ (¾«»ªÇø)
·¢ÐÅÈË: SwordLea (·Éµ¶Àî), ÐÅÇø: Programming
±ê Ìâ: [ºÏ¼¯] [³ÌÐò´óÕ½]20040720
·¢ÐÅÕ¾: ¹þ¹¤´ó×϶¡Ïã (Mon Aug 23 11:19:13 2004), Õ¾ÄÚ
©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤
SwordLea (·Éµ¶Àî) ÓÚ (Tue Jul 20 10:17:15 2004) ˵µÀ:
³ÌÐòÄ¿±ê£º
ÔÚÖ¸¶¨ÈÎÒⳤ¶È¶þ½øÖÆÎļþÖУ¬²éÕÒÖ¸¶¨×îС³¤¶È(×î´ó³¤¶È128)µÄÁ¬Ðø¿ÉÏÔʾ×Ö·û
¡ª¡ª¼´>=32 && <= 126£¬²¢½«Æä×é֯Ϊ×Ö·û´®£¬ÐèÒª¼Ç¼¸÷×Ö·û´®ÐÅÏ¢ÈçÏ£º
DWORD dwID; // ¸Ã×Ö·û´®³öÏÖÐòºÅ(ÓÉ0¿ªÊ¼)
DWORD dwOffset; // ÔÚÎļþÖÐÆ«ÒÆ
short nLength; // ¸Ã×Ö·û´®³¤¶È
char* lpString; // ¸Ã×Ö·û´®ÄÚÈÝ
½«×îÖÕ½á¹ûÊä³öµ½CRichEditCtrl¿Ø¼þÖУ¬¸ñʽÈçÏ£º
%u: Offset:%u Length:%d\t%s
dwID dwOffset nLength lpString
¼Æʱ·½·¨£º
ÒÔÏÂÌṩÁ½¸ö¼ÆʱÆ÷À࣬¶¼¿ÉÒÔ´ïµ½10ºÁÃ뼶¾«È·¶È£¬½¨ÒéʹÓÃCLocalCalculagraph£¬
¸ÃÀà¿ÉÒÔ±ÜÃâ½ø³ÌÇл»µ¼Ö¼ÆʱÎó²î¡£
// ϵͳ¼ÆʱÆ÷
class CSystemCalculagraph
{
public:
void Start()
{
dwStart = GetTickCount();
}
void Stop()
{
dwEnd = GetTickCount();
}
DWORD GetElapsedTime()
{
return dwEnd - dwStart + 1; // ·ÀÖ¹½á¹ûΪÁã
}
private:
DWORD dwStart, dwEnd;
};
// ½ø³Ì¼ÆʱÆ÷
class CLocalCalculagraph
{
public:
void Start()
{
start = clock();
}
void Stop()
{
end = clock();
}
DWORD GetElapsedTime()
{
return end - start + 1; // ·ÀÖ¹½á¹ûΪÁã
}
private:
clock_t start, end;
};
ʾ Àý£º
CRichEditCtrl *pRiched = &m_ctrlRichEd;
CLocalCalculagraph cc;
CFile f;
if (!f.Open("MinGWStudioFullSetupPlus-2.02.exe",CFile::modeRead)) return;
DWORD dwSize = f.GetLength();
LPBYTE pBuffer = new BYTE[dwSize + 1];
f.Read(pBuffer ,dwSize );
f.Close();
CString sFilterResult;
cc.Start();
StrFilter(pBuffer , 5, sFilterResult);
~~~~~~~~~ Õâ¸öº¯ÊýÊÇÐèҪʵÏֵģ¬¸Ã¸ñʽ½öΪʾÀý£¡
pRiched->SetWindowText(sFilterResult);
cc.Stop();
delete pBuffer ;
// ÒÔÏÂÊÇÓÃÓÚÆÀ²âµÄ½á¹û
printf("Used time:%lu\n", cc.GetElapsedTime());
²âÊÔÊý¾Ý£º
¶þ½øÖÆÎļþ: MinGWStudioFullSetupPlus-2.02.exe 62073445 ×Ö½Ú, Nov__7__2003
ÏÂÔØλÖãº202.118.239.46/Incoming/Other/BTC/tools/
×îС³¤¶È : 5
ÆäËü˵Ã÷£º
¼Æʱ´Ó×Ö·û´®¹ýÂË¿ªÊ¼£¬µ½½á¹ûÊä³öΪֹ£¬²»°üÀ¨Îļþ¶Áȡʱ¼ä£¬Ò²²»°üÀ¨Ïò
***** *******
RichEditCtrl¿Ø¼þÊä³öʱ¼ä¡£
ÇëͬѧÃÇ×ۺϿ¼ÂǸ÷·½ÃæÒòËØ£¬¿ªÍØ˼·£¬Ò»ÊÔÉíÊÖ¡£
©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤
iamxiaohan (ä캮¡¤System Programmer) ÓÚ (Tue Jul 20 16:27:23 2004) ˵µÀ:
ÒÔÇ°×ö¹ýÒ»¸öÀàËƵģ¬ÊÇÓÃÀ´ÍæÆƽâµÄ~~~:P
Ò»°ãµÄ¸öÈ˹²ÏíÈí¼þÓÐʱºò»áÓÐͨÓÃÃÜÂ룬ÕâЩÃÜÂëÊÇ×÷Ϊ×Ö·û´®´æÔÚexeÖ®ÖÐ
ÓÃÕâ¸öÈí¼þ´ò¿ªexeÎļþ£¬¾Í¿ÉÒԵõ½ÁË~~ hoho~~
¡¾ ÔÚ SwordLea (·Éµ¶Àî) µÄ´ó×÷ÖÐÌáµ½: ¡¿
: ³ÌÐòÄ¿±ê£º
: ÔÚÖ¸¶¨ÈÎÒⳤ¶È¶þ½øÖÆÎļþÖУ¬²éÕÒÖ¸¶¨×îС³¤¶È(×î´ó³¤¶È128)µÄÁ¬Ðø¿ÉÏÔʾ×Ö·û
: ¡ª¡ª¼´>=32 && <= 126£¬²¢½«Æä×é֯Ϊ×Ö·û´®£¬ÐèÒª¼Ç¼¸÷×Ö·û´®ÐÅÏ¢ÈçÏ£º
: ...................
©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤
SwordLea (·Éµ¶Àî) ÓÚ (Tue Jul 20 17:55:31 2004) ˵µÀ:
ºÃѽ£¬Õâ´Î¾ÍÄÃÀ´±ÈÒ»±ÈЧÂÊ°É¡£
²»ÒªÐ¡¿´Õâ¸ö³ÌÐòÓ´£¬ÎÒÃÇ¿ÉÒÔ°ÑËüÀí½âΪÁíÒ»ÖÖÐÎʽµÄµ¥Ä£Æ¥Å䣬
ÒÔÇ°ÌÖÂÛ¹ýµÄ¶ÔЧÂÊÓÅ»¯µÄ¹¦Á¦¿ÉÒÔ¾¡ÇéÕÃÏÔÁË¡£
¡¾ ÔÚ iamxiaohan (ä캮¡¤System Programmer) µÄ´ó×÷ÖÐÌáµ½: ¡¿
: ÒÔÇ°×ö¹ýÒ»¸öÀàËƵģ¬ÊÇÓÃÀ´ÍæÆƽâµÄ~~~:P
: Ò»°ãµÄ¸öÈ˹²ÏíÈí¼þÓÐʱºò»áÓÐͨÓÃÃÜÂ룬ÕâЩÃÜÂëÊÇ×÷Ϊ×Ö·û´®´æÔÚexeÖ®ÖÐ
: ÓÃÕâ¸öÈí¼þ´ò¿ªexeÎļþ£¬¾Í¿ÉÒԵõ½ÁË~~ hoho~~
: ...................
©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤
iamxiaohan (ä캮¡¤System Programmer) ÓÚ (Tue Jul 20 18:07:20 2004) ˵µÀ:
Ϊʲô¼ÆʱҪ°üÀ¨Êä³öʱ¼ä£¿
¡¾ ÔÚ SwordLea (·Éµ¶Àî) µÄ´ó×÷ÖÐÌáµ½: ¡¿
: ³ÌÐòÄ¿±ê£º
: ÔÚÖ¸¶¨ÈÎÒⳤ¶È¶þ½øÖÆÎļþÖУ¬²éÕÒÖ¸¶¨×îС³¤¶È(×î´ó³¤¶È128)µÄÁ¬Ðø¿ÉÏÔʾ×Ö·û
: ¡ª¡ª¼´>=32 && <= 126£¬²¢½«Æä×é֯Ϊ×Ö·û´®£¬ÐèÒª¼Ç¼¸÷×Ö·û´®ÐÅÏ¢ÈçÏ£º
: ...................
©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤
Kernel (Kermit) ÓÚ (Wed Jul 21 00:08:41 2004) ˵µÀ:
ÖÐÎÄ×Ö·ûÔõô´¦Àí£¿
¡¾ ÔÚ SwordLea (·Éµ¶Àî) µÄ´ó×÷ÖÐÌáµ½: ¡¿
: ³ÌÐòÄ¿±ê£º
: ÔÚÖ¸¶¨ÈÎÒⳤ¶È¶þ½øÖÆÎļþÖУ¬²éÕÒÖ¸¶¨×îС³¤¶È(×î´ó³¤¶È128)µÄÁ¬Ðø¿ÉÏÔʾ×..
: ¡ª¡ª¼´>=32 && <= 126£¬²¢½«Æä×é֯Ϊ×Ö·û´®£¬ÐèÒª¼Ç¼¸÷×Ö·û´®ÐÅÏ¢ÈçÏ£º
: DWORD dwID; // ¸Ã×Ö·û´®³öÏÖÐòºÅ(ÓÉ0¿ªÊ¼)
: DWORD dwOffset; // ÔÚÎļþÖÐÆ«ÒÆ
: short nLength; // ¸Ã×Ö·û´®³¤¶È
: char* lpString; // ¸Ã×Ö·û´®ÄÚÈÝ
: ½«×îÖÕ½á¹ûÊä³öµ½CRichEditCtrl¿Ø¼þÖУ¬¸ñʽÈçÏ£º
: ...................
©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤
SwordLea (·Éµ¶Àî) ÓÚ (Wed Jul 21 09:05:45 2004) ˵µÀ:
¹þ¹þ£¬Ã»Óп¼ÂǹýÕâÒ»µã£¬¶à¿÷ÄãµÄÌáÐÑ£¬
Ë÷ÐÔÔݲ»¹ÜÖÐÎÄ×Ö´ð°É£¬»¹ÊÇÒªÇó0x20-0x7EÖ®¼ä¡£:)
¡¾ ÔÚ Kernel (Kermit) µÄ´ó×÷ÖÐÌáµ½: ¡¿
: ÖÐÎÄ×Ö·ûÔõô´¦Àí£¿
©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤
SwordLea (·Éµ¶Àî) ÓÚ (Wed Jul 21 09:07:17 2004) ˵µÀ:
àÅ£¬ÕâÒ»µãȷʵÓе㲻̫¹«Æ½£¬ËäÈ»¶Ô±ê»´¿Ø¼þµÄ
ʹÓÿÉÒÔÌåÏÖ¼¼ÇÉ£¬µ«²»Í¬µÄÓ²¼þÅäÖÿÉÄܵ¼ÖÂ
Êä³öµÄʱ¼ä²îÒì½Ï´ó£¬ÄǺðɣ¬ÎÒ¸ÄÒ»ÏÂÆÀ²âÒªÇó¡£
¡¾ ÔÚ iamxiaohan (ä캮¡¤System Programmer) µÄ´ó×÷ÖÐÌáµ½: ¡¿
: Ϊʲô¼ÆʱҪ°üÀ¨Êä³öʱ¼ä£¿
©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤
fingsterfcs (ÌìÄ»·±ÐÇ) ÓÚ (Wed Jul 21 10:28:12 2004) ˵µÀ:
ËÄܸøÒ»¸öʹÓÃCRichEditCtrl¿Ø¼þµÄÀý×Ó£¿
Õâ¸ö¶«Î÷·Åµ½¶Ô»°¿òÀ±àÒëÍê³ÉÒԺ󣬶Ի°¿ò¾ÍÏÔʾ²»³öÀ´ÁË¡£
©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤
SwordLea (·Éµ¶Àî) ÓÚ (Wed Jul 21 10:38:13 2004) ˵µÀ:
Important If you are using a rich edit control in a dialog box (regardless whether your application is SDI, MDI, or dialog-based), you must call
AfxInitRichEdit( );
once before the dialog box is displayed.
¡¾ ÔÚ fingsterfcs (ÌìÄ»·±ÐÇ) µÄ´ó×÷ÖÐÌáµ½: ¡¿
: ËÄܸøÒ»¸öʹÓÃCRichEditCtrl¿Ø¼þµÄÀý×Ó£¿
: Õâ¸ö¶«Î÷·Åµ½¶Ô»°¿òÀ±àÒëÍê³ÉÒԺ󣬶Ի°¿ò¾ÍÏÔʾ²»³öÀ´ÁË¡£
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
Ò³ÃæÖ´ÐÐʱ¼ä£º3.866ºÁÃë