Code::Blocks

User forums => Help => Topic started by: Hachem on December 16, 2018, 02:46:36 pm

Title: WinAPI > Executing a program
Post by: Hachem on December 16, 2018, 02:46:36 pm
Hello,
i don't how to begin i've  a lot of problem and i've been searching for more than a month (everyday) i'm really tired so i'm gonna ask maybe some of you would help me and it will be really appreciated. Anyways i'm just gonna say one problem. I wanna execute a program from Window i mean u know with stdio.h normal C program i get the .exe file when i do my prog but in windows.h i don't get it the .exe file and idk where to type my prog.
I have feeling that it's something related  to createProcess function but i don't know how to use it and where to put the pogram. For now i just want that .exe file appears and it shows a simple second like printf. I hope that you got what i meant, i'm really in need of your help, thanks.
Title: Re: WinAPI > Executing a program
Post by: Pecan on December 16, 2018, 07:00:23 pm
Search the web for "CodeBlocks manual" or "CodeBlocks examples"

Examples:

http://www.sci.brooklyn.cuny.edu/~goetz/codeblocks/codeblocks-instructions.pdf

http://www.ntu.edu.sg/home/ehchua/programming/howto/CodeBlocks_HowTo.html

http://users.utcluj.ro/~jim/CP/Resources/Laboratory/CodeBlocks%20How%20to%20Use-2015.pdf

Title: Re: WinAPI > Executing a program
Post by: stahta01 on December 16, 2018, 07:07:51 pm
I would try to run the command below to figure where you set the working directory in Code::Blocks project.
Or just read the manual links posted above.

Code: [Select]
echo %CD%
Tim S.
Title: Re: WinAPI > Executing a program
Post by: Hachem on December 16, 2018, 08:16:00 pm
Thank your for replies but yeah i know the basics of Codeblocks i'm always using it but now i'm trying somethign new to create a window filled with programs etc. That's my project. It has to be in C and not C++. i made a window and attached to it some animations etc but the purpose of my project is missing which is executing programs like for example i want to enter some I/O like i want to read a variable N that's it for now but i don't actually know how to do.
When i execute my program a window appears i want now for example when i press Left arrow i get a a .exe file that tells me to enter a variable 'N'.
Conclusion: i want to combine a normal C program with my window. Hope that you get it, thank you for your help.
Title: Re: WinAPI > Executing a program
Post by: stahta01 on December 16, 2018, 08:54:42 pm
Please read and follow the rules for this website http://forums.codeblocks.org/index.php/topic,9996.0.html (http://forums.codeblocks.org/index.php/topic,9996.0.html)

I see no Code::Blocks question in your last post!

Tim S.
Title: Re: WinAPI > Executing a program
Post by: Hachem on December 16, 2018, 09:30:22 pm
ah, yeah i didn't notice the first rule. Ugh i'm just in need of someone's help thought that i can ask about it on this forum, cuz i can't find any useful one, thanks anyways...