Win32 App
MDI
MDI Window
-
stripped from WinAsm Studio
by cao_cong
[*BEGINPRO*]
[*BEGINDEF*]
[MakeDef]
Menu=1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0
1=4,O,$B\RC.EXE /v,1
2=3,O,$B\ML.EXE /c /coff /Cp /nologo /I"$I",2
3=5,O,$B\LINK.EXE /SUBSYSTEM:WINDOWS /RELEASE /VERSION:4.0 /LIBPATH:"$L" /OUT:"$5",3,4
4=0,0,,5
5=rsrc.obj,O,$B\CVTRES.EXE,rsrc.res
6=*.obj,O,$B\ML.EXE /c /coff /Cp /nologo /I"$I",*.asm
7=0,0,"$E\OllyDbg",5
[MakeFiles]
0=MDI.rap
1=MDI.rc
2=MDI.asm
3=MDI.obj
4=MDI.res
5=MDI.exe
6=MDI.def
7=MDI.dll
8=MDI.txt
9=MDI.lib
10=MDI.mak
11=MDI.hla
12=MDI.com
13=MDI.ocx
14=MDI.idl
15=MDI.tlb
[Resource]
[StringTable]
[Accel]
[VerInf]
[*ENDDEF*]
[*BEGINTXT*]
MDI.Asm
.386

.MODEL FLAT,STDCALL

OPTION CASEMAP:NONE

Include MDI.inc
Include Misc.asm

.CODE

Start:
	;Invoke LoadLibrary, ADDR szLibName
	;MOV hLib,EAX
	Invoke GetModuleHandle, NULL
	MOV hInstance,EAX
	Invoke InitCommonControls
	Invoke WinMain, hInstance, NULL, NULL, SW_SHOWDEFAULT
    ;Invoke FreeLibrary, hLib
	Invoke ExitProcess, EAX
		
WinMain Proc hInst:HINSTANCE,hPrevInst:HINSTANCE,cmdLine:LPSTR,cmdShow:DWORD
Local wc:WNDCLASSEX
Local msg:MSG
	
	MOV wc.cbSize,SIZEOF WNDCLASSEX
	MOV wc.style,CS_HREDRAW OR CS_VREDRAW
	MOV wc.lpfnWndProc,OFFSET WndProc
	MOV wc.cbClsExtra,NULL
	MOV wc.cbWndExtra,NULL
	PUSH hInst
	POP wc.hInstance
	MOV wc.hbrBackground,COLOR_APPWORKSPACE+1
	MOV wc.lpszMenuName,IDR_MAINMENU
	MOV wc.lpszClassName,OFFSET szClassName
	Invoke LoadIcon, NULL, IDI_APPLICATION
	MOV wc.hIcon,EAX
	MOV wc.hIconSm,EAX
	Invoke LoadCursor, NULL, IDC_ARROW
	MOV wc.hCursor,EAX
	Invoke RegisterClassEx, ADDR wc
	
	MOV wc.lpfnWndProc,OFFSET ChildProc
	MOV wc.hbrBackground,COLOR_BTNFACE+1
	MOV wc.lpszClassName,OFFSET szChildClass
	MOV wc.cbWndExtra,4
	MOV wc.lpszMenuName,IDR_CHILDMENU
	Invoke RegisterClassEx, ADDR wc
	Invoke CreateWindowEx, NULL,ADDR szClassName, ADDR szAppName, WS_OVERLAPPEDWINDOW OR \
		WS_CLIPCHILDREN, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, \
		NULL, 0, hInst,NULL
	MOV hWndMain,EAX
	Invoke LoadMenu, hInst, IDR_CHILDMENU
	MOV hChildMenu,EAX
	Invoke ShowWindow, hWndMain, SW_MAXIMIZE
	Invoke UpdateWindow, hWndMain
	.While TRUE
		Invoke GetMessage, ADDR msg, NULL, 0, 0
	  	.Break .If !EAX
		Invoke TranslateMDISysAccel, hClient, ADDR msg
		.If !EAX
			Invoke TranslateMessage, ADDR msg
			Invoke DispatchMessage, ADDR msg
		.EndIf
	.Endw
	Invoke DestroyMenu, hChildMenu
	MOV	EAX,msg.wParam
	RET
WinMain EndP
WndProc Proc hWnd:DWORD,uMsg:DWORD,wParam:DWORD,lParam:DWORD
Local clientStrc	:CLIENTCREATESTRUCT
Local rcClFrame		:RECT
Local rcTlbar		:RECT
Local rcStatus		:RECT
Local ptTlbar		:POINT
Local ptStatus		:POINT

	.If uMsg==WM_CREATE
		Invoke GetMenu,hWnd
		MOV hMainMenu,EAX
		Invoke GetSubMenu,hMainMenu,4
		MOV clientStrc.hWindowMenu,EAX
		MOV clientStrc.idFirstChild,401
		Invoke CreateWindowEx, WS_EX_CLIENTEDGE, ADDR szClientName, NULL, WS_CHILD OR \
			WS_VISIBLE OR WS_CLIPCHILDREN, CW_USEDEFAULT, CW_USEDEFAULT, \
			CW_USEDEFAULT, CW_USEDEFAULT, hWnd, NULL, hInstance, ADDR clientStrc
		MOV hClient,EAX
		
		MOV mdiCreate.szClass, offset szChildClass
		MOV mdiCreate.szTitle, offset szChildTitle
		PUSH hInstance
		POP mdiCreate.hOwner
		;MOV mdiCreate.style,MDIS_ALLCHILDSTYLES
		MOV mdiCreate.x,CW_USEDEFAULT
		MOV mdiCreate.y,CW_USEDEFAULT
		MOV mdiCreate.lx,CW_USEDEFAULT
		MOV mdiCreate.ly,CW_USEDEFAULT
		Invoke CreateToolbarEx, hWnd, WS_CHILD OR WS_CLIPCHILDREN OR WS_CLIPSIBLINGS OR \
			TBSTYLE_TOOLTIPS OR CCS_TOP, ID_TOOLBAR, 1, hInstance, IDB_TOOLBAR, \
			ADDR tbb, 21, 16, 16, 16, 16, SizeOf TBBUTTON
		MOV hToolbar,EAX
    	Invoke SendMessage, hToolbar, TB_SETSTYLE, 0, TBSTYLE_FLAT OR CCS_TOP
    	Invoke ShowWindow, hToolbar, TRUE
		Invoke CreateStatus, hWnd
	.ElseIf uMsg==WM_COMMAND
		MOV EAX,wParam
		.If AX==IDM_FILE_EXIT
			Invoke SendMessage, hWnd, WM_CLOSE, 0, 0
		.ElseIf AX==IDM_WIN_TILEHORZ
			Invoke SendMessage, hClient, WM_MDITILE, MDITILE_HORIZONTAL, 0 
		.ElseIf AX==IDM_WIN_TILEVERT
			Invoke SendMessage, hClient, WM_MDITILE, MDITILE_VERTICAL, 0
		.ElseIf AX==IDM_WIN_CASCADE
			Invoke SendMessage, hClient, WM_MDICASCADE, MDITILE_SKIPDISABLED, 0
		.ElseIf AX==IDM_FILE_NEW
			Invoke SendMessage, hClient, WM_MDICREATE, 0, ADDR mdiCreate 
		.ElseIf AX==IDM_FILE_CLOSE
			Invoke SendMessage, hClient, WM_MDIGETACTIVE, 0, 0
			MOV EDX,EAX
			Invoke SendMessage, EDX, WM_CLOSE, 0, 0
		.Else
			Invoke DefFrameProc, hWnd, hClient, uMsg, wParam, lParam	
			RET
		.EndIf
	.ElseIf uMsg==WM_SIZE
		.If hClient!=NULL
			Invoke GetClientRect, hWnd, ADDR rcClFrame
			Invoke SendMessage, hToolbar, TB_AUTOSIZE, 0, 0
			Invoke MoveWindow, hStatus, 0, 0, 0, 0, TRUE
			Invoke GetWindowRect, hToolbar, ADDR rcTlbar
			Invoke GetWindowRect, hStatus, ADDR rcStatus
			MOV ptStatus.x,0
			MOV ptTlbar.x,0
			PUSH rcStatus.top
			POP ptStatus.y
			Invoke ScreenToClient, hWnd, ADDR ptStatus
			PUSH rcTlbar.bottom
			POP ptTlbar.y
			Invoke ScreenToClient, hWnd, ADDR ptTlbar
			MOV EAX,ptStatus.y
			SUB EAX,ptTlbar.y             ;EAX=MDIClient height
			MOV EDX,EAX
			Invoke MoveWindow, hClient, 0, ptTlbar.y, rcClFrame.right, EDX, TRUE
		.EndIf
	
	.ElseIf uMsg==WM_DESTROY
		Invoke PostQuitMessage,NULL		
	.Else
		Invoke DefFrameProc, hWnd, hClient, uMsg, wParam, lParam		
		RET
	.EndIf
	XOR EAX,EAX
	RET
WndProc EndP
ChildProc Proc hChild:DWORD,uMsg:DWORD,wParam:DWORD,lParam:DWORD
Local nWidth	:DWORD
Local nHeight	:DWORD

	.If uMsg==WM_MDIACTIVATE
		MOV EAX,lParam
		.If EAX==hChild
			Invoke GetSubMenu,hChildMenu,3
			MOV EDX,EAX
			Invoke SendMessage,hClient,WM_MDISETMENU,hChildMenu,EDX
		.Else
			Invoke GetSubMenu,hMainMenu,3   
			MOV EDX,EAX 
			Invoke SendMessage,hClient,WM_MDISETMENU,hMainMenu,EDX 
		.EndIf
		Invoke DrawMenuBar,hWndMain 
;------------------------------------------------------------------------------		
	.ElseIf uMsg==WM_CREATE
;------------------------------------------------------------------------------
	.ElseIf uMsg==WM_SIZE
		LOWORD lParam
		MOV nWidth,EAX
		HIWORD lParam
		MOV nHeight,EAX
		
		;Move any children windows of the MDI Child here
		;Using GetWindowLong ?
		;-----------------------------------------------

		Invoke DefMDIChildProc,hChild,uMsg,wParam,lParam    
		RET 
;------------------------------------------------------------------------------
	.ElseIf uMsg==WM_CLOSE
			Invoke SendMessage,hClient,WM_MDIDESTROY,hChild,0 
;------------------------------------------------------------------------------	
	.ElseIf uMsg==WM_DESTROY
;------------------------------------------------------------------------------	
	.Else 	
		Invoke DefMDIChildProc,hChild,uMsg,wParam,lParam    
		RET 
	.EndIf
	XOR EAX,EAX
	RET
ChildProc EndP

End Start
[*ENDTXT*]
[*BEGINTXT*]
MDI.Inc
include windows.inc
;include masm32.inc
include user32.inc
include kernel32.inc
include gdi32.inc
include shell32.inc
include comctl32.inc
include comdlg32.inc
;include debug.inc	

;includelib masm32.lib
includelib user32.lib
includelib kernel32.lib
includelib gdi32.lib
includelib shell32.lib
includelib comctl32.lib
includelib comdlg32.lib
;includelib debug.lib

WinMain					PROTO :DWORD,:DWORD,:DWORD,:DWORD

.CONST
IDB_TOOLBAR			equ 	51
IDR_MAINMENU			equ	101
IDR_CHILDMENU			equ	102
IDM_FILE_NEW			equ	201
IDM_FILE_OPEN			equ 	202
IDM_FILE_CLOSE			equ	203
IDM_FILE_SAVE			equ     204
IDM_FILE_SAVEAS			equ     205
IDM_FILE_SETUP			equ     206
IDM_FILE_PREVIEW		equ     207
IDM_FILE_PRINT			equ 	208	
IDM_FILE_EXIT 			equ	210
IDM_EDIT_CUT			equ     211
IDM_EDIT_COPY			equ     212
IDM_EDIT_PASTE			equ     213
IDM_VIEW_TOOLBAR		equ     217
IDM_VIEW_STATUS			equ     218
IDM_FORMAT_BOLD			equ     220
IDM_FORMAT_ITALIC		equ     221
IDM_FORMAT_UNDERLINE		equ 	222
IDM_FORMAT_LEFT			equ     223
IDM_FORMAT_CENTER		equ     224
IDM_FORMAT_RIGHT		equ     225
IDM_WIN_TILEHORZ		equ	229
IDM_WIN_TILEVERT		equ	230
IDM_WIN_CASCADE			equ	231
IDM_HELP_CONTENTS		equ     232
IDM_HELP_ABOUT			equ     233
ID_TOOLBAR			equ 	250

.DATA
szClassName			db "FrameClass",0
szClientName			db "MDICLIENT",0
szChildClass			db "ChildClass",0
szChildTitle			db "Child Window",0
szAppName				db "MDI Template",0
;szLibName           	db "somedll.dll",0
tbClass             	db "ToolbarWindow32",0

tbb		TBBUTTON <0, IDM_FILE_NEW,TBSTATE_ENABLED,TBSTYLE_BUTTON,0,0,0>
		TBBUTTON <1, IDM_FILE_OPEN,TBSTATE_ENABLED,TBSTYLE_BUTTON,0,0,0>
		TBBUTTON <2, IDM_FILE_SAVE,TBSTATE_ENABLED,TBSTYLE_BUTTON,0,0,0>
		TBBUTTON <0, 0,TBSTATE_ENABLED,TBSTYLE_SEP,0,0,0>
		TBBUTTON <3, IDM_FILE_PREVIEW,TBSTATE_ENABLED,TBSTYLE_BUTTON,0,0,0>
		TBBUTTON <4, IDM_FILE_PRINT,TBSTATE_ENABLED,TBSTYLE_BUTTON,0,0,0>
		TBBUTTON <0, 0,TBSTATE_ENABLED,TBSTYLE_SEP,0,0,0>
		TBBUTTON <5, IDM_EDIT_CUT,TBSTATE_ENABLED,TBSTYLE_BUTTON,0,0,0>
		TBBUTTON <6, IDM_EDIT_COPY,TBSTATE_ENABLED,TBSTYLE_BUTTON,0,0,0>
		TBBUTTON <7, IDM_EDIT_PASTE,TBSTATE_ENABLED,TBSTYLE_BUTTON,0,0,0>
		TBBUTTON <0, 0,TBSTATE_ENABLED,TBSTYLE_SEP,0,0,0>
		TBBUTTON <8, IDM_FORMAT_BOLD,TBSTATE_ENABLED,TBSTYLE_BUTTON,0,0,0>
		TBBUTTON <9, IDM_FORMAT_ITALIC,TBSTATE_ENABLED,TBSTYLE_BUTTON,0,0,0>
		TBBUTTON <10,IDM_FORMAT_UNDERLINE,TBSTATE_ENABLED,TBSTYLE_BUTTON,0,0,0>
		TBBUTTON <0, 0,TBSTATE_ENABLED,TBSTYLE_SEP,0,0,0>
		TBBUTTON <11,IDM_FORMAT_LEFT,TBSTATE_ENABLED,TBSTYLE_BUTTON,0,0,0>
		TBBUTTON <12,IDM_FORMAT_CENTER,TBSTATE_ENABLED,TBSTYLE_BUTTON,0,0,0>
		TBBUTTON <13,IDM_FORMAT_RIGHT,TBSTATE_ENABLED,TBSTYLE_BUTTON,0,0,0>
		TBBUTTON <0, 0,TBSTATE_ENABLED,TBSTYLE_SEP,0,0,0>
		TBBUTTON <14,IDM_HELP_ABOUT,TBSTATE_ENABLED,TBSTYLE_BUTTON,0,0,0>
		TBBUTTON <0, 0,TBSTATE_ENABLED,TBSTYLE_SEP,0,0,0>

.data?
hInstance	    dd ?	
hMainMenu	    dd ?	
hChildMenu	    dd ?	
hClient		    dd ?	
hWndMain	    dd ?	
hStatus             dd ?
hToolbar            dd ?
hLib		    dd ?	

mdiCreate			MDICREATESTRUCT <>
;---------------------------------------------
LOWORD MACRO bigword  
       mov  eax,bigword
       and  eax,0FFFFh      
ENDM
;---------------------------------------------
HIWORD MACRO bigword  
       mov  eax,bigword
       shr  eax,16
ENDM       
;---------------------------------------------
[*ENDTXT*]
[*BEGINTXT*]
MDI.Rc

#define					IDB_TOOLBAR			51
#define					IDR_MAINMENU			101
#define					IDR_CHILDMENU			102
#define					IDM_FILE_NEW			201
#define					IDM_FILE_OPEN			202
#define					IDM_FILE_CLOSE			203
#define					IDM_FILE_SAVE			204
#define					IDM_FILE_SAVEAS			205
#define					IDM_FILE_SETUP			206
#define					IDM_FILE_PREVIEW		207
#define					IDM_FILE_PRINT			208
#define					IDM_FILE_MRU			209
#define					IDM_FILE_EXIT 			210
#define					IDM_EDIT_CUT			211
#define					IDM_EDIT_COPY			212
#define					IDM_EDIT_PASTE			213
#define					IDM_EDIT_DELETE			216
#define					IDM_VIEW_TOOLBAR		217
#define					IDM_VIEW_STATUS			218
#define					IDM_WIN_TILEHORZ		229
#define					IDM_WIN_TILEVERT		230
#define					IDM_WIN_CASCADE			231
#define					IDM_HELP_CONTENTS		232
#define					IDM_HELP_ABOUT			233
#define					ID_TOOLBAR			250

IDB_TOOLBAR	BITMAP  DISCARDABLE	"IDB_TOOLBAR.bmp"

IDR_MAINMENU 	MENU DISCARDABLE 
BEGIN
    POPUP "&File"
    BEGIN
        MENUITEM "&New",		IDM_FILE_NEW
        MENUITEM "&Open",		IDM_FILE_OPEN
        MENUITEM SEPARATOR
        MENUITEM "E&xit",		IDM_FILE_EXIT
    END
    POPUP "View"
    BEGIN
        MENUITEM "View Toolbar",	IDM_VIEW_TOOLBAR
        MENUITEM "View Statusbar",	IDM_VIEW_STATUS
    END
    POPUP "&Help"
    BEGIN
        MENUITEM "Contents",		IDM_HELP_CONTENTS
        MENUITEM SEPARATOR
        MENUITEM "About",		IDM_HELP_ABOUT
    END
END

IDR_CHILDMENU MENU DISCARDABLE 
BEGIN
    POPUP "&File"
    BEGIN
        MENUITEM "&New",		IDM_FILE_NEW
        MENUITEM "&Open",		IDM_FILE_OPEN
        MENUITEM "&Close",		IDM_FILE_CLOSE
        MENUITEM SEPARATOR                            
        MENUITEM "&Save",		IDM_FILE_SAVE
        MENUITEM "Save &As...",		IDM_FILE_SAVEAS
        MENUITEM SEPARATOR
        MENUITEM "Print Setup",		IDM_FILE_SETUP
        MENUITEM "Print Preview",	IDM_FILE_PREVIEW
        MENUITEM "&Print",		IDM_FILE_PRINT     
        MENUITEM SEPARATOR                                     
        MENUITEM "E&xit",		IDM_FILE_EXIT
    END                                                        
    POPUP "&Edit"                                              
    BEGIN                                                      
        MENUITEM "Cut",			IDM_EDIT_CUT, GRAYED 
        MENUITEM "Copy",		IDM_EDIT_COPY, GRAYED
        MENUITEM "Paste",		IDM_EDIT_PASTE, GRAYED
    END
    POPUP "View"
    BEGIN
        MENUITEM "View Toolbar",	IDM_VIEW_TOOLBAR
        MENUITEM "View Statusbar",	IDM_VIEW_STATUS
    END
    POPUP "&Window"
    BEGIN
        MENUITEM "Tile Horizontal",	IDM_WIN_TILEHORZ
        MENUITEM "Tile Vertical",	IDM_WIN_TILEVERT
        MENUITEM "Cascade",		IDM_WIN_CASCADE
    END
    POPUP "&Help"
    BEGIN
        MENUITEM "Contents",		IDM_HELP_CONTENTS
        MENUITEM SEPARATOR
        MENUITEM "About",		IDM_HELP_ABOUT
    END
END


[*ENDTXT*]
[*BEGINTXT*]
Misc.asm
.CODE
CreateStatus Proc hParent:DWORD
LOCAL sbParts[4] :DWORD

    Invoke CreateStatusWindow, WS_CHILD OR WS_VISIBLE OR SBS_SIZEGRIP, NULL, hParent, 200
    MOV hStatus, EAX
	;-------------------------------------
	;sbParts is a DWORD array of 4 members
	;-------------------------------------
    MOV [sbParts +  0], 120
    MOV [sbParts +  4], 240
    MOV [sbParts +  8], 360
    MOV [sbParts + 12], -1
    Invoke SendMessage, hStatus, SB_SETPARTS, 4, ADDR sbParts
    RET
CreateStatus EndP
[*ENDTXT*]
[*ENDPRO*]
[*BEGINBIN*]
IDB_TOOLBAR.bmp
424D7E070000000000007600000028000000F00000000F000000010004000000
0000080700000000000000000000000000000000000000000000000080000080
000000808000800000008000800080800000C0C0C000808080000000FF0000FF
000000FFFF00FF000000FF00FF00FFFF0000FFFFFF0077777777777777777777
7777777777777700000000000007000000000000770077777777777777777777
4477777777777777777777777777777777444444444477777777777777777777
7777777777777777777777777777777777777777777777777777777777777777
7777777777777777777007777777770000000000077700000000000777777033
0000007703070FFFFFFFFFF07000770000000000077777747747744777777777
7744444444477000004FFFFFFFF4777777777777777777777777777777777770
0000000077777777777777777777777777777777777777777777777777777777
770B30777777770FFFFFFFFF0777003333333330777770330000007703070FFF
FFFF00000007707777777770707777747747477477777777774FFFFFFF470838
384F444444F47777777777777777777777777777777777777777777777777000
000000000077770000000000777777770000000000777777770B30777777770F
FFFFFFFF07770B0333333333077770330000007703070FFFFFF0077000770000
00000000070777747747477477777777774F00000F470383834FFFFFFFF47770
0000000777777770000007777777777770000077777777777777777777777777
77777777777777777777777777777777777007777777770FFFFFFFFF07770FB0
33333333307770330000000003070FFFFF0077E000770777777BBB7700077777
4447477477770000004FFFFFFF470838384F444F444477770007700077777777
7008777777777777008780077777700000000077777700000000000000770000
0000000000777777770B30777777770FFFFFFFFF07770BFB0333333333077033
3333333333070FFFFF0777707077077777700077070777777747444777770FFF
FF4F00000F470383834FFFFF4F47777700077000777777777800777777777777
0077700777777777777777777777777777777777777777777777777777777777
770B30777777770FFFFFFFFF07770FBFB0000000000070330000000033070FFF
FF07E7707077000000000000077077777740477777770F00004FFFFFFF470838
384FFFFF44777777000770007777777777008777777777770077700777777000
000000000077770000000000777777770000000000777777770B30777777770F
FFFFFFFF07770BFBFBFBFB07777770307777777703070FFFFF00EE7000770777
77777770707077777770777777770FFFFF4F00F4444703838344444440777777
0000000777777777778007777777777700777007777777777777777777777777
77777777777777777777777777777777770BB3077777770FFFFFFFFF07770FBF
BFBFBF07777770307777777703070FFFFFF00770077770000000000707007777
7700077777770F00004FFFF4F477083838383838307777770007700077777777
7770087777777777007770077777700000000077777700000000000000770000
00000000007777770070BB307777770FFFFFFFFF07770BFB0000000777777030
7777777703070FFFFFFF00007777770FFFFFFFF0707077777707077777770FFF
FF4FFFF447770380000000088077777700077000777777777778007777777777
0077700777777777777777777777777777777777777777777777777777777770
B3070BB30777770FFFFFF0000777700077777777000770307777777703070FFF
FFFFFFF077777770F00000F0000777777007007777770F00F044444477770880
7777770830777777000770007777777777770087777777770077700777777000
000000000077770000000000777777770000000000777770B30770B30777770F
FFFFF0F07777777777777777700770307777777700070FFFFFFF000077777770
FFFFFFFF077777777077707777770FFFF0F07777777703830B00B08380777770
0000000777777777777000007777777000070000777777777777777777777777
77777777777777777777777777777770BB300BB30777770FFFFFF00777777777
77770777070770307777777707070FFFFFFF0707777777770F00000F07777777
7077707777770FFFF00777777777700000BB0000077777777777777777777777
7777777777777777777777777777700000000077777700000000000000770000
00000000007777770BBBBB307777770000000077777777777777700077777000
0000000000070FFFFFFF0077777777770FFFFFFFF07777777077707777770000
0077777777777777700007777777777777777777777777777777777777777777
7777777777777777777777777777777777777777777777777777777777777777
7000000777777777777777777777777777777777777777777777777777770000
0000077777777777700000000077777777777777777777777777777777777777
7777777777777777777777777777777777777777777777777777777777777777
777777777777777777777777777777777777777777777777777777777777
[*ENDBIN*]
