WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Dialog Editor version 6.X
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Inherited Check Mark


Question:

Can WBT Dialogs show an 'inherited' check mark? Basically, a check box that not completely checked nor unchecked, rather it has a gray (almost disabled look) check mark.

Answer:

WinBatch dialogs do not currently support this third state of a check box. (As of 2004A)

However, look at this piece of code,

AddExtender("WWCTL34I.DLL")

;UDF createBT
#DefineFunction createBT(BTId,x,y,type)
hWndParent = DLLhWnd("")
hInstance = DLLhInst("")
sDLLName = StrCat(DirWindows(1), "User32.DLL")
DLLCall(sDLLName,long:"CreateWindowExA",long:0,lpstr:"Button",long:0,long:16384<<16|4096 <<16|type,long:x,long:y,long:13,long:13,long:hWndParent,long:BTId,long:hInstance,long:0)
#EndFunction

;Create parent box
BoxesUp("200,200,800,800", @icon)
BoxColor(1,"192,192,192",0)
BoxDrawRect(1,"0,0,1000,1000",2)
BoxButtonDraw(1, 1, "OK", "550,950,450,900")
BoxButtonDraw(1, 2, "Cancel", "750,950,650,900")
boxtext("%@crlf%         Check%@crlf%%@crlf%         Radio%@crlf%%@crlf%         3State")

;Create controls
createbt(3,10,18,3)
createbt(4,10,50,9)
createbt(5,10,82,6)
BoxesUp("200,200,800,800", @normal)


; Wait for the user to hit a button
:begin
BoxButtonWait()       
for x =1 to 2
    if BoxButtonStat(1,x) then bWho=x
next

Switch bWho
case 1
  ;Get buttons state, made with roboscripter.
  window1=cWndByWndSpec("Win7Batch4","WINBATCH",5,100,101,3,4,5)
  ControlHandle3=cWndByID(window1,3)
  ControlHandle4=cWndByID(window1,4)
  ControlHandle5=cWndByID(window1,5)
  result3=cCheckBox(ControlHandle3, -1)
  result4=cCheckBox(ControlHandle4, -1)
  result5=cCheckBox(ControlHandle5, -1)
  Message("Settings:","Check: %result3%%@crlf%Radio: %result4%%@crlf%3State: %result5%")
  break
case 2
  exit
  break
endswitch
goto begin


Article ID:   W16410
File Created: 2005:02:18:12:20:26
Last Updated: 2005:02:18:12:20:26