91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 20KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2021-05-13
  • 語言: C/C++
  • 標簽: c++??記事本??源碼??

資源簡介

c++ 記事本 源碼,基本的功能都已經實現,但還有部分為實現,比如字體設置、打印設置等

資源截圖

代碼片段和文件信息

#include?
#include?
#include?

#include?“idx.h“
#include?“resource.h“
using?namespace?std;


/*
*??歡迎各位C++愛好者前來交流
*?????????????????????????????????????????????????????????????QQ:707039333
*
*
*
*??本代碼是本人練習API編程的第一個成品程序,其間在網上找來很久,均未發現有效的記事本代碼
*??于是乎就自己寫了
*?//////////////////////////////////////////////
*??
*??程序基本實現了記事本的大部分功能,但其中部分還存在設計的不合理
*??歡迎各位朋友指正。
*??程序共花費本人2天時間,由于時間關系,還沒有進行優化,請見諒!
*/

int?FindFile(LPSTR?sTextBOOL?down)
{
int?start=0;
int?now?=?SendMessage(hwndEditEM_GETSEL00);
int?now2=LOWORD(now)now3=HIWORD(now);
//low?start?now2
//hi??end?now3

//get?text?in?edit?control
HANDLE?memory=(HANDLE)SendMessage(hwndEditEM_GETHANDLE00);
LPSTR?tagtext=(char?*)LocalLock(memory);

if(down)
{
string?s(tagtextnow3strlen(tagtext));
start?=?s.find(sText);
now2=now3+start;
now3=now3+start+strlen(sText);
}//end?down?if
else
{
string?s(tagtext0now2);
start?=?s.rfind(sText);
now2=start;
now3=strlen(sText)+start;
}//end?down?else
if(start==-1)return?-1;
SendMessage(hwndEditEM_SETSELnow2now3);
return?0;
}//end?findfile


LRESULT?CALLBACK?WindowProc(
HWND?hwnd
UINT?uMsg
WPARAM?wParam
LPARAM?lParam

{
static?FINDREPLACE?fr;
static?FINDREPLACE?fr2;
static?CHAR?szFindWhat[80];
static?CHAR?szFindWhat2[80];
static?CHAR?szFindWhat3[80];


static?LPSTR?sTextFsTextRsTextR2;
static?BOOL?downFdownR;



if(uMsg==uFindReplaceMsg)
{
LPFINDREPLACE?lpfr;
lpfr?=?(LPFINDREPLACE)lParam;
if?(lpfr->Flags?&?FR_DIALOGTERM)
{?
hdlg?=?NULL;?
return?0;?
}?//end?close

if(lpfr->Flags?&?FR_FINDNEXT)
{

sTextF=lpfr->lpstrFindWhat;
if(lpfr->wReplaceWithLen)downF=(BOOL)true;
else
downF=(BOOL)?(lpfr->Flags?&?FR_DOWN);
//matchcase=(BOOL)?(lpfr->Flags?&?FR_MATCHCASE);

if(FindFile(sTextFdownF)==-1)
{MessageBox(0“can‘t?find?where““Error:“MB_OK);
return?0;
}
SetFocus(hwndEdit);?
return?0;
}//end?find?next

if(lpfr->Flags?&?FR_REPLACE)
{
sTextR=lpfr->lpstrFindWhat;
sTextR2=lpfr->lpstrReplaceWith;
downR=(BOOL)?(lpfr->Flags?&?FR_DOWN);
if(FindFile(sTextFdownF)==-1)
{MessageBox(0“can‘t?find?where““Error:“MB_OK);
return?0;
}
SetFocus(hwndEdit);
SendMessage(hwndEditEM_REPLACESEL(BOOL)true(LPARAM)sTextR2);
return?0;
}//end?repalce

if(lpfr->Flags?&?FR_REPLACEALL)
{
sTextR=lpfr->lpstrFindWhat;
sTextR2=lpfr->lpstrReplaceWith;
downR=(BOOL)?(lpfr->Flags?&?FR_DOWN);
SendMessage(hwndEditEM_SETSEL11);

while(FindFile(sTextRdownR)?!=?-1)
SendMessage(hwndEditEM_REPLACESEL(BOOL)true(LPARAM)sTextR2);

return?0;
}//end?replace?all


return?0;
}//end?replace?msg

int?TText?=?SendMessage(hwndEditEM_GETSEL00);
static?HMENU?hmenu=GetMenu(hwnd);
if(HIWORD(TText)==LOWORD(TText))//not?sel

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件??????48640??2012-09-01?11:27??edit\edit.opt

?????文件????????219??2012-09-01?11:18??edit\idx.h

?????文件???????4077??2012-09-01?11:06??edit\edit.dsp

?????文件??????10844??2012-09-01?11:26??edit\main.cpp

?????文件????????533??2012-08-18?16:50??edit\edit.dsw

?????文件???????1271??2012-09-01?11:19??edit\edit.plg

?????文件??????50176??2012-09-01?11:27??edit\edit.ncb

?????文件???????3212??2012-08-19?17:26??edit\xy.rc

?????文件???????1391??2012-08-19?17:26??edit\resource.h

?????文件??????32332??2012-08-19?17:26??edit\xy.aps

?????目錄??????????0??2012-08-18?16:50??edit

-----------?---------??----------?-----??----

???????????????152695????????????????????11


評論

共有 條評論