Resx file not loaded

Im using C++ 17 to create a Windows Forms application, everything runs ok until i try to load an image from .resx file. This file is created by visual studio when i load the image into the designer.
I used this to setup the project

this is the Window…


void InitializeComponent(void)
{
        System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(Splash::typeid));
        this->pictureBox1 = (gcnew System::Windows::Forms::PictureBox());
        (cli::safe_cast<System::ComponentModel::ISupportInitialize^>(this->pictureBox1))->BeginInit();
        this->SuspendLayout();
        // 
        // pictureBox1
        // 
        this->pictureBox1->Dock = System::Windows::Forms::DockStyle::Fill;
        this->pictureBox1->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"pictureBox1.Image")));
        this->pictureBox1->Location = System::Drawing::Point(0, 0);
        this->pictureBox1->Name = L"pictureBox1";
        this->pictureBox1->Size = System::Drawing::Size(880, 129);
        this->pictureBox1->TabIndex = 0;
        this->pictureBox1->TabStop = false;
        this->pictureBox1->WaitOnLoad = true;
        // 
        // Splash
        // 
        this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
        this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
        this->ClientSize = System::Drawing::Size(880, 129);
        this->ControlBox = false;
        this->Controls->Add(this->pictureBox1);
        this->MaximizeBox = false;
        this->Name = L"Splash";
        this->SizeGripStyle = System::Windows::Forms::SizeGripStyle::Hide;
        this->StartPosition = System::Windows::Forms::FormStartPosition::CenterScreen;
        this->TopMost = true;
        (cli::safe_cast<System::ComponentModel::ISupportInitialize^>(this->pictureBox1))->EndInit();
        this->ResumeLayout(false);
}

This is the error message:
System.Resources.MissingManifestResourceException: 'No se encontraron recursos adecuados para la referencia cultural especificada o para la referencia cultural neutra.

Leave a Comment