Hi, i´ve been studying WinApi for some time now, and have actually managed to create some stuff in c++ with Visual 2010 Express.
Now, after creating my Menu, I wanted one of its functions to open a Form i've inserted through "Add New Item -> Windows Form".
The problem is, I've searched all Petzold's book and did some googling but didn´t find the actual function to open the Form.
I wanted something like:
case IDM_RUNSIM:
{
// When clicked, opens a new dialog box with some stuff in it...
DialogBox (hInst, MAKEINTRESOURCE(IDD_RunSimDialogBox), hWnd, SimBoxDlgProc) ;
}
break;
But not for a dialog box, which is declared above.
Also, when I inserted the form, it created its own Form1.h and Form1.cpp, but when I tried to #include "Form1.h" on my main.cpp, the compiler went batshit insane with lots of errors about "namespace", which do not appear when creating a Form in a project from scratch... So, do I have to Include form1.h or not in the main code?