summaryrefslogtreecommitdiff
path: root/ldmicro/ldmicro.cpp
diff options
context:
space:
mode:
authorRr422018-05-30 12:11:46 +0530
committerRr422018-05-30 12:11:46 +0530
commiteb8f6932fe45f550bc2b77c1b3e578884ed60d91 (patch)
tree47d47833c03a42ecbd3349c84dc3c0d81db863bf /ldmicro/ldmicro.cpp
parent5c01aef5fd87870b63511f17bd50405a0df08a3b (diff)
downloadLDMicroGtk-eb8f6932fe45f550bc2b77c1b3e578884ed60d91.tar.gz
LDMicroGtk-eb8f6932fe45f550bc2b77c1b3e578884ed60d91.tar.bz2
LDMicroGtk-eb8f6932fe45f550bc2b77c1b3e578884ed60d91.zip
Added message box functionality
Diffstat (limited to 'ldmicro/ldmicro.cpp')
-rw-r--r--ldmicro/ldmicro.cpp71
1 files changed, 34 insertions, 37 deletions
diff --git a/ldmicro/ldmicro.cpp b/ldmicro/ldmicro.cpp
index cc0a525..ca86246 100644
--- a/ldmicro/ldmicro.cpp
+++ b/ldmicro/ldmicro.cpp
@@ -30,7 +30,7 @@
#include <stdlib.h>
#include "ldmicro.h"
-#include "freeze.h"
+#include "freezeLD.h"
#include "mcutable.h"
#include "advanceddialog.h"
@@ -1051,44 +1051,11 @@ static BOOL MakeWindowClass()
//-----------------------------------------------------------------------------
// Entry point into the program.
//-----------------------------------------------------------------------------
-int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
- LPSTR lpCmdLine, INT nCmdShow)
+int main(int argc, char** argv)
{
- Instance = hInstance;
-
- MainHeap = HeapCreate(0, 1024*64, 0);
-
- MakeWindowClass();
- MakeDialogBoxClass();
- MakeAdvancedDialogClass();
- MakeAdvancedWorkspaceClass();
- MakeComponentListClass();
- MakeSmplDialogClass();
- MakeNamingListClass();
- HMENU top = MakeMainWindowMenus();
-
- MainWindow = CreateWindowEx(0, "LDmicro", "",
- WS_OVERLAPPED | WS_THICKFRAME | WS_CLIPCHILDREN | WS_MAXIMIZEBOX |
- WS_MINIMIZEBOX | WS_SYSMENU | WS_SIZEBOX,
- 10, 10, 800, 600, NULL, top, Instance, NULL);
- ThawWindowPos(MainWindow);
- IoListHeight = 100;
- ThawDWORD(IoListHeight);
-
- InitCommonControls();
- InitForDrawing();
-
- MakeMainWindowControls();
- MainWindowResized();
- NewProgram();
- strcpy(CurrentSaveFile, "");
-
// Check if we're running in non-interactive mode; in that case we should
// load the file, compile, and exit.
- while(isspace(*lpCmdLine)) {
- lpCmdLine++;
- }
- if(memcmp(lpCmdLine, "/c", 2)==0) {
+ if(argc >= 2) {
RunningInBatchMode = TRUE;
char *err =
@@ -1115,10 +1082,40 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
}
strcpy(CurrentCompileFile, dest);
GenerateIoList(-1);
- CompileProgram(FALSE);
+ CompileProgram(FALSE); /// Requires an open dialog to get file name
exit(0);
}
+ Instance = hInstance;
+
+ MainHeap = HeapCreate(0, 1024*64, 0);
+
+ // MakeWindowClass();
+ // MakeDialogBoxClass();
+ // MakeAdvancedDialogClass();
+ // MakeAdvancedWorkspaceClass();
+ // MakeComponentListClass();
+ // MakeSmplDialogClass();
+ // MakeNamingListClass();
+ HMENU top = MakeMainWindowMenus();
+
+ /// Make main window
+ // MainWindow = CreateWindowEx(0, "LDmicro", "",
+ // WS_OVERLAPPED | WS_THICKFRAME | WS_CLIPCHILDREN | WS_MAXIMIZEBOX |
+ // WS_MINIMIZEBOX | WS_SYSMENU | WS_SIZEBOX,
+ // 10, 10, 800, 600, NULL, top, Instance, NULL);
+ ThawWindowPos(MainWindow);
+ IoListHeight = 100;
+ ThawDWORD(IoListHeight);
+
+ InitCommonControls();
+ InitForDrawing();
+
+ MakeMainWindowControls();
+ MainWindowResized();
+ NewProgram();
+ strcpy(CurrentSaveFile, "");
+
// We are running interactively, or we would already have exited. We
// can therefore show the window now, and otherwise set up the GUI.