Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sets width and height of dialog
#1
Hi,

I want to set the width and height of the dialog via hotkey(Alt+A)
dialog width and height, The definitions before and after the adjustment are as follows

 size before:
 0 "" 0x90C80AC8 0x0 0 0 112 30 "Dialog" "4"

 size after:
 0 "" 0x90C80AC8 0x0 0 0 216 144 "Dialog" "4"

What is the relationship between width and height and pixel size in the definition

Using the width and height in the definition directly, the final effect cannot be achieved

[Image: 1672287630]
Macro Macro3
Code:
Copy      Help
;size before:
;0 "" 0x90C80AC8 0x0 0 0 112 30 "Dialog" "4"

;size after:
;0 "" 0x90C80AC8 0x0 0 0 216 144 "Dialog" "4"

str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 112 30 "Dialog" "4"
;3 Edit 0x54030080 0x200 8 8 96 12 ""
;4 ListBox 0x54230101 0x200 112 8 96 130 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2040C02 "*" "" "" ""

str controls = "3 4"
str e3 lb4
if(!ShowDialog(dd &sub.DlgProc &controls)) ret


#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,DT_SetAccelerators(hDlg "401 Aa") ;;Alt+A
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case 401
;,;int x y w h
;,;GetWinXY hDlg x y w h
,siz 216 144 hDlg
,case IDCANCEL
ret 1


Messages In This Thread
Sets width and height of dialog - by Davider - 12-26-2022, 04:15 AM
RE: Sets width and height of dialog - by Davider - 12-26-2022, 10:32 PM
RE: Sets width and height of dialog - by Davider - 12-26-2022, 11:47 PM
RE: Sets width and height of dialog - by Kevin - 12-27-2022, 03:46 PM
RE: Sets width and height of dialog - by Davider - 12-27-2022, 10:42 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)