I am in need of help, need C++ guidance

This is a discussion on I am in need of help, need C++ guidance within the C++ Programming forums, part of the General Programming Boards category; I just want straight forward codes, just put the codes i need here, and i will figure out how they ...

  1. #16
    Registered User
    Join Date
    Aug 2007
    Posts
    16
    I just want straight forward codes, just put the codes i need here, and i will figure out how they work, where they go, and what they do.

  2. #17
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,211
    Yeah, and I want a deathray. You going to devote your life to making it for me?

  3. #18
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    1) no such thing as a C++ Color wheel
    2-5) sounds like you want some win32 programming: http://msdn2.microsoft.com/en-us/library/aa383749.aspx Windows programming links
    6) http://www.google.com/search?q=self-...ing+executable http://www.google.com/search?q=installer+programs

    edit: I love how that link abbreviated

  4. #19
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,183
    skip GUI for now, I don't know what API are you using for your GUI, but most C++ GUI libraries require at least some understanding of OOP. Get a strong hold of C++ first.

    Don't worry about an installer for now. Have something that works first.

  5. #20
    Registered User
    Join Date
    Aug 2007
    Posts
    16
    Im sorry if i came on you guys too hard, but i AM pretty sure there is a c++ color wheel, if not, then what are these codes?

    0xff and 0x00ff

    thanks again, and please dont think im a harsh person, because im...not. <.<

  6. #21
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,211
    Those are just numbers in hexadecimal format. They can be anything.

    If you're assuming anything about colors, many systems that require a number to represent color use a 32-bit number where the first byte is red, the second is green, the third is blue, and the fourth is alpha or transparency. This might be called 24-bit color since 3 bytes are really being used to make the color. This is not always the case, however.

    Some systems do not use this color format. I believe the SNES is a prime example. The convention adopted I believe is RBG instead of the more common standard RGB. Also, the sizes of the number used to count each individual primary color was most likely under a byte. I believe all three fit into 2 bytes, but I can't remember. It's been awhile since I last read about it.

    Anyway, C++ is a somewhat abstract language when it comes to many details. Things like color are one of those things. They have nothing to do with the language. Operating systems may impose their own color system, which C++ can interact with, and so on and so forth, but it has nothing to do with the language.

    Stop asking questions that indicate you have no desire to learn on your own. You can't just jump into writing random programs. You'll suck at it, and people will dislike you. I'd be more concerned with the first consequence and probably disregard the latter. Start at the basics and learn "Hello, world" using C++ first. Move from there.

  7. #22
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,183
    0xff and 0x00ff
    those are simply numbers in hexidecimal (0x prefix denotes a hexidecimal number)

    your post is saying something like this:
    Code:
    Im sorry if i came on you guys too hard, but i AM pretty sure there is a c++ color wheel, if not, then what are these codes?
    
    4 and 7
    
    thanks again, and please dont think im a harsh person, because im...not. <.<

  8. #23
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,231
    4 and 7?
    Two numbers are the same. 255
    Learn C++ (C++ Books, C Books, FAQ, Forum Search)
    Code painter latest version on sourceforge DOWNLOAD NOW!
    Download FSB Data Integrity Tester.
    Siavosh K C

  9. #24
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,183
    well i was pointing out that they are just numbers

  10. #25
    msp
    msp is offline
    Registered User msp's Avatar
    Join Date
    Jul 2007
    Location
    in
    Posts
    31
    I can be (or give you) a mentor for 1 year and even longer time.
    But first tell me how much can you pay? Can you pay me $50 per month?
    Regards.

  11. #26
    Kiss the monkey. CodeMonkey's Avatar
    Join Date
    Sep 2001
    Posts
    902
    Private messages, gentleman (or ladies).
    "If you tell the truth, you don't have to remember anything"
    -Mark Twain

  12. #27
    msp
    msp is offline
    Registered User msp's Avatar
    Join Date
    Jul 2007
    Location
    in
    Posts
    31
    Yeah! But I am unable to PM him.
    This is what I get when I try: Error Page

  13. #28
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    I presume we are talking Windows here, in which case there is a MACRO "RGB" that takes the level or Red, Green and Blue in values 0..255 (0x00..0xFF). If you want white, give it 0xFF, 0xFF, 0xFF, if you want Red, something like 0xFF,0x00, 0x00 would do that - of course, all values for the first parameter 0x01..0xFF will give you "some level of red in the colour". Likewise for Green and Blue. A grey would be something that is halfway set on all colours, so for example 0x80, 0x80, 0x80.

    The ultimate result of a RGB macro is a long integer with 24 bits set - and that's exactly the same values as the 0xFFFFFF and 0x000000 that you'd use in HTML.

    As to a "colour-wheel", that is just a graphical representation of the colours available on the machine. You could make up a little .PHP, .JSP or .ASP web-page that asks for the levels of each colour and use that to see what it looks like, if you want to be able to experiment (not that I expect chess to need much other than black, white and a few different levels of grey.

    --
    Mats

  14. #29
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    All bits of a COLORREF are used, in fact. The highest sub-byte indicates the kind of colorref (RGB, palette index, etc.)
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  15. #30
    Registered User
    Join Date
    Jul 2006
    Posts
    162
    I wrote an algorithm to generate a "color wheel" based on the concept of HSB color space, during a time when I thought I could describe the HSB->RGB color space translation as a single formula, (I got decently close, still working on it, I found wiki's conditional based solution ... not very elegant.)

    See my response here for the code:
    OpenGL hue rotation

    Being able to generate a range of all hue's was the easy part, and turned out to be very convenient to have in other applications.

Page 2 of 4 FirstFirst 1234 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need some guidance.
    By Kinto in forum C Programming
    Replies: 10
    Last Post: 05-31-2009, 12:02 AM
  2. Guidance, please.
    By mattagrimonti in forum C Programming
    Replies: 2
    Last Post: 11-26-2008, 07:50 AM
  3. need guidance to connect to serial port
    By gnychis in forum Linux Programming
    Replies: 1
    Last Post: 06-02-2005, 10:10 AM
  4. Audio guidance.
    By Sebastiani in forum Windows Programming
    Replies: 6
    Last Post: 12-22-2002, 08:14 AM
  5. advice and possibly guidance
    By nazri81 in forum C++ Programming
    Replies: 3
    Last Post: 11-07-2002, 09:19 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21