Thanks for your help Clairvoyant1332, I can see the problem is being fixed. Please could you help me with this as I have got an error.
Code:
mylangugages->SystemMenuinfo(MII, this->Handle);
Error: C2664: 'Languages::Languages::SystemMenuinfo' : cannot convert parameter 2 from 'System::IntPtr' to 'int'
Class Library:
Code:
public: void SystemMenuinfo(MENUITEMINFO ^menuinfotest, int hWindow) {
Microsoft::Win32::RegistryKey ^key1 = Microsoft::Win32::Registry::LocalMachine->OpenSubKey("Software\\MyApp\\Languages\\");
String ^value1 = nullptr;
if (key1 != nullptr)
{
value1 = (key1->GetValue("Test"))->ToString();
}
if (value1 == "French")
{
MENUITEMINFO ^MII = gcnew MENUITEMINFO();
int hMenu = GetSystemMenu(hWindow, 0);
MII->cbSize = Microsoft::VisualBasic::Strings::Len(MII);
String ^Text1 = nullptr;
MII->dwTypeData = "Restaurer";
MII->cch = MII->dwTypeData->Length;
MII->fMask = MIIM_STRING;
MII->wID = SC_RESTORE;
int RESTORE = SetMenuItemInfo(hMenu, MII->wID, false, MII);
MENUITEMINFO ^MII1 = gcnew MENUITEMINFO();
int hMenu1 = GetSystemMenu(hWindow, 0);
MII1->cbSize = Microsoft::VisualBasic::Strings::Len(MII1);
String ^Text2 = nullptr;
MII1->dwTypeData = "Bouger";
MII1->cch = MII1->dwTypeData->Length;
MII1->fMask = MIIM_STRING;
MII1->wID = SC_MOVE;
int MOVE = SetMenuItemInfo(hMenu1, MII1->wID, false, MII1);
MENUITEMINFO ^MII2 = gcnew MENUITEMINFO();
int hMenu2 = GetSystemMenu(hWindow, 0);
MII2->cbSize = Microsoft::VisualBasic::Strings::Len(MII2);
String ^Text3 = nullptr;
MII2->dwTypeData = "Taille";
MII2->cch = MII2->dwTypeData->Length;
MII2->fMask = MIIM_STRING;
MII2->wID = SC_SIZE;
int SIZE = SetMenuItemInfo(hMenu2, MII2->wID, false, MII2);
MENUITEMINFO ^MII3 = gcnew MENUITEMINFO();
int hMenu3 = GetSystemMenu(hWindow, 0);
MII3->cbSize = Microsoft::VisualBasic::Strings::Len(MII3);
String ^Text4 = nullptr;
MII3->dwTypeData = "Minimiser";
MII3->cch = MII3->dwTypeData->Length;
MII3->fMask = MIIM_STRING;
MII3->wID = SC_MINIMIZE;
int MINIMIZE = SetMenuItemInfo(hMenu3, MII3->wID, false, MII3);
MENUITEMINFO ^MII4 = gcnew MENUITEMINFO();
int hMenu4 = GetSystemMenu(hWindow, 0);
MII4->cbSize = Microsoft::VisualBasic::Strings::Len(MII4);
String ^Text5 = nullptr;
MII4->dwTypeData = "Maximiser";
MII4->cch = MII4->dwTypeData->Length;
MII4->fMask = MIIM_STRING;
MII4->wID = SC_MAXIMIZE;
int MAXIMIZE = SetMenuItemInfo(hMenu4, MII4->wID, false, MII4);
MENUITEMINFO ^MII5 = gcnew MENUITEMINFO();
int hMenu5 = GetSystemMenu(hWindow, 0);
MII5->cbSize = Microsoft::VisualBasic::Strings::Len(MII5);
String ^Text6 = nullptr;
MII5->dwTypeData = "Fermer Alt+F4";
MII5->cch = MII5->dwTypeData->Length;
MII5->fMask = MIIM_STRING;
MII5->wID = SC_CLOSE;
int CLOSE = SetMenuItemInfo(hMenu5, MII5->wID, false, MII5);
}
}
Do you know what variable that I need to make a change?
Thanks,
Mark