Ive written a program(C) and need advice on how to change the user interface

Associate
Joined
14 Jan 2003
Posts
200
Location
NW
Ive written an encryption/ decryption program using C where the user logs in entering a username and password which is encrypted using SHA-1. The user is given the option to encrypy/decrypt files using 3DES-ECB or AES and also to share the files with another user (using RSA).

But what i wouldnt mind learning because ive never done it before is instead of the user inputting the info in the usual ms DOS prompt which ive always used is to make it a more professional looking and user friendly interface like the windows forms etc. i.e the type you see when you log into web sites etc, to be honest im not too sure what there called.

This is for a uni project ive been given and ive written it in C, any ideas? how should i go about this? there any webbies/programs out there? books i should read etc, reason i ask is because i have to give a demonstration to the supervisor and want to stand out from the rest :p

Tour
 
The easiest way to build a windows GUI is to use .net 2.0 and write it in C#. All of your algorith work for the encryption / decryption can be re written there. Toddle off to msdn.microsoft.com and download the Visual C# express edition. Robert's your mum's brother.

You can build GUIs in ANSI C but you'd be bettter off going for a modern OO language with easy to use libraries for managing the vatious windowing widgets that you need (buttons, forms etc). C# shouldn't be difficult for you if you know C.

HT
 
happytechie is bang on there, c# and .net is the way to go these days.

but it is possible to do what you're wanting from c.
it was the norm to do it that way a (good) while ago.

the basic idea is that the operating system (microsoft windows) can be asked to do things. ie, your c program can ask windows to throw up a dialog box (or pretty much any other type of windows UI furniture) on your programs behalf. you can specify what it looks like and once created you can ask it to tell you for example, what the user has just typed into an edit box.

just bear in mind that doing all this from c will be a bit long winded (require many more lines of code and be a bit more complex to get your head around) than doing the same thing from c# / .net

and then go read this tutorial anyway.

it should give you an intro as to how to do what you want from C if you're still keen.

:)
 
Last edited:
Cheers guys, ive been lookin into it.. pretty niave didnt realise it'd be a whole new ball game, anyway ive been lookin around .net and had a look at that link found some useful stuff cheers. Better get off and learn some of this C# stuff aswell...
 
There are windowing toolkits that will let you write them in C (try Motif for starters) but I'd still recomend going .net and C# and it is just 10000 time easier than writing windows code in C (or C++ for that matter)

HT
 
JonD said:
Does anyone know how to make GUI's in linux? I cant find any decent tutorials. Thx

wxWidgets and your language of choice is a pretty safe bet, unless your language of choice is Java; in that case, just use Swing/SWT/AWT/whatever.
 
Back
Top Bottom