2 Replies - 12725 Views - Last Post: 22 March 2011 - 03:47 PM

#1 mark103  Icon User is offline

  • D.I.C Head

Reputation: -1
  • View blog
  • Posts: 55
  • Joined: 13-April 08

[HELP] C++ Problem with loads errors

Posted 09 March 2011 - 04:13 PM

Hi guys,

I need your help. I am using managed c++ and I have no idea how to correct the errors I have received on my error list.


Here it's the error with the each line of the code:

Error: syntax error : identifier 'MENUITEMINFO'
Code:
static int GetMenuItemInfo(IntPtr hMenu, int uItem, bool fByPosition, MENUITEMINFO %lpmii);



Error: syntax error : identifier '_'
Error: error C2238: unexpected token(s) preceding ';'
Code:
[StructLayout(LayoutKind::Sequential, CharSet=CharSet::Auto), StructLayout(LayoutKind::Sequential, CharSet=CharSet::Auto)]_;



Error: error C3379: 'Project1::Options1::MENUITEMINFO' : a nested class cannot have an assembly access specifier as part of its declaration
Code:
public value class MENUITEMINFO {
	public:
		int cbSize;
		int fMask;
		int fType;
		int fState;
		int wID;
		int hSubMenu;
		int hbmpChecked;
		int hbmpUnchecked;
		int dwItemData;
		String ^dwTypeData;
		int cch;
	};


Error: error C2039: 'arrow_black' : is not a member of 'System::Windows::Forms::Control::Properties'

error C2065: 'arrow_black' : undeclared identifier

Code:
PictureBox1->Image = Properties::arrow_black; 


Error: error C2664: 'void Microsoft::Win32::RegistryKey::SetValue(System::String ^,System::Object ^,Microsoft::Win32::RegistryValueKind)' : cannot convert parameter 3 from 'bool' to 'Microsoft::Win32::RegistryValueKind'
Code:
Registry::LocalMachine->CreateSubKey("SOFTWARE\\MyApp\\TrayEnabled")->SetValue("Enabled", "False", this->NotifyIcon1->Visible == true);


Error: error C2653: 'My' : is not a class or namespace name
Code:
int screenX = My::Computer::Screen::Bounds.Height;
			 int screenY = My::Computer::Screen::Bounds.Width;


Error: error C2228: left of '.OpenSubKey' must have class/struct/union
Error: error C2227: left of '->SetValue' must point to class/struct/union/generic type
Code:
Microsoft::Win32::Registry::LocalMachine.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Run", true)->SetValue("MyApp", Application::ExecutablePath);




Could you please me as I needs to make changes to correct the errors with above codes?

Any advice would be much appreicate.

Thanks,
Mark

Is This A Good Question/Topic? 0
  • +

Replies To: [HELP] C++ Problem with loads errors

#2 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6107
  • View blog
  • Posts: 23,663
  • Joined: 23-August 08

Re: [HELP] C++ Problem with loads errors

Posted 09 March 2011 - 04:22 PM

Moved to CLI C++
Was This Post Helpful? 0
  • +
  • -

#3 mark103  Icon User is offline

  • D.I.C Head

Reputation: -1
  • View blog
  • Posts: 55
  • Joined: 13-April 08

Re: [HELP] C++ Problem with loads errors

Posted 22 March 2011 - 03:47 PM

please can someone help?????????????????
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1