interphace graphique en C/c++ bloodshed dev c++
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 14 of 14

Thread: interphace graphique en C/c++ bloodshed dev c++

  1. #1
    Join Date
    Jun 2014
    Posts
    7

    interphace graphique en C/c++ bloodshed dev c++

    I'm not smart in graphic interface, can somebody help me to write a source code that creates menu browser/
    here is my small programme
    #include <istream>
    #include <stdlib.h>
    #include <string.h>
    #include <stdio.h>
    #include <math.h>
    #include <ctype.h>
    #include <sys\stat.h>
    #include <fcntl.h>
    #include <io.h>
    #include <conio.h>
    #include <errno.h>
    #include <cstring>
    #include <fstream>
    #include <windows.h>
    #include <unistd.h>
    //==============================================================
    int restart;
    char xfile[81];
    char xfile1[81];
    char code1[10000] = "0123456789";
    char next[10];
    char input[50] = "word1.doc";
    char output[50] = "word2.doc";
    unsigned char code,coded,recoded,unsigneddata,data,erase1 = 44;
    unsigned doublecode = 150;
    char lettre,size,bell1=07;
    char char1,choice1[1];
    FILE *text_file1 = NULL;
    FILE *text_file2 = NULL;
    int choice,len_input,len_output,flag;
    int n,n2,length_code, end_file;
    double length_file,max_size=3000000;
    //=====================
    inline void get();
    //==============================================================
    // this function gets the in put and output
    inline void get()
    {
    SYSTEMTIME t;
    GetSystemTime(&t);
    printf("%d-%d-%d %d:%d:%d \n",t.wDay,t.wMonth,t.wYear,t.wHour,t.wMinute,t.wSecond);

    start4:;
    printf ("====>minimum size 10 characters, maximum size 10000 characters \n");
    printf ("====>Type the vector then enter\n");
    fgets(code1, sizeof(code1),stdin);
    length_code = strlen(code1)-1;
    if ((length_code> 9)&& (length_code<10001)) {goto start2;};

    system("cls"); printf("\n");
    printf("====>The length of vector is equal to %d\n",length_code );
    printf("\n");
    goto start4;
    start2:
    choice = 0;
    printf("\n");printf("\n");
    printf ("====>Type 1 for process 1 or type 2 for process 2 and then enter\n");
    printf ("====>Type 3 to exit\n");
    scanf("%d", &choice);
    while (getchar()!= '\n');// empty buffer
    if ( choice == 1 ){goto ahead1;}
    if ( choice == 2 ){goto ahead1;}
    printf("\n");printf("\n");
    system("cls");
    printf("====>Wrong choice \n");
    goto start4;
    ahead1:
    //=========================================================
    start3:
    printf("\n");
    if (choice == 1)
    {
    printf ("====>Type the name of the input file, EXAMPLE name1.doc then enter\n");
    scanf("%s", &input);
    printf ("====>The name of the input is %s\n",input);
    };
    if (choice == 2)
    {
    printf ("====>Type the name of the output file, EXAMPLE name2.doc then enter\n");
    scanf("%s", &output);
    printf ("====>The name of the input is %s\n",output);
    };

    }
    //==============================================================
    // the main program
    //==============================================================
    int main()
    {
    printf("\n");
    printf("============================\n");
    printf("\n");
    printf("DESIGNED BY JOSEPH NDURIRI TOULOUSE FRANCE\n");
    printf("Email nduriri@voila.fr\n");
    printf("Phone +33(0)679922232 FRANCE\n");
    printf("\n");
    printf("============================\n");
    SYSTEMTIME t;
    GetSystemTime(&t);
    printf("%d-%d-%d %d:%d:%d \n",t.wDay,t.wMonth,t.wYear,t.wHour,t.wMinute,t.wSecond);
    start1:;
    get();
    printf("====>end ++++++++++++++++++++++++++++++++++\n");
    printf("====>To go on type a character to start once more\n");
    scanf("%s", xfile1);
    while (getchar()!= '\n');// empty buffer
    system("cls"); //clear screen
    goto start1;
    return 0;
    }

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,517

    Re: interphace graphique en C/c++ bloodshed dev c++

    First, please read Announcement: Before you post.... and learn how to use Code tags while posting code snippet. Without Code tags it is impossible to read/understand the code.
    Second, what do you mean by "graphic interface"? Nothing in your code snippet looks like something "graphical".
    Third, C++ is the language that allows you to write code without using goto and lables. So please, consider to rewrite it!
    Victor Nijegorodov

  3. #3
    Join Date
    Jun 2014
    Posts
    7

    Re: interphace graphique en C/c++ bloodshed dev c++

    Thanks

  4. #4
    Join Date
    Jun 2014
    Posts
    7

    Re: interphace graphique en C/c++ bloodshed dev c++

    Quote Originally Posted by VictorN View Post
    First, please read Announcement: Before you post.... and learn how to use Code tags while posting code snippet. Without Code tags it is impossible to read/understand the code.
    Second, what do you mean by "graphic interface"? Nothing in your code snippet looks like something "graphical".
    Third, C++ is the language that allows you to write code without using goto and lables. So please, consider to rewrite it!
    You know long time ago I used to program in basic language wheen I was young and there was alot of goto instructions

  5. #5
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,517

    Re: interphace graphique en C/c++ bloodshed dev c++

    Quote Originally Posted by nduriri View Post
    You know long time ago I used to program in basic language wheen I was young and there was alot of goto instructions
    Well I remeber the the epoch of basic!
    But now we are in the world of C++. So try to forget that goto ever existed!
    Victor Nijegorodov

  6. #6
    Join Date
    Jun 2014
    Posts
    7

    Re: interphace graphique en C/c++ bloodshed dev c++

    Quote Originally Posted by VictorN View Post
    Well I remeber the the epoch of basic!
    But now we are in the world of C++. So try to forget that goto ever existed!
    Thanks, do you have an example where I can create a window? Just to create a window with a screen where to type choices.
    Please help me. Thanks in advance

  7. #7
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,517

    Re: interphace graphique en C/c++ bloodshed dev c++

    Do you mean an example of some console application or the one with GUI?
    Victor Nijegorodov

  8. #8
    Join Date
    Jun 2014
    Posts
    7

    Re: interphace graphique en C/c++ bloodshed dev c++

    Quote Originally Posted by VictorN View Post
    Do you mean an example of some console application or the one with GUI?
    A console please of a code source under windows XP. please.
    Thanks in advance

  9. #9
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,517

    Re: interphace graphique en C/c++ bloodshed dev c++

    I do not develop console applications. Try to google for examples yourself.
    Victor Nijegorodov

  10. #10
    Join Date
    Dec 2012
    Location
    England
    Posts
    2,725

    Re: interphace graphique en C/c++ bloodshed dev c++

    Quote Originally Posted by nduriri View Post
    Thanks, do you have an example where I can create a window? Just to create a window with a screen where to type choices.
    Please help me. Thanks in advance

    I don't quite understand what you are after. If you want to create windows then you use the WIN32 STK API's or MFC or some other graphical/window package. If the application is a console program then you can use the console as a window by using the console set of API's. You can create 'windows' from a 'console' application but unless you have experience of the WIN32 STK I won't suggest it.

    Perhaps if you explained in more detail of what you are trying to achieve we may be able to advise further.
    All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.

  11. #11
    Join Date
    Jun 2014
    Posts
    7

    Re: interphace graphique en C/c++ bloodshed dev c++

    Quote Originally Posted by 2kaud View Post
    I don't quite understand what you are after. If you want to create windows then you use the WIN32 STK API's or MFC or some other graphical/window package. If the application is a console program then you can use the console as a window by using the console set of API's. You can create 'windows' from a 'console' application but unless you have experience of the WIN32 STK I won't suggest it.

    Perhaps if you explained in more detail of what you are trying to achieve we may be able to advise further.
    I want to write an application on crypting, if you have a small program on win32 please send me the copy

  12. #12
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,197

    Re: interphace graphique en C/c++ bloodshed dev c++

    Quote Originally Posted by nduriri View Post
    I want to write an application on crypting, if you have a small program on win32 please send me the copy
    What does that have to do with your original post? You really need to clarify, hopefully with more than one sentence, what it is you're really trying to do.

  13. #13
    Join Date
    Dec 2012
    Location
    England
    Posts
    2,725

    Re: interphace graphique en C/c++ bloodshed dev c++

    Crypting what? There are several 'free' encryption programs around that can be incorporated into your own program (eg see http://cboard.cprogramming.com/c-pro...fish-algo.html) for one example. I would strongly advise against writing your own crypting program from scratch. These crypting programs can be used with 'c' or 'c++' whether you use console, WIN32, gui etc.

    As GCDEF mentioned, you need to provide more detailed info about what it is you are trying to achieve.
    All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.

  14. #14
    Join Date
    Jun 2014
    Posts
    7

    Re: interphace graphique en C/c++ bloodshed dev c++

    Quote Originally Posted by 2kaud View Post
    Crypting what? There are several 'free' encryption programs around that can be incorporated into your own program (eg see http://cboard.cprogramming.com/c-pro...fish-algo.html) for one example. I would strongly advise against writing your own crypting program from scratch. These crypting programs can be used with 'c' or 'c++' whether you use console, WIN32, gui etc.

    As GCDEF mentioned, you need to provide more detailed info about what it is you are trying to achieve.
    My cryting is vectorial, the pass word can go up to 1 million alphanumeric characters. The pass is written in a texte file. There is no way of getting the pass word. Im waiting for the french authorities to get permission. My application can crypte any file .doc, .pdf, .jpg, audio or DVD. Its better than EFS. Wait Ill release it next year. Thanks for your reply

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center