Rev | Line | |
---|
[561] | 1 | /*!
|
---|
| 2 | @file
|
---|
| 3 | @brief 「Win32プログラミング講座 ~ Step11. テキスト エディタを作る ~」のAB5移植版
|
---|
| 4 | http://www.activebasic.com/help_center/articles/win32/step05/
|
---|
| 5 | まだメニューバーがないんでそれっぽくありません。
|
---|
| 6 |
|
---|
| 7 | @date 2008/07/20
|
---|
| 8 | @auther Egtra
|
---|
| 9 | */
|
---|
| 10 |
|
---|
| 11 | #require <Classes/ActiveBasic/Windows/UI/Application.ab>
|
---|
| 12 | #require <Classes/ActiveBasic/Windows/UI/Form.ab>
|
---|
| 13 | #require <Classes/ActiveBasic/Windows/UI/EditBox.ab>
|
---|
| 14 |
|
---|
| 15 | #resource "UI_Sample.rc"
|
---|
| 16 |
|
---|
| 17 | Imports ActiveBasic.Windows.UI
|
---|
| 18 |
|
---|
| 19 | Class MyForm
|
---|
| 20 | Inherits Form
|
---|
| 21 | Public
|
---|
| 22 | Sub MyForm()
|
---|
| 23 | AddResize(AddressOf(OnResize))
|
---|
| 24 | Create()
|
---|
| 25 | myEdit = New EditBox
|
---|
| 26 | myEdit.Create(This, ES_MULTILINE Or ES_WANTRETURN Or ES_AUTOHSCROLL Or ES_AUTOVSCROLL Or WS_HSCROLL Or WS_VSCROLL, WS_EX_CLIENTEDGE)
|
---|
| 27 | myEdit.SendMessage(WM_SETFONT, GetStockObject(DEFAULT_GUI_FONT) As WPARAM, 0)
|
---|
| 28 | Show(SW_SHOWDEFAULT)
|
---|
| 29 | End Sub
|
---|
| 30 |
|
---|
| 31 | Sub OnResize(sender As Object, e As ResizeArgs)
|
---|
| 32 | myEdit.Move(0, 0, e.X, e.Y)
|
---|
| 33 | End Sub
|
---|
| 34 | Private
|
---|
| 35 | myEdit As EditBox
|
---|
| 36 | End Class
|
---|
| 37 |
|
---|
| 38 | Control.Initialize(GetModuleHandle(0))
|
---|
| 39 |
|
---|
| 40 | Application.Run(New MyForm)
|
---|
Note:
See
TracBrowser
for help on using the repository browser.