473,466 Members | 1,393 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Console unterdrücken

Hi,

ich habe gerade angefangen mit C++.
So, ich habe mal zum testen eine simple Codezeile geschrieben die unter
Windows nur
ein Hinweis-Fenster öffnen soll.

Das funktioniert auch, jedoch öffnet sich beim Programmstart erst die
Console (ohne Prompt) und gleichzeitig erscheint auch das
Hinweisfenster.

Wie kann ich die Console unterdrücken?

Hier mein Code:

#define STRICT
#include <windows.h>

const char info[] = "Dies ist ein Hinweis";

int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR szCmdLine, int iCmdShow)
{
int iAntwort = MessageBox(NULL, info, "Hinweis",
MB_ICONINFORMATION | MB_OK | MB_DEFBUTTON1);

return 0;
}
Als IDE benutze ich Bloodshed Dev-C++

Danke und Gruss,
Michaela

Jul 23 '05 #1
3 2553
Hello Michaela,

Althoug this is not the right group for this question (C++ language
group - not a C++ ms-windows development group - in the English
language) you should try to start in the bloddshed GUI with an empty
project, choose a basic windows application. This will set everything
up for you, then paste your code into it and compile/run it

Jul 23 '05 #2
Michaela Martens wrote:

Hi,

ich habe gerade angefangen mit C++.
So, ich habe mal zum testen eine simple Codezeile geschrieben die unter
Windows nur
ein Hinweis-Fenster öffnen soll.

Das funktioniert auch, jedoch öffnet sich beim Programmstart erst die
Console (ohne Prompt) und gleichzeitig erscheint auch das
Hinweisfenster.
Please note:
This is an english speaking newsgroup.
If your english is not good enough you might try
de.comp.lang.iso-c++
which speaks german.

But note: You question has nothing to do with C++ as defined
as language. Your question is a question dedicated to programming
Windows using a specific C++ compiler. This is not topical in either
this group or in the german newsgroup. Your best bet is to find a
newsgroup which deals with your specific compiler, since this is
what your question is all about: How to configure my compiler such
that a console window does not pop up at program startup.

Als IDE benutze ich Bloodshed Dev-C++


I have no idea if there is a newsgroup for that particular compiler.
But starting with a windows programming group would certainly be a good
idea.
--
Karl Heinz Buchegger
kb******@gascad.at
Jul 23 '05 #3

"Michaela Martens" <m.***********@arcor.de> schrieb:

ich habe gerade angefangen mit C++.
So, ich habe mal zum testen eine simple Codezeile geschrieben die
unter
Windows nur
ein Hinweis-Fenster öffnen soll.

[....]
Thank you very much for your feedback. Oh i see, a english only
newsgroup.
And its also right that my problem is not really the c++ language, its a
c++ windows compile problem (not really a problem now).

Ok,
i'll now post here pure c++ postings...

Have a nice day...

Michaela

Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: Dave | last post by:
Hi, I have done some research, trying to Clear The Screen in java code. The first option was the obv: system.out.print("\n\n\n\n\n\n\n\n\n\n\n\n"); then i heard about this method:...
1
by: Oz | last post by:
This is long. Bear with me, as I will really go through all the convoluted stuff that shows there is a problem with streams (at least when used to redirect stdout). The basic idea is that my...
7
by: shawnk | last post by:
Hello Everyone How do you format format numbers right-justified using Console.WriteLine(), i.e I need to line up numbers in vertical columns and the MSDN documentation is pretty poor Here is the...
5
by: Barry Mossman | last post by:
Hi, can I detect whether my class is running within the context of a Console application, vs say a WinForm's application ? also does anyone know whether the compiler or runtime is smart enough...
5
by: Publicjoe | last post by:
I am working on a little app which uses colour in the console window. I have created a class to extend the console functionality but the ClearScreen method does not work correctly. I am enclosing a...
17
by: MumboJumbo | last post by:
Hi I have a really basic question hopefully some can help me with: Can you write a (i.e. one) C# project that works from the cmd line and gui? I seems if i write a GUI app it can't write to...
5
by: portroe | last post by:
Hi I am using console.Writeline in my simple program. I do not however see anything happening in the output window when I debug, there are also no error messages, Has anybody a tip on what...
6
by: tony | last post by:
Hello! When you have windows forms you have the same possibility as when you have a Console application to use Console.Writeln to write whatever on the screen. Now to my question: Is it...
1
by: John Wright | last post by:
I am running a console application that connects to an Access database (8 million rows) and converts it to a text file and then cleans and compacts the database. When it runs I get the following...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.