Results 1 to 2 of 2

Thread: What kind of variable should i use

  1. #1
    Guest

    Post

    This is my code...

    Code:
    	.386
    	.model flat, stdcall
    	option casemap:none
    
    include	\masm32\include\windows.inc
    include	\masm32\include\kernel32.inc
    include	\masm32\include\user32.inc
    includelib	\masm32\lib\kernel32.lib
    includelib	\masm32\lib\user32.lib
    
    MainDialogProc	proto :HWND, :UINT, :WPARAM, :LPARAM
    
    	.data
    Msg1Cap	        db	"MainDialogX =", 0
    Msg2Cap	        db	"MainDialogY =", 0
    Position	db	"Position", 0
    iniString	db	"Fonts.ini", 0
    X		db	"X", 0
    Y		db	"Y", 0
    
    	.data?
    MainDialogX	dd	?
    MainDialogY	dd	?
    
    	.const
    
    	.code
    start:
    	invoke	GetPrivateProfileInt, addr Position, addr X, 200, addr iniString
    	mov	MainDialogX, eax
    
    	invoke	GetPrivateProfileInt, addr Position, addr Y, 200, addr iniString
    	mov	MainDialogY, eax
    
    	invoke	MessageBox, NULL, addr MainDialogX, addr Msg1Cap, MB_OK
    
    
    	invoke	ExitProcess, 0
    
    end start
    The variable 'MainDialogX' for some reason will not hold the value that is returned by 'GetPrivateProfileInt', what kind of variable shold it be?

  2. #2
    Addicted Member
    Join Date
    May 2000
    Posts
    240

    Question Ermm...

    Not to sound stupid but..

    did you try changing the "Msg1Cap" to "MainDialogX"?

    Like so...


    invoke MessageBox, NULL, addr MainDialogY, addr MainDialogX, MB_OK





    I got the value to appear in the Caption of the msgbox..but i havent been able to add the " MainDialogX = " part to it yet.


    Does this help at all?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width