error C2228: left of '.enabled' must have class/struct/union"

I realize this must be a super beginner problem. I am getting an error "error C2228: left of '.enabled' must have class/struct/union" 4 times for my checkBox1 and groupBox3 in visual studio. I am trying to disable a textbox and two radiobuttons if this checkbox is checked. Please help. Is there a listing somewhere of what the class/struct/union is for various objects?

Also, I have been trying to go through tutorials on C++ and it constantly uses intellisense with C++ and yet when I go to program, I constantly get the message that intellisense is not available for C++/ CLI. Ideas? Are there any fixes out there or will I not be able to use it all with visual studio if I program in C++?

#pragma endregion
private: System::Void button3_Click(System::Object^  sender, System::EventArgs^  e) {

private: System::Void checkBox1_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
			 if (checkBox1.enabled == true)
			 groupBox3.enabled = false;
			 if (checkBox1.enabled == false)
			 groupBox3.enabled = true;
Last edited on
The reason intellisense is not available for C++/ CLI is not available is because Microsoft doesn't really want you to use it. I think you get it for MFC, but I would recommend C# if you're using VS. Granted, if a teacher is telling you what to do, that's another story.

Anyway ^ is a handle, think of it as an *. You need:
checkBox1->enabled == true

and is it just enabled, maybe Enabled.

Really, try a C# program, the intellisense is pretty remarkable.
Last edited on
Okay, thanks. I am just trying to get through the visual elements of C++ because I wrote a bunch of math code in C++ and didn't want to substitute in the different syntaxes if I switch over to C#, which I have never programmed in before. If this gets too crazy though, I think I may have to out of frustration.

I tried changing all of the ".enabled" to" ->Enabled" and now it disables the group, but it won't re-enable the group if the box is unchecked.
Last edited on
Topic archived. No new replies allowed.