亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? edit.txt

?? 這是我做的一個簡單的課程設計 這是一個簡單的文本編輯器,利用調用BOSE的6號 9號等功能 實現簡單的文本編輯
?? TXT
字號:
Edit Controls
-------------------------------------------------------------------------------
By Bill
March 14, 1999


Introduction:
-------------------------------------------------------------------------------
A control is a child window an application uses in with another window to 
perform simple input and output tasks. Controls are most often used within
dialog boxes, but they can also be used in other windows. An edit control is a 
rectangular control window typically used in a dialog box to permit the user 
to enter and edit text from the keyboard. 

This article will show how to easily create a simple text editor by using an 
edit control.  The control itself provides most of the needed functionality,
and only a small amount of actual code is needed.

In order make sure the common controls library is loaded, so that you can use
them, you should call the InitCommonControls function.

An edit control can send notification messages to its parent window in the 
form of WM_COMMAND messages. A parent window can send messages to an edit 
control in a dialog box by calling the SendDlgItemMessage function.


Files and Tools:
-------------------------------------------------------------------------------
Here are some things you will need to use this tutorial....
     MASM (Get the MASM32 package)
     Borlands MAKE (if you wish to use my makefile)
     Borlands BRCC32 (i dont know why, but i still use borland resource compiler)
     Borlands H2ASH (not really necessary... easy way to convert .h to .inc)
     The source code (asm.tsx.org/edit1.zip)
     Win32 API reference
     
          
WinMain
-------------------------------------------------------------------------------
This function is where the execution effectively begins... It initializes the
various window controls, files, and keyboard accelerators.

Keyboard accelerators are basically keyboard shortcuts to menu items.  To use
accelerators, an accelerator table is created as a resource, in the following
basic form:

acceltablename ACCELERATORS
{
	event, idvalue, [type] [options]
	...
}

event		corresponds to the key to be used.  It can be of the form "c", an 
		integer value representing a char, or a virtual-key value.
idvalue		integer which specifies the ID
type		specifies VIRTKEY or ASCII
options		NOINVERT, ALT, SHIFT, CONTROL


WinMain is also the home of the message loop.  Here, the GetMessage function 
grabs the next message from the message queue.  The TranslateAccelerator 
function then checks the message to see if it is an accelerator.  If it is, 
it handles the message.  If not, execution is passed to the TranslateMessage 
and DispatchMessage functions which sends the message to the appropriate
window procedure.

The message loop is broken when GetMessage retrieves the WM_QUIT message.

     
     
InitWindow
-------------------------------------------------------------------------------
This function creates and shows the main application window.

To create a window, first you must register a window class for that window.  
This is done by filling in a WNDCLASSEX structure and passing it to the 
RegisterClassEx function.  Then the CreateWindowEx function is called, using
the newly created window class to create and show the window.


     
InitEditControl
-------------------------------------------------------------------------------
This procedure initializes the Edit control and sizes it to fit inside the main
window.  

All edit controls belong to the window class "EDIT".  This class name is 
specified in the call to CreateWindowEx.  With common controls, you do not
define and register your own class, you use the pre-defined window classes,
defined in the commctrl.dll.
	
The edit window can have a variety of styles.  In addition to the standard 
window styles, the edit control has sever additional styles:
	ES_MULTILINE: control can have more than one line (default is 1 line only)
	ES_AUTOVSCROLL, ES_AUTOHSCROLL: If the text to be displayed exceeds the 
		size of the window, these flags tell the control to automatically 
		scroll the text into view
	ES_LEFT, ES_CENTER, ES_RIGHT: These set the text alignment, and apply only
		to multiline edit controls.
	ES_LOWERCASE, ES_UPPERCASE: Sets the text to all lowercase or uppercase
		characters, respectively.
	ES_OEMCONVERT: Converts the text into a specific character set.
	ES_NUMBER: Limits text input to numbers only.
	ES_NOHIDESEL: Specifies the selected text is not hidden when the control
		loses focus.
	ES_READONLY: Makes the text read-only.
	ES_PASSWORD: Displays all characters as * (or other user defined character)
	ES_WANTRETURN: Specifies that a return is inserted when the enter key is
		pressed, for multiline controls only.
	
	
	
	
InitFile
-------------------------------------------------------------------------------	
In this function, I get the command line arguments, and if a file is specified,
it is loaded into the editor.  If no file is specified, the editor begins with
a new document.

To get the command line arguments, I have created another function called
GetCommandLineArgs.  This uses the GetCommandLine API function to get the 
entire command line.  I then parse the string to get the arguments only.  If
the program is called with no arguments, the command line is returned from
GetCommandLine as a string.  If it has arguments, or is called from a directory
with spaces, the command line is returned as a string with the full exe's 
path in quotes, and with the arguments following.



MainWndProc
-------------------------------------------------------------------------------
This function is the window procedure for the main application window.  This is
specified in the lpfnWndProc member of the WNDCLASSEX struct, which is passed
to the RegisterClassEx function.  This is a callback function, called by
windows and requiring the following form:

MainWndProc proc hWnd:DWORD, uMsg:DWORD, wParam:DWORD, lParam:DWORD 
...
MainWndProc endp

The hWnd parameter specifies the window handle that the message is sent to.
uMsg specifies the message sent.  wParam and lParam have varying meanings, 
depending on which message is being sent.

The window procedure is responsible for handling all of the messages sent to the
application window.  Here, the editing functionality, menu commands, window 
re-sizing and window termination are handled here. 

I only handle the messages which I need for this application.  All other 
messages are passed to the DefWindowProc API function, so they are properly 
dealt with and not lost. 

The WM_DESTROY message should always be handled.  This message is sent when
the application window is closed.  The handler then calls the PostQuitMessage
API function, which is used to terminate the application.  Failure to call 
this will result in the window disappearing but the application remaining in
memory.

The WM_COMMAND message is sent whenever a menu item is chosen, or an accelerator
key is pressed.  The values of lParam and wParam for the WM_COMMAND are:
	wNotifyCode = HIWORD(wParam) : notification code 
	wID         = LOWORD(wParam) : item, control, or accelerator identifier 
	hwndCtl     = lParam         : handle of control which message is from

The WM_COMMAND handler is where all of the interface to the edit control
occurs.  



Edit Control Messages
-------------------------------------------------------------------------------
EM_SETSEL is used to set the selection in the edit control. wParam is the 
starting character position of the selection, and lParam is the ending position.
If wParam = 0 and lParam = -1, all the text is selected.  If wParam = -1, no 
text is selected (or a previous selection is de-selected).

EM_SETMODIFY sets or clears the modified flag of the edit control.  This flag
indicated whether the text has changed. wParam specified the true/false value to
set the modified flag to. This is automatically set when the text is first 
changed. The EM_GETMODIFY message can be used to retrieve the modified flag.

WM_COPY, WM_CUT, WM_PASTE, WM_CLEAR these messages affect the currently 
selected text, and perform their respective actions. For each, the wParam and
lParam parameters are set to 0.

EM_UNDO is used to undo the last edit operation.  A second call to WM_UNDO will
undo the undo...

There are many other edit control messages which you can use (I am just too 
lazy to write about them all...)  For further reading, consult the API 
reference...



EditOpenFile / FileOpen
-------------------------------------------------------------------------------
These functions are used to open a file, and load it into the edit control.

EditOpenFile first calls the GetOpenFileName API function to get the filename
to open.  For this function, you must first fill the OPENFILENAME structure,
which contains the information needed to initialize the Open common dialog box.
The GetOpenFilaName function returns TRUE if a file was selected, FALSE 
otherwise.  The selected file is returned in the lpstrFile member of the
OPENFILENAME structure.

This filename is then passed to the FileOpen function, which actually opens
the file, and puts it into the edit controls text buffer.  It begins by 
opening the file with the CreateFile API, using the OPEN_EXISTING parameter.
Next, the file size is determined, so it is known how many bytes to allocate to
store it.  The memory buffer is allocated using the HeapAlloc API function, and
Read File is used to copy the contents of the file into the newly created 
buffer.  This buffer is then copied to the edit control, by sending it the 
WM_SETTEXT message. This function ends by closing the file, and releasing the
memory buffer.



EditSaveFile / FileSave
-------------------------------------------------------------------------------
These functions are very similar to their open counterparts, the only 
differences being, instead of reading from the file and writing to the edit
control, it is saved to the file and read from the control.



ConfirmOperation
-------------------------------------------------------------------------------
This is a simple utility function which i use to confirm that the user really
wants to do what he says...

The function checks to see if the edit control has been modified, and if so, it
shows a yes/no message box.  This is done by using the MessageBox API with the
MB_YESNO option.  It then returns IDYES if the user chooses yes (or the control 
has not been modified), or IDNO, if the user chooses no.



SetTitle
-------------------------------------------------------------------------------
This is another utility function which sets the application title to show the
filename of the file currently being edited, or Untitled for a new file.

To do this, it sends the WM_SETTEXT message to the main application window, with
the new title as the lParam.



Conclusion
-------------------------------------------------------------------------------
Hmm.. this turned out to be not much of a tutorial on edit controls... as I 
have added a lot of non-edit control related code in an attempt to prevent the
example program from being a completely useless app... Instead it is only a 
mostly useless app...

Of course, for a detailed description of Edit Controls, read the Windows API 
reference.


-------------------------------------------------------------------------------
Copyright (C) 1999 by Bill
billasm@usa.net

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人午夜激情视频| 国产日韩v精品一区二区| 欧美日韩精品一区视频| 久久久99精品久久| 亚洲精品美国一| 欧美精品乱码久久久久久按摩| 欧美性欧美巨大黑白大战| 91精品国产美女浴室洗澡无遮挡| 久久精品一区二区| 日韩电影在线观看网站| 99精品视频在线观看| 欧美一区二区三区婷婷月色| 国产精品免费网站在线观看| 秋霞午夜av一区二区三区| 91丨porny丨国产| 国产蜜臀97一区二区三区| 日本伊人午夜精品| 色综合激情五月| 国产精品久久久久久福利一牛影视| 日韩黄色小视频| 欧美日韩视频在线观看一区二区三区 | 午夜欧美视频在线观看| 国产99一区视频免费| 欧美大黄免费观看| 亚洲成人777| 欧美四级电影在线观看| 亚洲精品第一国产综合野| 国产成人综合在线播放| 精品毛片乱码1区2区3区| 日本视频一区二区三区| 欧美性色综合网| 亚洲国产aⅴ天堂久久| 99re视频这里只有精品| 国产日本一区二区| 国产福利91精品一区| 久久精品人人做人人爽人人| 麻豆91在线观看| 久久夜色精品国产噜噜av| 精品一区二区三区免费播放| 日韩欧美中文字幕公布| 欧美aaaaa成人免费观看视频| 88在线观看91蜜桃国自产| 三级不卡在线观看| 欧美一二三四区在线| 久久电影网电视剧免费观看| 欧美白人最猛性xxxxx69交| 日本欧美一区二区| 欧美va亚洲va香蕉在线| 国产乱子轮精品视频| 国产三级欧美三级日产三级99| 国产美女久久久久| 国产精品理论片| 在线看日韩精品电影| 天天综合网天天综合色| 26uuu亚洲| 成人激情图片网| 亚洲第一狼人社区| 91精品国产综合久久精品麻豆| 三级亚洲高清视频| 久久久久久久久岛国免费| 国产精品一区二区在线看| 国产精品三级电影| 在线观看国产日韩| 极品尤物av久久免费看| 国产精品久久久久婷婷| 欧美在线免费观看视频| 精油按摩中文字幕久久| 国产欧美一区二区三区在线看蜜臀| 国产白丝精品91爽爽久久 | 2024国产精品| 成人黄色软件下载| 一区二区三区久久| 久久这里都是精品| 色天使色偷偷av一区二区| 视频一区二区三区中文字幕| 久久久噜噜噜久噜久久综合| 一本大道久久a久久综合婷婷| 视频一区在线播放| 国产精品久久久一本精品| 欧美日韩视频在线第一区| 国产伦精品一区二区三区免费 | 日韩欧美国产一区二区三区| 国产91丝袜在线播放0| 亚洲电影中文字幕在线观看| 精品少妇一区二区| 在线亚洲+欧美+日本专区| 韩国三级电影一区二区| 亚洲国产aⅴ天堂久久| 欧美国产日韩一二三区| 日韩限制级电影在线观看| 色噜噜久久综合| 国产福利精品一区二区| 日韩电影在线一区二区三区| 国产精品久久久久永久免费观看| 欧美一区二区三区四区视频| 91香蕉视频黄| 成人国产精品免费网站| 蜜桃视频第一区免费观看| 亚洲最大成人综合| 中文字幕制服丝袜一区二区三区| 精品三级av在线| 日韩一区二区三区精品视频| 在线视频中文字幕一区二区| 波多野结衣91| 国产a久久麻豆| 麻豆国产精品官网| 午夜精品一区二区三区三上悠亚| ●精品国产综合乱码久久久久| 精品粉嫩超白一线天av| 欧美一激情一区二区三区| 欧美精品 日韩| 欧美日韩色综合| 在线日韩av片| 在线亚洲高清视频| 色久优优欧美色久优优| 在线视频你懂得一区| 91小视频免费看| 91久久精品日日躁夜夜躁欧美| 99精品视频在线观看| 99国产精品久| 色哟哟欧美精品| 色综合色狠狠综合色| 日本久久电影网| 欧美亚洲国产怡红院影院| 欧洲一区二区三区在线| 欧美精品乱码久久久久久| 这里只有精品99re| 欧美电视剧免费观看| 精品国产一区二区三区久久久蜜月| 欧美大黄免费观看| 国产亚洲一区字幕| 国产精品久久久久久福利一牛影视| 国产精品成人免费精品自在线观看| 亚洲国产精品精华液ab| 亚洲日穴在线视频| 亚洲国产色一区| 免费精品视频最新在线| 国产主播一区二区三区| 风间由美一区二区av101| av一本久道久久综合久久鬼色| 99国内精品久久| 欧美在线啊v一区| 日韩欧美精品在线视频| 国产日韩欧美综合在线| 一区二区三区.www| 日本美女一区二区| 粉嫩aⅴ一区二区三区四区五区| 北条麻妃国产九九精品视频| 欧美在线观看18| 国产亚洲一区字幕| 亚洲一区二区三区四区在线| 美脚の诱脚舐め脚责91| av一本久道久久综合久久鬼色| 欧美老人xxxx18| 国产午夜精品久久| 亚洲国产精品久久艾草纯爱| 六月婷婷色综合| 91老师国产黑色丝袜在线| 8x8x8国产精品| 自拍偷拍国产亚洲| 精品一区二区三区的国产在线播放| 不卡的av中国片| 日韩一区二区精品| 亚洲欧美另类在线| 韩国视频一区二区| 欧美日韩一级片在线观看| 国产日韩欧美综合在线| 三级欧美在线一区| 色老汉一区二区三区| 久久精品人人做人人爽人人| 午夜伊人狠狠久久| 北条麻妃国产九九精品视频| 欧美变态口味重另类| 亚洲午夜精品久久久久久久久| 国产成人三级在线观看| 91精品国产乱码久久蜜臀| 亚洲老妇xxxxxx| 成人看片黄a免费看在线| 777久久久精品| 亚洲韩国精品一区| 9人人澡人人爽人人精品| 精品国产精品网麻豆系列| 日韩精品一级中文字幕精品视频免费观看| 成人avav影音| 国产亚洲午夜高清国产拍精品 | 亚洲三级在线免费观看| 国产酒店精品激情| 日韩精品中文字幕在线不卡尤物| 亚洲一级二级三级在线免费观看| 91在线精品一区二区| 国产日韩一级二级三级| 国产精品夜夜爽| 精品国产乱码久久久久久久久| 久久精品国产999大香线蕉| 538prom精品视频线放| 亚洲国产精品久久人人爱| 欧美视频中文字幕| 五月婷婷综合在线| 欧美日韩高清在线播放| 亚洲777理论|