Hello,
Here is an example to read binary data from a compiled resource script with INCBIN :
.386
.model flat,stdcall
option casemap:none
include Dialog.inc
includelib \PellesC\lib\Win\kernel32.lib
includelib \PellesC\lib\Win\user32.lib
DlgProc PROTO :DWORD,:DWORD,:DWORD,:DWORD
.data
Resource:
INCBIN Rsrc.res,80
msg db 'Dialog box with menu',0
title1 db 'Hello!',0
IDM_HELLO equ 11
IDM_EXIT equ 12
IDC_HELLO equ 110
IDC_EXIT equ 120
IDC_EDIT equ 3000
.code
start:
invoke GetModuleHandle,NULL
invoke DialogBoxIndirectParam,eax,ADDR Resource,\
NULL,ADDR DlgProc,NULL
invoke ExitProcess,eax
DlgProc PROC hWnd:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM
.IF uMsg==WM_INITDIALOG
invoke LoadIcon,NULL,IDI_APPLICATION
invoke SendMessage,hWnd,WM_SETICON,ICON_SMALL,eax
lea eax,[Resource+0A0h]
invoke LoadMenuIndirect,eax
invoke SetMenu,hWnd,eax
.ELSEIF uMsg==WM_CLOSE
invoke SendMessage,hWnd,WM_COMMAND,IDM_EXIT,0
.ELSEIF uMsg==WM_COMMAND
mov eax,wParam
.IF lParam==0
.IF ax==IDM_HELLO
invoke MessageBox,NULL,ADDR msg,ADDR title1,MB_OK
.ELSEIF ax==IDM_EXIT
invoke EndDialog, hWnd,NULL
.ENDIF
.ELSE
mov edx,wParam
shr edx,16
.IF dx==BN_CLICKED
.IF ax==IDC_HELLO
invoke SendMessage,hWnd,WM_COMMAND,IDM_HELLO,0
.ELSEIF ax==IDC_EXIT
invoke EndDialog,hWnd,NULL
.ENDIF
.ENDIF
.ENDIF
.ELSE
mov eax,FALSE
ret
.ENDIF
mov eax,TRUE
ret
DlgProc ENDP
END start