My win32 program has become a little to large to keep in one main file. My plan is to split the code into three files, a main file for the procs, a file to handle files and a file to handle fonts. I'm having trouble splitting the file though, i dont know how i should include them in order for them to act as one main file. For example some of my main:
#include <iostream>
#include <windows.h>
#include "resource.h"
#include <commctrl.h>
#include "hideconsole.h"
#define IDC_MAIN_MDI 101
#define IDC_MAIN_TOOL 102
#define IDC_MAIN_STATUS 103
#define IDC_CHILD_EDIT 101
#define ID_MDI_FIRSTCHILD 50000
const char szClassName[] = "MainClass"; //window class
const char szChildClassName[] = "ChildClass"; //child class
HWND g_hMDIClient = NULL;
HWND g_hMainWindow = NULL;
//functions and procs for windows
how should i separate these files? i tried before but i couldnt wrap my head around getting all of the files to have access to mains variables. Could anyone give me some pointers? thanks!