Pelles C forum

C language => Beginner questions => Topic started by: fopetesl on March 17, 2016, 11:57:52 AM

Title: MDIwiz.dll error extracting (no WIN32 GUI Wizard)
Post by: fopetesl on March 17, 2016, 11:57:52 AM
Complete newb to Pelles C :(

I'm trying to create a Wn 7 GUI using tips from http://www.winprog.org/tutorial/start.html (http://www.winprog.org/tutorial/start.html)
This instruction is specific
Code: [Select]
Make sure you have specified a Win32 GUI (NOT "Console") project/makefile/target, whatever applies to your compiler.
So in the IDE create project there seems no Win32 GUI wizard and if I attempt to include <windows.h> the compiler spits the dummy.
So, OK, I need the MDI wizard? Download MDIwiz.zip and it barfs trying to extract MDIwiz.dll. That's with 7z and Winzip.

Seems I need some hand holding  :P

Edit.  This is becoming something of an issue.  I noticed a created project HelloWorldGui.ppj. Attempting to open it threw a file location error. So I copied C file into projects folder then edited ppj to read C file there.
Doesn't seem to work since I cannot add C_HelloWorld.c to project.
Title: Re: MDIwiz.dll error extracting (no WIN32 GUI Wizard)
Post by: DMac on March 18, 2016, 04:01:09 AM
Try the following:

Open Pelles C.
Then click File>New>Project.
In the project dialog choose "Windows Application Wizard" and then type a name in the name field ie: "MyAwsomeApp".  In the Location window make sure that the project will be placed in the Pelles C Projects folder.  Then click OK.
Follow the remaining wizard prompts.  The resulting project will be configured to compile correctly.
Title: Re: MDIwiz.dll error extracting (no WIN32 GUI Wizard)
Post by: fopetesl on March 18, 2016, 09:47:40 AM
OK, MDmac, that works.
However, for others maybe, because MDIwiz was not in ..\Wizards but in \AppData\.. I hand copied it across.
Reloaded PellesC and the MDIwizard appeared as a choice.  And worked  :)

Now, can you help with this...
I have a C program written two+ years ago and compiled in LINUX gcc.
It is a pure data processing function. No graphics, only file input and output.
How do I pull into PellesC and compile?

Thanks for you help, BTW ;)
Title: Re: MDIwiz.dll error extracting (no WIN32 GUI Wizard)
Post by: DMac on March 20, 2016, 06:27:19 PM
When I port code into a Pelles C project, I usually start by creating the project and then adding the original source files to it.  I then attempt to compile and address the errors starting with the first two or three and recompile.  I repeat this process until the project compiles.

If it is a GUI project and uses GTK and I wanted it to be windows native, then I would start by designing the GUI in the dialog editor and handling the messages in the callback.

Not knowing specifics about your project, this is the only advice I can give.
Title: Re: MDIwiz.dll error extracting (no WIN32 GUI Wizard)
Post by: fopetesl on March 21, 2016, 02:52:19 PM
Thanks again, DMac.

No GUI, no human interaction with this program.
Just read data in, process, spit results into file.

But I will follow your advice.
Title: Re: MDIwiz.dll error extracting (no WIN32 GUI Wizard)
Post by: TimoVJL on March 22, 2016, 08:58:44 AM
No GUI, no human interaction with this program.
Just read data in, process, spit results into file.
Code: [Select]
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow)
{
return 0;
}
If someone save this to a file and press Ctrl+B or compile button and select Win32 Program (EXE), someone can have a empty non-console Windows-program.