Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
14
Task/Hello-world-Graphical/C/hello-world-graphical-1.c
Normal file
14
Task/Hello-world-Graphical/C/hello-world-graphical-1.c
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#include <gtk/gtk.h>
|
||||
|
||||
int main (int argc, char **argv) {
|
||||
GtkWidget *window;
|
||||
gtk_init(&argc, &argv);
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Goodbye, World");
|
||||
g_signal_connect (G_OBJECT (window), "delete-event", gtk_main_quit, NULL);
|
||||
gtk_widget_show_all (window);
|
||||
|
||||
gtk_main();
|
||||
return 0;
|
||||
}
|
||||
6
Task/Hello-world-Graphical/C/hello-world-graphical-2.c
Normal file
6
Task/Hello-world-Graphical/C/hello-world-graphical-2.c
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#include <windows.h>
|
||||
|
||||
int main(void) {
|
||||
MessageBox(NULL, TEXT("Goodbye, World!"), TEXT("Rosetta Code"), MB_OK | MB_ICONINFORMATION);
|
||||
return 0;
|
||||
}
|
||||
20
Task/Hello-world-Graphical/C/hello-world-graphical-3.c
Normal file
20
Task/Hello-world-Graphical/C/hello-world-graphical-3.c
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#include <os2.h>
|
||||
|
||||
int main(void) {
|
||||
HAB hab;
|
||||
HMQ hmq;
|
||||
|
||||
hab = WinInitialize(0);
|
||||
hmq = WinCreateMsgQueue(hab, 0);
|
||||
|
||||
WinMessageBox(HWND_DESKTOP,
|
||||
HWND_DESKTOP,
|
||||
"Hello, Presentation Manager!",
|
||||
"My Program",
|
||||
0L,
|
||||
0L);
|
||||
|
||||
WinDestroyMsgQueue(hmq);
|
||||
WinTerminate(hab);
|
||||
return 0;
|
||||
}
|
||||
23
Task/Hello-world-Graphical/C/hello-world-graphical-4.c
Normal file
23
Task/Hello-world-Graphical/C/hello-world-graphical-4.c
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#include <conio.h>
|
||||
#include <graphics.h>
|
||||
|
||||
int main(void) {
|
||||
int Driver = DETECT, Mode;
|
||||
int MaxX, MaxY, X, Y;
|
||||
char Message[] = "Hello, World!";
|
||||
|
||||
initgraph(&Driver, &Mode, "");
|
||||
|
||||
MaxX = getmaxx();
|
||||
MaxY = getmaxy();
|
||||
|
||||
settextstyle(SANS_SERIF_FONT, HORIZ_DIR, 7);
|
||||
|
||||
X = (MaxX - textwidth(Message)) >> 1;
|
||||
Y = (MaxY - textheight(Message)) >> 1;
|
||||
outtextxy(X, Y, Message);
|
||||
|
||||
getch();
|
||||
closegraph();
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue