From 4d95c5cdaa720c5207a5f5b0d97a884a7ed1a3ab Mon Sep 17 00:00:00 2001 From: Ian C Date: Mon, 18 Apr 2005 01:01:56 +0000 Subject: Added core of group explode. Also fixed modal windows as well as can be done with MS. --- opengl/main.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'opengl/main.cpp') diff --git a/opengl/main.cpp b/opengl/main.cpp index 82bf991..7ded832 100644 --- a/opengl/main.cpp +++ b/opengl/main.cpp @@ -41,6 +41,10 @@ static int Execute(msModel* model) W32DLib::Common::Initialise(); W32DLib::Common::MessageTitle("Simple OpenGL"); + // Unfortunately this is the best you can hope for with Milkshape... + // + HWND parent=GetForegroundWindow(); + if (!model) { return -1; @@ -48,17 +52,17 @@ static int Execute(msModel* model) if (msModel_GetMeshCount(model)<1) { - W32DLib::Common::Error(NULL,NULL,"No meshes in the model!"); + W32DLib::Common::Error(parent,0,"No meshes in the model!"); return 0; } Generate gen(model); GLDialog dlg(gen); - if (dlg.ShowModal(W32DLib::Common::GetInstance(),NULL)==IDOK) + if (dlg.ShowModal(W32DLib::Common::GetInstance(),parent)==IDOK) { SetCursor(LoadCursor(NULL,IDC_WAIT)); - gen.MakeFiles(); + gen.MakeFiles(parent); SetCursor(LoadCursor(NULL,IDC_ARROW)); } -- cgit v1.2.3