dialog box in C...

Thread Solved

Join Date: Apr 2007
Posts: 53
Reputation: kxh29 is an unknown quantity at this point 
Solved Threads: 1
kxh29's Avatar
kxh29 kxh29 is offline Offline
Junior Poster in Training

dialog box in C...

 
0
  #1
Feb 1st, 2008
Hello All!

I am running AIX4.3 UNIX OS. I am developing using the C-Programming Language. I have inherited code which creates a dialog box.

  1. dialog(box_height, box_width, position_x, position_y, "message")

The requirement now, is to place a list of say numbers in the box and grow it
dynamically.

Problem is, when I attempt to print multiple strings of numbers with "newline" character, it
breaks up the integrity of the box. (..I have tried to voice this to my peers..)

Here is an example:

  1. dialog(10,20,30,40,"Promise Form Shipments:==> "
  2. "1111\n "
  3. "2222\n" "
  4. "3333\n "
  5. "4444\n");
  6.  

Yields this result:

+-------------------+
|Promise Form Shipme|
|nts:==> 1111
2222
3333
4444
| |
| |
+-------------------+

As opposed to this "single message" in quotes:

  1. dialog(10,20,30,40,"Shipments:==> ");

Which yeilds this:

+-------------------+
|Shipments:==> |
| |
| |
+-------------------+

(...the box is drawn correctly on the screen...)
Now, I think a couple of things are going on here.

1. I have never seen a dialog box in using C on a UNIX Platform
2. I think this is some type of NCURSES or other aftermarket implementation.
3. There is no mechanism to do this for multiple lines.
4. And of course, there is NO documentation on this dialog() function.

Can someone please give me some insight to this. As I mentioned previously, I do not think you can have multiple entries with this dialog() function. Your help is greatly appreciated!
"....We will add your Biological and Technological distinctiveness to our Own....Resistance is Futile....You will be Assimilated...."
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,339
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1460
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: dialog box in C...

 
0
  #2
Feb 1st, 2008
I don't see why someone couldn't write a function named dialog() for *nix -- it obviously is not the same as a MS-Windows DialogBox. Do you have to source code for that function? If not then your only recourse is to read the documentation, and you say there is none. If you are using some sort of GUI libraries such as QT then you will find the documentation at their web site.

>>I think this is some type of NCURSES or other aftermarket implementation.
Well, what are the libraries that your program has to link with? Those should tell you where the function is.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC