News:

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

create a new language with MASM32v10 (STEP1)

Started by elmo, October 11, 2010, 10:20:57 AM

Previous topic - Next topic

elmo

I want to create my own language with MASM32v10. I try to create my Language layout like BorlandC++BuilderIDE.

In toolbox, I just have ComboBox, DataGrid, and Button.
I use FormProperties to configure all of the object which avail in Form1.
For Example:
I click menu Toolbox. Then, I choose ComboBox. So, Combobox will appear in Form1 like the picture.

If I click the it, It's properties (like Height, Width, etc) will appear in the FormProperties.
I just use Label and TextBox in FormProperties to configure the properties of each object which avail on the Form1.

But if I click Toolbox, and choose DataGrid, it must show it's (DataGrid) Properties (like columnName, ColumnWidth) in the FormProperties.

So, I must create other TextBox and Label to handle this.
As the result, my program will be not effective and not efficient.

Could you help me to give all example with MASM32v10 about how to create the best FormProperties with ListView or ListBox or DataGrid which have Edit or Combo or Static in it's row. So, it will like ObjectInspector in BorlandC++Builder6


You can look my language layout in the attached file.

Thank You. Best regards,

Fritz Gamaliel

be the king of accounting programmer world!

ToutEnMasm


Try to look at existing IDE writing in masm this could help you

elmo

I just want to know all SendMessage who can configure all properties of Combobox or datagrid or Form.

Example, if I want to add string 10 to Combo1 who have handle name hCombo1, I just do this:
invoke SendMessage,hCombo1,CB_ADDSTRING,0,SADD("10")

I need to know other SendMessage who can do below:
configure Height, Width, X, Y, Color properties of the ComboBox
configure Height, Width, X, Y, Caption, Icon properties of the Form
configure DatabaseSource,TotalColumn,TotalRow,ColumnTitle,Height,Width,X,Y properties of the DataGrid

Ow, I almost forgot. Can we show handle value in Edit.
example:
I create combo with hCombo1.
I want to show value of hCombo1 in EditBox1
Can We show it? How?

Thank you.
be the king of accounting programmer world!

elmo

#3
Dear masters of MASM32,

I want to ask you some questions.

I want to add a combo to my Form area. So, I do job below:
STEP1. I create combo

szText cmbBox,"COMBOBOX"

invoke CreateWindowEx,WS_EX_CLIENTEDGE,ADDR cmbBox,0,
WS_CHILD or WS_BORDER or WS_VISIBLE or \
CBS_HASSTRINGS or CBS_DROPDOWNLIST or WS_VSCROLL,
x,y,width,height,hParent,ID,hInstance,NULL

STEP2. automatically, it's properties (like it's X or Y position in Form) appear in my Properties area.
STEP3. automatically, generate a code to EditBox according STEP1 & 2


//===================================================================================================
Base on Step1, I want to ask you:
Example:
I want to add Combo1 to Form. So I click menu Toolbox/ ComboBox. It automatically appear on x=10, y=10 in Form area.
I want to add Combo2 to Form. So click menu Toolbox/ ComboBox. It automatically appear onĀ  x=10+Xlast, y=10+Ylast in Form area.
In here, Xlast and Ylast are X and Y position of Combo1 before I add Combo2 to Form area.
And so on. Can we do this?

I have do job below. But it fail.

INTXcombo db 32 dup(0)
INTYcombo db 32 dup(0)

hCombo1 dd ?

invoke FpuAdd, ADDR INTXcombo, 10, ADDR INTXcombo, SRC1_REAL or SRC2_DIMM
invoke FpuAdd, ADDR INTYcombo, 10, ADDR INTYcombo, SRC1_REAL or SRC2_DIMM
invoke ComboBox,10+INTXcombo,10++INTYcombo,150,250,hChild2,700
mov hCombo1,eax


ComboBox proc a:DWORD, b:DWORD, wd:DWORD, ht:DWORD, hParent:DWORD, ID:DWORD

szText cmbBox,"COMBOBOX"

invoke CreateWindowEx,WS_EX_CLIENTEDGE,ADDR cmbBox,0,
WS_CHILD or WS_BORDER or WS_VISIBLE or \
CBS_HASSTRINGS or CBS_DROPDOWNLIST or WS_VSCROLL,
a,b,wd,ht,hParent,ID,hInstance,NULL

ret
ComboBox endp



//===================================================================================================
Base on Step2, I want to ask you:
Example:
I want to add combo1 to Form. So, I click menu Toolbox/ Combobox. It automatically appear in Form area. And also it's properties appear in Properties area.
In here I want to show the properties of combo1 (like it's X and Y position in Form, height , width) in Properties area
But how to get it's Properties?

Example:

;CREATE COMBO
invoke CreateWindowEx,WS_EX_CLIENTEDGE,ADDR cmbBox,0,
WS_CHILD or WS_BORDER or WS_VISIBLE or \
CBS_HASSTRINGS or CBS_DROPDOWNLIST or WS_VSCROLL,
a,b,wd,ht,hParent,ID,hInstance,NULL

mov hCombo1,eax

;GET PROPERTIES
Get a
Get b
Get wd
Get ht
Get ID
Get hCombo1
Show it in EditBox in Properties area.



//===================================================================================================
Base on Step3, I want to ask you:
Example:
I want to add Combo1 to Form. So I generate it's code in my EditBox.
Then, I want to create Combo2. So, I generate it's code in the same EditBox without overwrite code of Combo1.
Can we do this??
I have do job below. It's only show ComboName(Example: Combo1, Combo2, ..., ComboN) . But every time I add new combo to my form, It's always overwrite code of last combo.

INTNewComboID db 32 dup(0)
STRNewComboName db "Combo",0

STRConcatNameIDCombo db 1024 dup(?)

invoke lstrcpy, addr STRConcatNameIDCombo, addr STRNewComboName
invoke FpuFLtoA, ADDR INTNewComboID,0, ADDR STRNewComboID, SRC1_REAL or SRC2_DIMM
invoke szTrim,ADDR STRNewComboID
invoke lstrcat, addr STRConcatNameIDCombo, ecx
invoke szTrim,ADDR STRConcatNameIDCombo
invoke SetWindowText,hEdit40,ecx
invoke FpuAdd, ADDR INTNewComboID, 1, ADDR INTNewComboID, SRC1_REAL or SRC2_DIMM



Last question base on Step3,
I have add combo1 to Form. It's code have generated in EditBox. I want to configure it's properties in Properties area.
But, every time I change it's properties, I want automatically update the code of it in EditBox. Can we do this?


//===================================================================================================
I am sory if I ask you many question.

Thank you for your kind attention.
Fritz

Added code tags
be the king of accounting programmer world!