Hi,I am a newbie of ASM.

In delphi we can set button/edit/text's color and fonts directly,but in ASM I've no idea to change any attribute of these control.
Some book refer to that programer can write code in uMSG == CTLCOLORBTN to change button's color,but it's only give the line uMsg==WM_CTLCOLORBTN and no more info.
I try to use

invoke SetTextColor,IDC_BTN1,Black

but comliler report the error:
rgpexlor181.asm(75) : error A2006: undefined symbol : SetTextColor

I want to get some more infomation of change control's attribute,So can make my application more nicer......

I know possible the question is such fool,but I've no more reference data or sample code....

thx every one....

Const.Ex
Posted on 2002-06-15 20:29:23 by Const.Ex
Hi,

I have a simple example, I guess - Buttontype proc - section answers all your questions

have nice days,
Posted on 2002-06-15 20:37:18 by CYDONIA
Thanks ,I am downloading the file and testing it~~~

Have nice days ,too

const.ex
Posted on 2002-06-15 20:43:10 by Const.Ex
ButtonR.asm(1) : error A2119: language type must be specified
ButtonR.asm(2) : error A2119: language type must be specified
..........
ButtonR.asm(47) : error A2012: PROC, MACRO, or macro repeat directive must precede LOCAL
ButtonR.asm(49) : error A2006: undefined symbol : CallWindowProc
ButtonR.asm(51) : error A2034: must be in segment block
ButtonR.asm(52) : error A2034: must be in segment block
ButtonR.asm(53) : error A2034: must be in segment block
ButtonR.asm(54) : error A2085: instruction or register not accepted in current CPU mode
ButtonR.asm(55) : error A2085: instruction or register not accepted in current CPU mode
ButtonR.asm(56) : error A2006: undefined symbol : UpDown
ButtonR.asm(56) : error A2114: INVOKE argument type mismatch : argument : 6
ButtonR.asm(56) : error A2006: undefined symbol : szRaised
ButtonR.asm(56) : error A2114: INVOKE argument type mismatch : argument : 5
ButtonR.asm(56) : error A2034: must be in segment block
ButtonR.asm(56) : error A2006: undefined symbol : hFontB
ButtonR.asm(56) : error A2114: INVOKE argument type mismatch : argument : 2
ButtonR.asm(56) : error A2006: undefined symbol : hButt3
ButtonR.asm(56) : error A2114: INVOKE argument type mismatch : argument : 1
ButtonR.asm(57) : error A2034: must be in segment block
..................
ButtonR.asm(77) : error A2034: must be in segment block
ButtonR.asm(78) : error A2085: instruction or register not accepted in current CPU mode
ButtonR.asm(79) : error A2034: must be in segment block
ButtonR.asm(80) : fatal error A1010: unmatched block nesting : ControlButt

Make error(s) occured.


I think the code only can be watch but can't be assemble......

the trouble is,I don't know how to get my button's handle,and how to invoke the Buttontype produre.....
it seems hButt:DWORD must be button's haddle....

thx again.
Posted on 2002-06-15 21:01:24 by Const.Ex
rgpexlor181.asm(75) : error A2006: undefined symbol : SetTextColor
You probably forgot to include gdi32.inc and gdi32.lib

Take a look at an example code from ICZ tut #5. :)
Posted on 2002-06-15 21:18:48 by stryker

You probably forgot to include gdi32.inc and gdi32.lib :)


Yeeees~~~~~~
I am so foolish~~
thx for your help....

Const.Ex
Posted on 2002-06-15 21:24:25 by Const.Ex
Sometimes we forgot about the libs and incs involve. Even me, sometimes I overlook these small matters. I use to remember one time looking at my code for hours, reinstalling masm32 and to find out, it was just some libs and inc files I forgot to add in... :grin:
Posted on 2002-06-15 21:27:58 by stryker
yes there are lots of libs......


any one Tutorial code can help me to understand how to do this interest things quickly to get stange GUI......

HeHe :)

I am one step far to grasp it.....

(WPARAM and DC)

thx:tongue:
Posted on 2002-06-15 22:11:29 by Const.Ex
Because I use an frame of "dialog as main" is differnce of WinMain Proc.....

Thx every one whom replyed my posts............
Posted on 2002-06-16 05:43:09 by Const.Ex
Sometimes we forgot about the libs and incs involve. Even me, sometimes I overlook these small matters. I use to remember one time looking at my code for hours, reinstalling masm32 and to find out, it was just some libs and inc files I forgot to add in...


did this the other day but with a cyclic include. ie

start <asmFile.asm>
...
...
...
...
include asmFile.asm <-------
end <asmFile.asm>

the only error i got was um... "multiple .MODEL directives found" followed by a million "non-benign structure redefinition", sounds simple and stupid, but it took me 15 mins to find it. just tired and not thinking
Posted on 2002-06-16 22:40:30 by Kremen