473,406 Members | 2,352 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Hello, basic question regarding checkboxes

Hello.

I want to check a checkbox using the CheckDlgButton
(hWND,IDC_CHECK1,BE_CHECKED) command
The checkbox resides in a Dialog box called IDD_MYAPPLICATION_DIALOG.
However, when I put this in the hWND field I get the error

error C2664: 'CheckDlgButton' : cannot convert parameter 1 from 'int'
to 'HWND'
Conversion from integral type to pointer type requires
reinterpret_cast, C-style cast or function-style cast

What do I have to put in the hWND field to make this work?

Cheers
Jan 14 '08 #1
3 1643
st*****@gmail.com wrote:
I want to check a checkbox using the CheckDlgButton
(hWND,IDC_CHECK1,BE_CHECKED) command
It's not a command. It's a function call.
The checkbox resides in a Dialog box called IDD_MYAPPLICATION_DIALOG.
However, when I put this in the hWND field I get the error

error C2664: 'CheckDlgButton' : cannot convert parameter 1 from 'int'
to 'HWND'
Conversion from integral type to pointer type requires
reinterpret_cast, C-style cast or function-style cast
Compiler is correct. You cannot pass integers where 'HWND' (whatever
that is) should be. C++ is a strongly typed language.
What do I have to put in the hWND field to make this work?
You need to find the HWND (IIRC it's the window "handle") of your
checkbox. Sorry, that's the extend of my ability to help you. This
is a C++ _language_ newsgroup, not Windows GUI programming newsgroup.
Please post your Windows GUI question to a Windows GUI forum.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Jan 14 '08 #2
Hi,

If you use MFC it is the m_hWnd member of CDialog.
Or if you use CreateDialog it is the return value.
Regards, Ron AF Greve

http://www.InformationSuperHighway.eu

<st*****@gmail.comwrote in message
news:e8**********************************@k2g2000h se.googlegroups.com...
Hello.

I want to check a checkbox using the CheckDlgButton
(hWND,IDC_CHECK1,BE_CHECKED) command
The checkbox resides in a Dialog box called IDD_MYAPPLICATION_DIALOG.
However, when I put this in the hWND field I get the error

error C2664: 'CheckDlgButton' : cannot convert parameter 1 from 'int'
to 'HWND'
Conversion from integral type to pointer type requires
reinterpret_cast, C-style cast or function-style cast

What do I have to put in the hWND field to make this work?

Cheers

Jan 14 '08 #3
On Jan 14, 12:47 pm, "Ron AF Greve" <ron@localhostwrote:
Hi,

If you use MFC it is the m_hWnd member of CDialog.
Or if you use CreateDialog it is the return value.

Regards, Ron AF Greve
Ron,

Your continued willingness to answer Windows specific questions does
nothing but encourage off topic postings. Why do you continue to do
so? Everytime you do it, you let an OT poster think they can keep
posting Windows specific questions here and receive help, which
clutters the newsgroup. The microsoft.public newsgroups suit this
purpose just fine. MSDN also, recently added forums in conjunction
with Windows Live. This would question would perfectly match the topic
of "Windows SDK" or "UI Development" on those forums. They can always
use more people to answer questions there. I have a few unanswered
questions there myself. Perhaps you should start lending a hand there.
If you would like to argue what is on and off topic, or that the FAQ
should be ignored, than let us hash that out.

Jan 14 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Pete | last post by:
There is a Summary/Example further down... On page one of my site I have a form with some checkboxes and detailed descriptions. When the form is submitted (to page two), the values of the...
6
by: Robert Maas, see http://tinyurl.com/uh3t | last post by:
System login message says PHP is available, so I tried this: http://www.rawbw.com/~rem/HelloPlus/h.php It doesn't work at all. Browser just shows the source. What am I doing wrong?
3
by: Ondernemer | last post by:
Hi guys, On my page I dynamically create different checkboxes. <input type="checkbox" name="ch1" value="some value"> option 1 <input type="checkbox" name="ch2" value="some value"> option 2...
6
by: terence.parker | last post by:
I currently have the following JS in my header: function checkall(thestate) { var checkboxes=eval("document.forms.EssayList.file_id") for (i=0;i<checkboxes.length;i++)...
0
by: Betinho | last post by:
And after the installing of 2005 Beta 1, I got in problems because the GUI are not loadings and I can not use the program because the toolbox are not working eaither and the program hold still...
5
by: masterej | last post by:
Developers, Is there any way to disable all checkboxes on a form? I have a form with 160 checkboxes and I want to be able to disable all of them. Is there a way I can do something like this: ...
1
by: steve | last post by:
A series of articles examining some basic concepts in Sql Server. Basic Anatomy of Sql Server, part I What is a stored procedure?...
8
by: PeteOlcott | last post by:
http://archive.dojotoolkit.org/nightly/dojotoolkit/dojox/grid/tests/test_change_structure.html I would like to completely understand how GUI controls such as this one are constructed. In the...
7
by: viki1967 | last post by:
I need one function javascript that: 1) when I enter in this htm page I see enabled only checkbox of categories A, M and T; checkboxes of microcategories all disabled; 2-a) If I select the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.