News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Create a Windows interface application

Started by etow, February 05, 2008, 04:43:08 PM

Previous topic - Next topic

etow

hi

I looked at the examples and tutorials in masm32 but don't understand them clearly.

---------------------------------------------------------------------------------


.Const
IDC_EDIT        Equ 3000
IDC_BUTTON      equ 3001
IDC_EXIT        equ 3002
IDM_GETTEXT     equ 32000
IDM_CLEAR       equ 32001
IDM_EXIT        equ 32002

.Data?

.Data

.Code

PrimeFactorizationProcedure Proc Private hWnd:HWND, uMsg:ULONG, wParam:WPARAM, lParam:LPARAM
.If uMsg == WM_CREATE

Return TRUE
.ElseIf uMsg == WM_CLOSE
Invoke IsModal, hWnd
.If Eax
Invoke EndModal, hWnd, IDCANCEL
Return TRUE
.EndIf
.EndIf
Return FALSE
PrimeFactorizationProcedure EndP

PrimeFactorizationGetInteger Proc Private hWnd:HWND, uMsg:ULONG, wParam:WPARAM, lParam:LPARAM
Return FALSE
PrimeFactorizationGetInteger EndP

Window1Prompt Proc Private hWnd:HWND, uMsg:ULONG, wParam:WPARAM, lParam:LPARAM
Return FALSE
Window1Prompt EndP

Window1Results Proc Private hWnd:HWND, uMsg:ULONG, wParam:WPARAM, lParam:LPARAM
Return FALSE
Window1Results EndP

PrimeFactorizationCalculateButton Proc Private hWnd:HWND, uMsg:ULONG, wParam:WPARAM, lParam:LPARAM
Return FALSE
PrimeFactorizationCalculateButton EndP

PrimeFactorizationExitButton Proc Private hWnd:HWND, uMsg:ULONG, wParam:WPARAM, lParam:LPARAM
Return FALSE
PrimeFactorizationExitButton EndP


-----------------------------------------------------------------------------
I don't know how to use the Windows components correctly to read in an integer and calculate the prime factors for that number when pressing the Calculate button and display it in the Results Window?.  Also how to exit the application when pressing the Exit button.   I have written the code on how to calculate the prime numbers.  Just not sure on the way to integrate my algorithm into a Windows commands and components.

Please help.

Thanks

evlncrn8

you need to make buttons etc, like a 'go' button, and an edit box to enter data to etc, your message handler is VERY basic, you need to expand it to your needs... im not so sure you need the modal junk either.... check out the samples in the masm package, they'll give you an idea of what you need to do...