News:

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

A question about MASM32 with RadASM

Started by Lightman, June 05, 2007, 01:00:56 PM

Previous topic - Next topic

Lightman

Hi Everybody,

I am using RadASM with the MASM32 complier to learn assembly programming. My question today is about handles for objects on my dialog box. Something here is confusing me.... The tutorial I am working on is talking about having an edit box on a 'dialog as main' dialog. To create an edit box on my dialog I wrote something like....

.if iMsg==WM_CREATE
  invoke  CreateWindowEX (........)

hutch--

Hi Lightman,

Welcome on board.

If the dialog you are building in RadAsm is in fact a dialog and not a low level CreateWindowEx() and you have used a resource editor to construct the dialog you get the dialog handle from the DlgProc that processes its messages and you get the edit control handle if you need it from its resource ID then call an API GetDlgItem()


    invoke GetDlgItem,hDlg,125
    mov hEdit, eax


In this example hDlg is supplied by the Dlgproc and the edit control ID number is 125. The return value is the edit control handle.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Lightman

Hi,

Many thanks for that.

I works!! I can now get the handle given the item ID.

Regards,

Lightman