• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 386
  • Last Modified:

GUI in dos

I want to make a windows like program under DOS,
does anyone know what are the simple operations which windows do?
example: MouseDrag, Click, DblClick, Dragable..... etc.
0
Kuoster
Asked:
Kuoster
1 Solution
 
hongjunCommented:
Sorry, I do not understand your question.

hongjun
0
 
KuosterAuthor Commented:
I meant what would I need to know in order to make a windows-like GUI under DOS(with mouse)??
0
 
KangaRooCommented:
Takin a risk here ;) Why would one try to do so? Wiuldn't it be easier to use Windows (or its equivalents on Mac, Unix etc)? And if it must be DOS, isn't a character based windowing system more appropriate (at least it would be fast)?
0
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

 
3dnowmanCommented:
Basically, you need to decide what behaviors of Windows you want to duplicate.

If all you care about is the appearance of Windows/MacOS then you'll be spending a lot of time make a 2D graphics API.  Primitives like draw rectangle, draw border, draw text, and so on.  You'll also need to write a window/rectangle manager.  For an example see: http://www.pobox.com/~qed/gui.zip

Regarding the mouse, keyboard and any other input devices, I suggest each have an ISR with a state-machine to know the immediate mode in which they are in (mouse is dragging with button down, user has shift key down, etc), and the resultant inputs (double click, Alt-F4 was pressed etc.) should be entered into a queue for each.  You'll need Ralph Brown's interrupt list to get started here if you don't already have it.  See http://www.pobox.com/~ralf

If you would like to actually execute MS Windows programs under DOS, that's not something I think that you can just DO.  However, http://wotsit.org might be a good place to start to figure out how the Windows .EXE and .DLL format works.  I would not recommend doing this.

Good luck
0
 
KuosterAuthor Commented:
Sorry to reject it... but I don't think those links work. The file 'gui.zip' isn't there.
0
 
3dnowmanCommented:
Sorry, its was a case error.  Try again.
0
 
nadtCommented:
Will a dos like environment do?  That is everything you do e.g. mouse functions, dialog boxes, buttons, menu bars.............. will have a feel of text environment.  It won't be as flashy as windows but workable.  also there is some disadv. of havin' it for free isn't it!! Tell me if u're interested.
0
 
dmaroffCommented:
You can use color text mode, which is not that hard to do, but there is a lot that goes into GUI programming than just what you see on the screen.  If you plan on doing any multi-tasking, threads, clipboard, etc. your in for a nice 5 year project at least!!  

Personally I would just write whatever your going to write using the Windows API.  Windows can be a little intimidating from a DOS programmer's point of view, but its well worth the aquired knowledge.  Come to think of it, The Windows OS is really quite easy to program for all the capabilties it gives you.  

However, if you just want to simulate some moveable windows and it must be in DOS, you might be able to do it using libraries such as "curses" which is used in Unix.  I think, its ported to many character based platforms including DOS.  In any case you should check into a pre-written library for such a purpose.  I once wrote a color text mode pseudo-GUI for a DOS based chess game using c++ with embedded assembly language and it was not pretty to code.  

Try to avoid assembly if possible!  Also check into Borland's BGI library for DOS.  It comes with all the Borland Turbo C++ compilers I think.

Good Luck,
-dmaroff
0
 
KuosterAuthor Commented:
I'm using TC++ in DOS is because I have to learn it for my IT.
I want to create a GUI in dos and using graphics mode is because I want to find a faster way of drawing under dos, and to  gain some mark for my IT this year. The only problem I have now is the GUI. I know how to detect MouseClick, Double Click, Drag...etc. But I don't know what to do when they're detected...
0

Featured Post

Firewall Management 201 with Professor Wool

In this whiteboard video, Professor Wool highlights the challenges, benefits and trade-offs of utilizing zero-touch automation for security policy change management. Watch and Learn!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now