Could not create process in borland compiler - c++

when i run the project(debug-> Run) it is giving an error in a pop up box having message "Could not Create the process". The project is created using borland C++ 4.52.can any one help me.
Thanks in advance.......

check these instructions:
Run Your Program
From the Menu Bar: Debug-Run
This will launch a window and run your program in it. After it finishes the window will go inactive and you will probably have to close it manually by clicking the 'x' icon in the upper right corner.
If the present window is one not your source code window - for instance, it will probably be the Message window after compiling and/or linking the program - then you will get a "Could not create process." error. This is because you are trying to execute the contents of a window that doesn't contain a program. Select the source code window and try again.
Source: http://www.dragonwins.com/courses/ECE1021/STATIC/LESSONS/IntroToTurboC.htm#Run%20Your%20Program

Related

Image Magick++ close .display() Popup window by command

in documentation of Magick++ I found the command to display an image
Image temp_image(my_image);temp_image.display(); // display 'my_image' in a pop-up window
this works quite well, but I can find a command to close this window by code.
My goal is to open a window with the image, give image new name by commandline input, then automatically close the window, and show next image to rename.
Although the new popup-window sets the "active window" to it's self.
For entering some input to command line (e.g. new_name), I have to click again at the terminal window.
My (pseudo)code at the moment:
for(all_images){temp_image.display(); renaming_method();}
just now I have to close the upcoming window manualy by hand, better would be something like
for(all_images){temp_image.display(); renaming_method(); temp_image.display_close();}
do you have any ideas how to do this?
Magick++, and ImageMagick, doesn't have any methods to manage active display windows. You can roll your own XWindow method, but most projects I've seen just do the following routine...
Write temporary image
Ask OS to open temporary file by forking a process & calling xdg-open, open, or start commands (depending on OS).
Send SIGINT to pid when user wishes to close child process.
Clean-up any resources
Not ideal, but will get you roughly there.

How to hide console window while opening hidden COM object using C++?

I am new to C++ so please be gentle. So i created a small C++ script which will be a part of a larger program. It creates an invisible window and navigates to home. While that part is done, it always creates a console window when it finishes execution and then in less than a second it vanishes. What do i need to change in order to make the program work in a way that the console window won't open ?
Instead of compiling as a console application, compile as a windows desktop project. Then convert main to be WinMain

Get output of c++ program in fullscreen.It is a console output window targeted code

I use Windows 7 Ultimate.I set the CMD on pc to almost fullscreen(changed the properties from cmd title bar).Though taskbar is visible , it is the maximum fullscreen possible on Windows 7,I suppose.
I wrote code for a small command line user interface game.I've made a mistake by assuming the output screen to be maximized on every user's PC.
So,when I run it on another windows 7 machine,I'm getting weird output as the cmd screen is not maximized on their PC.
How can I ensure that I get the cmd screen set to fullscreen(almost fullscreen) on every PC it runs?
Can I call some functions in my code?
Or any other way?
I like to share it(the .exe file of my code) on the internet.So, how I can I fix this.
What you have to do is run the program and change the settings in that specific command window, not the default settings for your command window. You could do this with code as well, although I don't know how, but this is much easier. Then whenever that program is ran it should override the users default command settings and adhere to your program's.
Here's a similar answer of mine to another question about command colors. Same solution should work here.

How do I open a new window on start up using C++?

I don't know how to make a window when I start up Windows. I just want a simple window that has some text in it, such as a reminder. I don't want to download anything, and I think C++ is the easiest way to do it.
The easiest way to display a window with a message in Windows would be use use VBScript. Create a text file with the following in it.
msgbox("hello world")
Now, name the file MyProgram.vbs or anything else with a .vbs extension.
Double click on the file to run it. The message "hello world" should be shown in a small window on your screen. As seen in the image below.
To run it at start up, just drag it in your Startup folder in your Start Menu.

How do I link C++ (Visual Studio 2010) to an image-outputting event listener?

I am writing a very simple program in C++ that listens to keyboard input, but what I want to output is much more difficult than I expected. For every key I press, I want an image (specific to the key) to appear on the screen. For example, let's say if I press the "O" key, an image of Earth appears on my screen.
What's the best way to achieve this? Thanks!
This is possible with layered windows. I have created a Win32 project as a demo. You can find the code and explanations here.
Basically you have to:
handle the WM_CHAR message and load the appropriate image (from resources or from disk)
create a layered window and display the loaded image in that window
if you want to automatically close the window after an given interval after the last key was pressed you have to create a timer and in the timed procedure destroy the window
Check my link for a solution to your problem.