Got up enough nerve to put on Hutches new MASM32V8.

Having trouble with the Dialog Box RTs.

EX:
DlgStatic "BLAH BLAH", SS_LEFT, 2,20,140,9,100

This comes out in the box as:

BLAH
BLAH

Why on 2 lines???????
I assume that 100 refers to IDC_STATIC somewhere????

Thanks,
JPS
Posted on 2003-02-09 20:45:48 by shankle
iirc static text wordwraps by default so if the defined width is too small for all the text, that's what'll happen (but it will only be visible if the defined height is sufficient, of course)

i don't recognise the order of the variables in your declaration, the resource compiler i use requires for example: "text",ID,x,y,width,height,

last time i looked IDC_STATIC was -1 (and SS_LEFT was the default (zero) so not required)

regards
eGo
Posted on 2003-02-10 07:07:07 by eGo
Making the WD parameter the same size as the caption got rid of the
double lines.

The following code wil only execute the DlgButton and ignore the
other instructions. Do they have to be in a certain order?????

.const
IDC_STATIC equ 100
IDC_CHECK1 equ 1000

Dialog "PICK ONE ITEM TO EXECUTE", \
"ms sans serif", 8, \
WS_OVERLAPPED or WS_SYSMENU or DS_CENTER, \
1, 0, 0, 250, 100, 1024
DlgButton "OK",WS_TABSTOP,130,65,50,15,IDOK
DlgStatic "BLAH BLAH BLAH",SS_LEFT,5,5,60,15,IDC_STATIC
DlgCheck "x",WS_TABSTOP,90,5,30,15,IDC_CHECK1
DlgStatic "Some Title aaaa",SS_LEFT,5,30,80,15,IDC_STATIC
CallModalDialog hInstance,hWnd,DlgProc,NULL

Thanks,
JPS
Posted on 2003-02-10 08:46:33 by shankle
Jack,

Just make the width larger until the static control displays the text you want without wordwrapping.


DlgStatic "BLAH BLAH", SS_LEFT, 2,20,140,9,100
^
here


The last number is any unique number you like, I tend to code dialogs starting with 100 and go upwards but its there so you identify the control for later use if you need it.

The SS_LEFT style should work fine for you.

Make sure you put the right number of controls in the original "Dialog" statement as it is needed for the "CallModalDialog" macro that follows.

The help file should make this stuff reasonably clear.

Regards,

hutch@movsd.com
Posted on 2003-02-11 07:33:20 by hutch--
Found my dumb error and everything is working fine.

Thanks Hutch for a better way of creating Dialog Boxes.
I was using C++ to do it and it was a pain.

Thanks,
JPS
Posted on 2003-02-11 22:01:18 by shankle