WinAsm Studio, The Assembly IDE - Free Downloads, Source Code
Sponsors
Articles
Programming Quick Start
32-bit Assembler is Easy
Porting Iczelion tutorials
What is FASM
Hard Drive Recovery
Wiring your own LAN
Personal menu
Welcome Guest
User:
Pass:
Register!
Resend Validation Email
 
Forum
Pages (2) 1 [2]   ( Go to first unread post )

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

Gunner
Quote Post


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.

PMEmail PosterUsers Website
Top
vulPeCula
Quote Post


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
PMEmail PosterMSN
Top
ragdog
Quote Post


Extremely Active Member
******

Group: Moderators
Posts: 873
Member No.: 5019
Joined: 13-May 07


QUOTE
thanks for help

i tried what you said, but now i get a lot of errors, dont know why


laugh.gif You must read and understand the code and not to make copy paste wink.gif

The most code in a source is variable and you must define variable in your source coder.gif
PMUsers Website
Top
Wessol
Quote Post


Member
**

Group: Members
Posts: 32
Member No.: 51593
Joined: 16-May 12


it works now! biggrin.gif

Yeah i know it's not only copy paste job, also understand what going on, so thats why im learning asm right now smile.gif

Thank you so much both of you guys! I like it really !
PMEmail Poster
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Pages (2) 1 [2]  Reply to this topicStart new topicStart Poll

 

Sponsors
Computer Science

Internet
C/C++
Hardware & PC maintenance

HiEditor

General Discussions
Suggestions/Bug Reports
WinAsm Studio

General Discussions
Suggestions/Bug Reports
WinAsm Studio FAQ
Multilingual User Interface
Add-Ins
Assembly Programming

Main
Newbies
Projects
Custom Controls
Snippets
Announcements & Rules

Announcements

General

Online Degrees - Distance Learning
The Heap
Russian
Google