This template you can have link list/string/fstream
Without the errors.
this goes on Dave Burford example of mfc, but I have fixed the project, Because in his example you can't have this. If the template does not work please respond.
#include "DarkGDK.h"
#include "resource.h"
#include "globstruct.h"
#include "stdio.h"
#include<list>
using namespace std;
list<int> alist;
void pushback()
{
alist.push_back(1);
}
//========================
// Function Prototypes
//========================
LRESULT APIENTRY MainWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
BOOL CALLBACK AboutProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam);
BOOL CALLBACK TestProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam);
void PaintScreen();
//========================
// Global Variables
//========================
#ifdef STRICT
WNDPROC lpPrevWndProc;
#else
FARPROC lpPrevWndProc;
#endif
bool Exit = false;
bool MenuItemTicked = true;
bool DialogChecked = false;
char DialogText[256];
int DialogNumber = 0;
HMENU MyMenu;
HBITMAP MyBitmap = NULL;
//========================
// Main entry function
//========================
void DarkSDK(void) {
dbSyncOn();
dbSyncRate(0);
MyMenu = LoadMenu(NULL, MAKEINTRESOURCE(IDR_MENU1));
lpPrevWndProc = (WNDPROC) SetWindowLong(g_pGlob->hWnd, GWL_WNDPROC, (LONG)MainWndProc);
if (!MyMenu) {
MessageBox(NULL, "Fatal Error! Could not load the menu resource!","*",MB_OK);
return;
}
SetMenu(g_pGlob->hWnd, MyMenu);
sprintf(DialogText, "This is some text.");
while (LoopSDK()) {
if (dbEscapeKey() || Exit)
return;
if (dbSpaceKey())
DialogBox(NULL, MAKEINTRESOURCE(IDD_TEST), g_pGlob->hWnd, (DLGPROC)TestProc);
PaintScreen();
dbSync();
}
}
//========================
// Function to draw the
// contents of the screen
//========================
void PaintScreen() {
dbCLS();
char tempchar[100];
if (MenuItemTicked)
dbText(10, 10, "Woo! Im ticked!");
dbText(10,20,itoa(DialogNumber,tempchar,10));
dbText(10,30,DialogText);
}
//========================
// Window message handler
// For the menu.
//========================
LRESULT APIENTRY MainWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
....
Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps. Developed the tiled map engine seen on the showcase. Veteran for the military.