-
Notifications
You must be signed in to change notification settings - Fork 0
/
AsmPad.inc
130 lines (113 loc) · 3.8 KB
/
AsmPad.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
; #########################################################################
; include files
; ~~~~~~~~~~~~~
include \MASM32\INCLUDE\windows.inc
include \MASM32\INCLUDE\masm32.inc
include \MASM32\INCLUDE\gdi32.inc
include \MASM32\INCLUDE\user32.inc
include \MASM32\INCLUDE\kernel32.inc
include \MASM32\INCLUDE\Comctl32.inc
include \MASM32\INCLUDE\comdlg32.inc
include \MASM32\INCLUDE\shell32.inc
include \masm32\include\shlwapi.inc
include \MASM32\include\oleaut32.inc
; libraries
; ~~~~~~~~~
includelib \MASM32\LIB\masm32.lib
includelib \MASM32\LIB\gdi32.lib
includelib \MASM32\LIB\user32.lib
includelib \MASM32\LIB\kernel32.lib
includelib \MASM32\LIB\Comctl32.lib
includelib \MASM32\LIB\comdlg32.lib
includelib \MASM32\LIB\shell32.lib
includelib \masm32\lib\shlwapi.lib
includelib \MASM32\LIB\oleaut32.lib
; #########################################################################
;=================
; Local prototypes
;=================
WinMain PROTO :DWORD,:DWORD,:DWORD,:DWORD
WndProc PROTO :DWORD,:DWORD,:DWORD,:DWORD
TopXY PROTO :DWORD,:DWORD
FillBuffer PROTO :DWORD,:DWORD,:BYTE
Paint_Proc PROTO :DWORD,:DWORD
EditControl PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD
hEditProc PROTO :DWORD,:DWORD,:DWORD,:DWORD
Select_All PROTO :DWORD
TextFind PROTO :DWORD,:DWORD
SearchProc PROTO :DWORD,:DWORD,:DWORD,:DWORD
CallSearchDlg PROTO
StreamFileOut PROTO :DWORD,:DWORD
StreamFileIn PROTO :DWORD,:DWORD
ofCallBack PROTO :DWORD,:DWORD,:DWORD,:DWORD
sfCallBack PROTO :DWORD,:DWORD,:DWORD,:DWORD
Confirmation PROTO :DWORD
MergeFile PROTO :DWORD
;=============
; Local macros
;=============
szText MACRO Name, Text:VARARG
LOCAL lbl
jmp lbl
Name db Text,0
lbl:
ENDM
m2m MACRO M1, M2
push M2
pop M1
ENDM
return MACRO arg
mov eax, arg
ret
ENDM
stralloc MACRO ln
invoke SysAllocStringByteLen,0,ln
ENDM
strfree MACRO strhandle
invoke SysFreeString,strhandle
ENDM
.data
szDisplayName db "AsmPad",0
Untitled db "Untitled",0
TaskFile db "task.bat",0
; ------------------------------------
; string data for status bar messages
; used in WM_NOTIFY message.
; ------------------------------------
tbn_new db "New File",0
tbn_open db "Open File",0
tbn_save db "Save File",0
tbn_cut db "Edit Cut",0
tbn_copy db "Edit Copy",0
tbn_paste db "Edit Paste",0
tbn_undo db "Edit Undo",0
tbn_redo db "Edit Redo",0
tbn_find db "Find Text",0
tbn_instance db "New Instance",0
tbn_run db "Run File",0
tbn_quit db "Close Editor",0
tbn_else db 0
.data?
CommandLine dd ?
hWnd dd ?
hInstance dd ?
hIcon dd ?
hRichEd dd ?
lpfnhEditProc dd ?
hToolTips dd ?
hCheck1 dd ?
hCheck2 dd ?
TextLen dd ?
CaseFlag dd ?
WholeWord dd ?
CtrlFlag dd ?
hMnu dd ?
SearchText db 128 dup(?)
; ########################### Inserted modules ############################
include toolbar.asm
include statusbr.asm
include filedlgs.asm
include fileio.asm
include search.asm
include misc.asm
; #########################################################################