in order to separate the User Interface class (a Windows Forms class) from the rest of the program, I am trying to call windows forms methods from int WINAPI WinMain ()
for instance, I am trying to do the following:
int WINAPI WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
Application::EnableVisualStyles();
UserInterface1 ^myInterface = gcnew UserInterface1();
String ^ picture1 = "img1";
String ^ picture2 = "img2";
Application::Run(myInterface);
Bitmap^ B = gcnew Bitmap (512,512);
//user defined class that reads an image from a file
PImage PI(picture1);
//a Windows Forms method that updates the image displayed in a pictureBox element
myInterface->ModifyDisplay (B, PI);
//user defined class that reads an image from a file
PImage PI2(picture2);
//a Windows Forms method that updates the image displayed in a pictureBox element
myInterface->ModifyDisplay (B, PI2);
return 0;
}
Needless to say, it is not working the way it is now and I am not sure if what I am trying to do is feasible or not, as I am fairly new to .Net programming.