Dos Gui

This is a discussion on Dos Gui within the C++ Programming forums, part of the General Programming Boards category; I want to create pseudo-wordstar/turboc++ like GUI... Anyone got an idea on how to do this? I can't find the ...

  1. #1
    Registered User
    Join Date
    Mar 2006
    Posts
    4

    Dos Gui

    I want to create pseudo-wordstar/turboc++ like GUI... Anyone got an idea on how to do this? I can't find the right library for it.

    I'n using dev c++ and can't use graphics.h

  2. #2
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,069
    There's no real portable way to move about the screen in DOS, so the best bet for you on Dev-C++ is most likely windows.h. I believe they have a gotoxy() implementation for you to use, otherwise, I would say conio.h, which Dev-C++ doesn't have a full version of, so you'd have to go fishing the internet for that gotoxy() implementation. If you want non console UI, then you'll have to look for a free graphics library online.
    Last edited by SlyMaelstrom; 06-11-2006 at 03:59 AM.
    Sent from my iPad®

  3. #3
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,590
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  4. #4
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,487
    You can also use Conio2. It adds to minGW's implementation of conio.

    EDIT: Edited after I noticed Salem's post.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  5. #5
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,069
    I've never used CURSES. I think I'll try it seeing as to how promoted it is.
    Sent from my iPad®

  6. #6
    Registered User
    Join Date
    Mar 2006
    Posts
    725
    Gotoxy:

    Code:
    #include <windows.h>
    
    void gotoxy(int x, int y)
    {
    	COORD coord;
    	coord.X = x;
    	coord.Y = y;
    	SetConsoleCursorPosition(
    		GetStdHandle(STD_OUTPUT_HANDLE), coord);
    }
    I dug this up from a site somewhere. It should work if you don't already have gotoxy().
    Code:
    #include <stdio.h>
    
    void J(char*a){int f,i=0,c='1';for(;a[i]!='0';++i)if(i==81){
    puts(a);return;}for(;c<='9';++c){for(f=0;f<9;++f)if(a[i-i%27+i%9
    /3*3+f/3*9+f%3]==c||a[i%9+f*9]==c||a[i-i%9+f]==c)goto e;a[i]=c;J(a);a[i]
    ='0';e:;}}int main(int c,char**v){int t=0;if(c>1){for(;v[1][
    t];++t);if(t==81){J(v[1]);return 0;}}puts("sudoku [0-9]{81}");return 1;}

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. DOS GUI or graphic programming using C
    By draggy in forum C Programming
    Replies: 8
    Last Post: 04-27-2006, 12:11 PM
  2. Gui Programme does'nt Compiles from DOS
    By Shadowhunt in forum C++ Programming
    Replies: 1
    Last Post: 06-06-2003, 08:05 AM
  3. Simple C++ GUI programme does'nt run from dos
    By Shadowhunt in forum C++ Programming
    Replies: 4
    Last Post: 05-31-2003, 05:30 AM
  4. DOS / Linux Console based GUI?
    By mart_man00 in forum C Programming
    Replies: 3
    Last Post: 09-14-2002, 12:46 AM
  5. GUI For DOS
    By Sunny in forum A Brief History of Cprogramming.com
    Replies: 28
    Last Post: 02-01-2002, 09:07 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21