The MASM Forum Archive 2004 to 2012

Project Support Forums => IDE Development and Support => RadAsm Support Forum => Topic started by: Fumio on March 15, 2009, 08:40:51 PM

Title: Edit Control displaying improperly
Post by: Fumio on March 15, 2009, 08:40:51 PM
Hello all
In my project, I created a dialog which includes RAfileBrowser, Listbox, and two buttons and program executes as expected. It's a rough start to file backup program.
I decided to add an edit control to display the backup path. I'm using RadAsm V2.2.1.5. When compiled the edit control doesn't display until I click on the area where it
should be. Then it shows as only a fraction of the height that it should be. However when right_clicking on the control and selecting right-to-left text reading the control
becomes completely visible. Deselecting right-to-left and the control functions properly.
Any Ideas?
Fumio
Title: Re: Edit Control displaying improperly
Post by: KetilO on March 15, 2009, 10:23:16 PM
Hi Fumio

Is your edit control coverd by amother control, like a static?

KetilO
Title: Re: Edit Control displaying improperly
Post by: Fumio on March 16, 2009, 03:14:27 AM
Hello Ketilo
Nothing is covering the edit control.
I have attached a zip file showing how the edit control looks when dialog is initially displayed
and after it is filled via program. Also a jpg of dialog in resource editor.
It does work, but initial display is incorrect.
Regards Fumio

[attachment deleted by admin]
Title: Re: Edit Control displaying improperly
Post by: KetilO on March 16, 2009, 06:00:02 AM
Hi Fumio

Setting the clipping property of the dialog to botth will probably do the trick.

KetilO
Title: Re: Edit Control displaying improperly
Post by: Fumio on March 17, 2009, 02:52:06 AM
Hello Ketilo:
Setting clipping to both had no effect.
One other piece of information; I am using "DialogBoxParam" to create the dialog that displays incorrectly.
If i use "CreateDialogParam" everything displays correctly.


Fumio
Title: Re: Edit Control displaying improperly
Post by: KetilO on March 17, 2009, 06:40:01 AM
Hi Fumio

This tells me there is something wrong with your dialog callback.

A typical modal callback looks like this:

.386
.model flat, stdcall  ;32 bit memory model
option casemap :none  ;case sensitive

include About.inc

.code

start:
invoke GetModuleHandle,NULL
mov hInstance,eax
invoke InitCommonControls
invoke DialogBoxParam,hInstance,IDD_MAIN,NULL,addr DlgProc,NULL
invoke ExitProcess,0

;########################################################################

DlgProc proc hWin:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM

mov eax,uMsg
.IF eax==WM_INITDIALOG
;initialization here
.ELSEIF eax==WM_COMMAND
mov edx,wParam
movzx eax,dx
shr edx,16
.IF edx==BN_CLICKED
.IF eax==IDOK

.ELSEIF eax==IDCANCEL
invoke SendMessage,hWin,WM_CLOSE,NULL,NULL
.ENDIF
.ENDIF
.ELSEIF eax==WM_CLOSE
invoke EndDialog,hWin,0
.ELSE
mov eax,FALSE
ret
.ENDIF
mov eax,TRUE
ret
DlgProc endp

end start

KetilO
Title: Re: Edit Control displaying improperly
Post by: Fumio on March 17, 2009, 07:52:01 PM
Hello Ketil0
I sent the control "SendDlgItemMessage,hWin,1005,WM_SETTEXT,0,offset Success"  in WM_INITDIALOG segment and control
appears correctly with caption Success. Why would this not work when caption was set in resource editor?
Regards Fumio

[attachment deleted by admin]
Title: Re: Edit Control displaying improperly
Post by: KetilO on March 17, 2009, 10:54:45 PM
Hi Fumio

There is no way to tell whats wrong without having a look at your sources.

KetilO