I try to use winAPI IsDlgButtonChecked and CheckDlgButton ,but all faied in EasyCode  . Then i also try to use SendMessage for checkbox , failed too .?? 

I don't know how to do now, can you help me?

btw: my english is very poor . i hope EasyCode surport Simple-Chinese later.

Posted on 2006-04-18 05:48:31 by niu
Hi Niu,

I attach a simple project (Project1.zip) where you can see how to use the API functions for a Check control. Identifiers for controls are formed by 'IDC_' plus the window name (in the example Window1) plus '_', plus the control name (all upper case). For example, the identifier for a control named Check1 being inside a window named Window1 will be:


For more information, see the Easy Code help (Visual projects)


Posted on 2006-04-19 01:26:54 by rsala
thank you very much, rsala.

and now ,I have another problem that  I code:
            invoke Shellexecute,app.Main,textaddr("open"),textaddr("notepad.exe"),textaddr(""),textaddr(""),SW_SHOW

when i build the project, the IDE said: 
Compiling resources...
Assembling: WndMain
WndMain.asm(266) : error A2006: undefined symbol : ShellExecuteEx

Errors ocurred.

I can't find what's wrong

Posted on 2006-04-19 08:45:07 by niu
Hi Niu,

You need to include the shell32.inc and shell32.lib files in your project. To do that, click menu Project then Add Include file (*.inc) and select the shell32.inc file from the dialog box. Then click menu Project again, Add Lbrary file (*.lib) and select the shell32.lib file from the dialog box. After that, your project will compile okay.


Posted on 2006-04-19 18:58:10 by rsala
Thand you , rsala.

EsayCode is a good IDE for asm , I love it very much.

I found that when I put the checkBox in a GroupControl ,the winAPI function IsDlgButtonChecked , CheckDlgButton and SendMessage are all failed.  When I past it out of Group , the APIs are all succeed.


Posted on 2006-04-19 20:48:39 by niu
Hi Niu.

The CheckDlgButton and IsDlgButtonChecked API funtions need the handle to the parent window as the first parameter. When controls are inside a Group or a Picture object (which are containers) the parent is the Group or Picture object, not the window, so you have to pass the appropiate handle to those API functions. As Easy Code can nest controls inside other controls, it always sends the WM_COMMAND message to the owner window to make message processing easier. So, in order not to have problems, use the BM_GETCHECK and BM_SETCHECK messages through the SendMessage API function.


Posted on 2006-04-20 01:11:50 by rsala
OK , I'll test it.


Posted on 2006-04-21 10:18:38 by niu