|
|
|
|
Forum
|
|
|
How to get 2 menus, how to get two different menus at one dialog
|
|
| Gunner |
|

Extremely Active Member
     
Group: Admins
Posts: 210
Member No.: 27608
Joined: 11-October 09

|
Well the output tell you the line of the error: D:\simple notepad\Simple Notepad.asm(15) : error A2008: syntax error : . D:\simple notepad\Simple Notepad.asm(40) : error A2006: D:\simple notepad\Simple Notepad.asm(44) : error A2006: undefined symbol : DlgProc D:\simple notepad\Simple Notepad.asm(44) : error A2114: INVOKE argument type mismatch : argument : 4 D:\simple notepad\Simple Notepad.asm(47) : error A2006: undefined symbol : AppName D:\simple notepad\Simple Notepad.asm(47) : error A2114: INVOKE argument type mismatch : argument : 3 | CODE | So I click on each line of the output to take me to that line in the source. [QUOTE]syntax error : .[/QUOTE] |
Hmm, there is a period where it shouldn't be.
| QUOTE | | undefined symbol : InitCommonControls |
You don't have InitCommonControls proto'd anywhere so the linker can't find it. include Comctl32.inc and lib
| QUOTE | | undefined symbol : DlgProc |
when you use invoke, you need a proto for the proc you intend to invoke.
| QUOTE | | INVOKE argument type mismatch : argument : 4 |
create a proto for DlgProc and this will be fixed.
| QUOTE | | undefined symbol : AppName |
Er, where do you have AppName defined?
| QUOTE | | INVOKE argument type mismatch : argument : 3 |
define AppName somewhere.
|
| |
|
|
|
| vulPeCula |
|

Extremely Active Member
     
Group: Members
Posts: 190
Member No.: 16362
Joined: 16-December 08

|
Working and errors removed
| CODE | .386 .model flat, stdcall option casemap:none
include kernel32.inc includelib kernel32.lib include user32.inc includelib user32.lib include windows.inc include gdi32.inc includelib gdi32.lib include comdlg32.inc includelib comdlg32.lib include comctl32.inc includelib comctl32.lib
DlgProc proto :DWORD, :DWORD, :DWORD, :DWORD
.data RichEditDLL db"RICHED20.DLL",0 RichEditInstallFail db "Could not install RICHED20.DLL",0 RichEditClass db "RichEdit20A",0
.data? hInstance HINSTANCE ? hRichEditDLL dd ? hwndRichEdit dd ?
.const Rich equ 300
.code start:
invoke GetModuleHandle,NULL mov hInstance,eax invoke InitCommonControls invoke LoadLibrary,addr RichEditDLL .if eax!=0 mov hRichEditDLL, eax invoke DialogBoxParam,hInstance,1001,NULL,addr DlgProc,NULL invoke FreeLibrary, hRichEditDLL .else invoke MessageBox,NULL,addr RichEditInstallFail,addr RichEditInstallFail,MB_ICONERROR .endif
invoke ExitProcess,0 DlgProc proc hwnd:HWND, umsg:UINT, wparam:WPARAM, lparam:LPARAM .if(umsg==WM_INITDIALOG) invoke MessageBeep,MB_OK .elseif(umsg==WM_CLOSE) invoke EndDialog,hwnd,NULL .endif xor eax,eax ret DlgProc endp end start |
|
| |
|
|
|
| Wessol |
|
Member
 
Group: Members
Posts: 32
Member No.: 51593
Joined: 16-May 12

|
it works now!  Yeah i know it's not only copy paste job, also understand what going on, so thats why im learning asm right now  Thank you so much both of you guys! I like it really !
|
| |
|
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
Track this topic
Receive email notification when a reply has been made to this topic and you are not active on the board.
Subscribe to this forum
Receive email notification when a new topic is posted in this forum and you are not active on the board.
Download / Print this Topic
Download this topic in different formats or view a printer friendly version.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|