Edit Control displaying improperly

Started by Fumio, March 15, 2009, 08:40:51 PM

Previous topic - Next topic

Fumio

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

KetilO

Hi Fumio

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

KetilO

Fumio

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]

KetilO

Hi Fumio

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

KetilO

Fumio

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

KetilO

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

Fumio

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]

KetilO

Hi Fumio

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

KetilO