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
 

Handling Structures in Assembly, I have a little problem with my structures, these don't work, don't know why; any ideas, please?

ragdog
Quote Post


Extremely Active Member
******

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


Hi

I have a little problem with my Structures

these don't work, don't know why!

CODE
.data?
MyStruct struct
   Text  db 10 dup(?)
   Text1        db 10 dup(?)
   Text2         db 10 dup(?)  
   Text3 db 10 dup(?)
MyStruct ends

.code
 invoke GetDlgItemText,hWnd,10001, MyStruct.Text,10
        invoke MessageBox,hWnd,MyStruct.Text,0,MB_OK


Do you have a solution, please?

PMUsers Website
Top
akyprian
Quote Post


Administrator
******

Group: Admins
Posts: 2307
Member No.: 1
Joined: 12-May 04


It should be

CODE
.data?
MyStruct struct
   Text  db 10 dup(?)
   Text1        db 10 dup(?)
   Text2         db 10 dup(?)  
   Text3 db 10 dup(?)
MyStruct ends

.data
szTexts MyStruct <>

.code
invoke GetDlgItemText,hWnd,10001, Addr szTexts.Text,10
invoke MessageBox,hWnd,Addr szTexts.Text,0,MB_OK
PMEmail PosterUsers Website
Top
ragdog
Quote Post


Extremely Active Member
******

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


Thanks I try this


I use this

CODE
MyStruct struct
  Text  db 10 dup(?)
  Text1        db 10 dup(?)
  Text2         db 10 dup(?)  
  Text3 db 10 dup(?)
MyStruct ends


.data
szText MyStruct <>


.code
invoke GetDlgItemText,hWnd,10001, szText.Text,10
       invoke MessageBox,hWnd,szText.Text,0,MB_OK
PMUsers Website
Top
JimG
Quote Post


Extremely Active Member
******

Group: Moderators
Posts: 725
Member No.: 11
Joined: 16-May 04


invoke GetDlgItemText,hWnd,10001,addr szText.Text,10
invoke MessageBox,hWnd,addr szText.Text,0,MB_OK
PMEmail Poster
Top
ragdog
Quote Post


Extremely Active Member
******

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


Yes i mean this sorry biggrin.gif
PMUsers Website
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options 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