Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to make checkbox in win32? [closed]

How to create checkbox or checkboxes using Win32 API's? I don't want to drag and drop check box. I want to create checkbox in WM_CREATE. Is there any way to do it?

like image 563
Waras Avatar asked Dec 04 '25 13:12

Waras


1 Answers

In the arguments to CreateWindowEx(), the class name should be BUTTON, and the window style should be BS_CHECKBOX. Both are built-in constants defined in Windows.h

hWnd = CreateWindowEx(NULL,BUTTON,"Checkbox",BS_CHECKBOX,xPos,yPos,width,height,parent,NULL,NULL,NULL)

You would handle it's messages just as you would those from any other window.

like image 154
Wes Sayeed Avatar answered Dec 07 '25 15:12

Wes Sayeed



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!