1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Skinned Program

Discussion in 'C' started by obduk, May 10, 2007.

  1. obduk

    obduk New Member

    Joined:
    Mar 19, 2007
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    0
    I want to create a program that is skinned, i.e. it would look like MSN messenger / iTunes on Windows. What would be the best way of creating a skinned application in C++.

    The program needs to be able to run on Windows, Linux, and possibly Mac OS.

    The program would also include some lists etc, so not just static images.

    Thank you,

    Owen
     
  2. DaWei

    DaWei New Member

    Joined:
    Dec 6, 2006
    Messages:
    835
    Likes Received:
    5
    Trophy Points:
    0
    Occupation:
    Semi-retired EE
    Location:
    Texan now in Central NY
    Home Page:
    You need a cross-platform graphics library. Look at OpenGL and appurtenances, wxWidgets, etc. As for the portability of the rest of your code, that's in your hands.
     
  3. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,285
    Likes Received:
    364
    Trophy Points:
    83
    First thing is as you would like to have a window program with GUI you need to have the differently done the Gui for each OS. The business logic can be same for each of them. For Windows you can refer to [thread=937]Seperate resource into a seperate DLL [/thread].
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,285
    Likes Received:
    364
    Trophy Points:
    83
    That was quick.
     
  5. DaWei

    DaWei New Member

    Joined:
    Dec 6, 2006
    Messages:
    835
    Likes Received:
    5
    Trophy Points:
    0
    Occupation:
    Semi-retired EE
    Location:
    Texan now in Central NY
    Home Page:
    I had an extra jolt of coffee this morning ;).
     
  6. obduk

    obduk New Member

    Joined:
    Mar 19, 2007
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    0
    I have looked into wxWidgets, and apparently that can't really do it ("strongly advised against").

    I have had a bit of experience with openGL combined with GLUT, so I guess that's what I'll look into unless people have any other suggestions.

    As for the portability of the code, I am aware of the implications of running applications on multiple platforms.

    Thank you for your sugestions
     
  7. DaWei

    DaWei New Member

    Joined:
    Dec 6, 2006
    Messages:
    835
    Likes Received:
    5
    Trophy Points:
    0
    Occupation:
    Semi-retired EE
    Location:
    Texan now in Central NY
    Home Page:
    When I say "portable code" I am referring to source portability. Ultimately, the code is turned into machine language for a specific microprocessor type. That code will not run on another microprocessor unless that microprocessor is solidly compatible with the original type. That is a very, very rare circumstance.

    Source portability means that you can take your source code to another machine and compile it there. The new, correct machine code will then be emitted.

    Even when machines have the same microprocessor, the code may not be portable. There are implementation-specific ways to talk to the hardware. One keyboard is not like another. One display is not like another. This is why our machines have very specific drivers. If your compiler does not have access to the means of correctly addressing these drivers, the code will not be portable.

    Languages are not built to address specific sets of hardware and OSes. They are built to solve common problems. They address SPECIFIC issues only because the language writers have written NONSTANDARD libraries which deal with all that.

    Bottom line: take "explorer.exe" from a Windows machine and try to run it on a Mac. At best, it just won't work. At worst, it may turn the machine into a molten slag heap. Don't bill me for the damage: you have been warned.
     
  8. obduk

    obduk New Member

    Joined:
    Mar 19, 2007
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    0
    Thank you for your quick responses.

    I am aware of the implications of machine specific code etc etc.

    I have already written software which has almost no differences in the C source code between the linux and windows versions, I then compile it using GCC on linux, and GCC MinGW for windows. I have yet to write any programs for Mac, I dont even own one (or installed MacOS on a PC).

    Back to the original notion, could you elaborate on the OpenGL concept for creating a skinned GUI.

    Thanks
     
  9. DaWei

    DaWei New Member

    Joined:
    Dec 6, 2006
    Messages:
    835
    Likes Received:
    5
    Trophy Points:
    0
    Occupation:
    Semi-retired EE
    Location:
    Texan now in Central NY
    Home Page:
    Elaborate in what respect? You can't expect the users to write your skins for you. It's all they can accomplish to type "LOLZZZZ!!!!!111111".
     
  10. obduk

    obduk New Member

    Joined:
    Mar 19, 2007
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    0
    Sorry, I shall explain better, I am definitely not wanting people to do work for me.

    I was just wandering if you could give a general idea.

    For exaple, as I understand, would I have to create a load of bitmaps, then use openGL's 2D drawing capabilities to draw them to screen, then maybe use some function in the Glut Libary to define an invisible button over the graphic.

    Then, how would I hide the standard frame, that is the window thing in windows or linux that encapsulates the contents of the window.

    I was just wandering if anyone had any experience in this area.

    Owen
     
  11. DaWei

    DaWei New Member

    Joined:
    Dec 6, 2006
    Messages:
    835
    Likes Received:
    5
    Trophy Points:
    0
    Occupation:
    Semi-retired EE
    Location:
    Texan now in Central NY
    Home Page:
    I'm thinking that you should tell us your level of expertise. How else can we hope to answer your questions in a realistic way?

    Your comment regarding invisible buttons over graphics seems to indicate that you don't know how things work at a low level. Regardless of how brilliant your idea may be, you are not going to make the transition from total n00b to master of programming by asking generalized questions on a forum. What do you really want?
     
  12. obduk

    obduk New Member

    Joined:
    Mar 19, 2007
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    0
    Ok, first of all sorry but my communication skills arn't that good.

    I have had many years experience using C, and other programming languages.

    I have had some experience of programming GUI's in C using wxWidgets, and Java using the Swing libaries etc, and so am aware of event handlers etc etc.

    I have made some programs in openGL + GLUT that run on both windows and linux, however these are without interface (simple 3D and ray tracer object representation programs).

    I have a good knowledge of the fundamentals of the internal working of a computer, processors, machine code, compilors etc etc. Have written a specification for a PB8 computer, and written a compiler for my own language.

    In general I have a good theoretical background of computers, and good understanding of C, I just have little experience in writing end user programs.
     
  13. DaWei

    DaWei New Member

    Joined:
    Dec 6, 2006
    Messages:
    835
    Likes Received:
    5
    Trophy Points:
    0
    Occupation:
    Semi-retired EE
    Location:
    Texan now in Central NY
    Home Page:
    Good enough. I'd suggest downloading the SDK for Windows Media Player and making a skin for it. With that under your belt, you should be good to go.
     
  14. obduk

    obduk New Member

    Joined:
    Mar 19, 2007
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    0
  15. obduk

    obduk New Member

    Joined:
    Mar 19, 2007
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    0
    Would using GTK be an option, because I realised that XMMS is created with that, and that has a skinned GUI. Also there are versions of GTK available for windows, linux and MacOS
     

Share This Page