The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: xellos on November 01, 2010, 07:50:04 PM

Title: how to make a button and editboxes?
Post by: xellos on November 01, 2010, 07:50:04 PM
how to make a button and editboxes?
Title: Re: how to make a button and editboxes?
Post by: jj2007 on November 01, 2010, 08:27:58 PM
MSDN: Creating a button (http://msdn.microsoft.com/en-us/library/ms632680%28VS.85%29.aspx)
(if you don't understand, try in Visual Basic first)
Title: Re: how to make a button and editboxes?
Post by: xellos on November 01, 2010, 08:33:53 PM
well i dont understand how to use that in asm
Title: Re: how to make a button and editboxes?
Post by: jj2007 on November 01, 2010, 09:20:43 PM
Quote from: xellos on November 01, 2010, 08:33:53 PM
well i dont understand how to use that in asm

Start with studying icztutes\tute09. If you don't yet have the tutes, google for icztutes, or go here (http://website.masm32.com/) and search the page for icz.

Afterwards, post your code and we will help you.
Title: Re: how to make a button and editboxes?
Post by: Farabi on November 01, 2010, 11:40:08 PM
Use CreateWindowEx
Title: Re: how to make a button and editboxes?
Post by: cman on November 01, 2010, 11:56:46 PM
Use CreateWindowEx like:



szText btnClass,"BUTTON"

invoke CreateWindowEx ,0 , ADDR btnClass,lpText, WS_CHILD or WS_VISIBLE,
xButtonPosition , yButtonPosition ,buttonWidth ,
buttonHeight , hParent , buttonControlID ,
hInstance ,NULL



heres the function's prototype:


HWND CreateWindowEx(

DWORD  dwExStyle, // extended window style
LPCTSTR  lpClassName, // address of registered class name
LPCTSTR  lpWindowName, // address of window name
DWORD  dwStyle, // window style
int  x, // horizontal position of window
int  y, // vertical position of window
int  nWidth, // window width
int  nHeight, // window height
HWND  hWndParent, // handle of parent or owner window
HMENU  hMenu, // handle of menu, or child-window identifier
HINSTANCE  hInstance, // handle of application instance
LPVOID  lpParam // address of window-creation data
);