Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. MSDN question again...

MSDN question again...

Scheduled Pinned Locked Moved C / C++ / MFC
c++questiondatabasehelptutorial
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SilverShalkin
    wrote on last edited by
    #1

    ok,... i like to type my questions in, like using the index in MSDN. my question this time will be textcolor "like changing it from white to blue or somthing like that." I first jumped into MSDN to look up text color,... in Index mode there are three C++ things i can choose from. "I want to do everything using the win32 app console project... (just noting it :)) there is: 1. Visual C++ Documintation. 2. Visual C++, platform SDK, and win ce docs and 3. visual c++, platform SDK, and enterprise docs. first question is: What one should i select to get the results to my questions most relative? second question is: how do i now what help files will help me with my project "win32 con. app." so that i dont get them consfused with MFC n so n so? Third question is: How do you use the syntax that the help files give you? "there is a bunch of code that i do not know how to use... the help files just list the code and seem to hope you know hoe to apply it to you code" (I dont know how to apply it)(to make it work) :) Thanks for the help! ~SilverShalkin :rose:

    S P 2 Replies Last reply
    0
    • S SilverShalkin

      ok,... i like to type my questions in, like using the index in MSDN. my question this time will be textcolor "like changing it from white to blue or somthing like that." I first jumped into MSDN to look up text color,... in Index mode there are three C++ things i can choose from. "I want to do everything using the win32 app console project... (just noting it :)) there is: 1. Visual C++ Documintation. 2. Visual C++, platform SDK, and win ce docs and 3. visual c++, platform SDK, and enterprise docs. first question is: What one should i select to get the results to my questions most relative? second question is: how do i now what help files will help me with my project "win32 con. app." so that i dont get them consfused with MFC n so n so? Third question is: How do you use the syntax that the help files give you? "there is a bunch of code that i do not know how to use... the help files just list the code and seem to hope you know hoe to apply it to you code" (I dont know how to apply it)(to make it work) :) Thanks for the help! ~SilverShalkin :rose:

      S Offline
      S Offline
      SilverShalkin
      wrote on last edited by
      #2

      COLORREF SetTextColor( COLORREF clr ); This is out of the MSDN help file... Supposely it sets the text color "that is exactly what i want to do) How do i use this line in my code "applying it"? And what header goes with it? is it "#include "afxcmn.h"" Thanks all ~SilverShalkin :rose:

      M 1 Reply Last reply
      0
      • S SilverShalkin

        COLORREF SetTextColor( COLORREF clr ); This is out of the MSDN help file... Supposely it sets the text color "that is exactly what i want to do) How do i use this line in my code "applying it"? And what header goes with it? is it "#include "afxcmn.h"" Thanks all ~SilverShalkin :rose:

        M Offline
        M Offline
        moliate
        wrote on last edited by
        #3

        This is mostly done in the OnCtlColor handler. For example: BEGIN_MESSAGE_MAP(CDummyDlg, CDialog) ... ON_WM_CTLCOLOR() END_MESSAGE_MAP() HBRUSH CDummyDlg::OnCtlColor( CDC* pDC, CWnd* pWnd, UINT nCtlColor ) {HBRUSH hbr = CDialog::OnCtlColor(pDC,pWnd,nCtlColor); pDC->SetTextColor(RGB(255,0,0)); return hbr; } This will tell every control in the dialog (who are kind enough to ask) to paint text red. Check nCtlColor if you want the color to go somewhere special. If you want another backcolor, this is also the place to go. Make the return value into the desired brush. /moliate

        1 Reply Last reply
        0
        • S SilverShalkin

          ok,... i like to type my questions in, like using the index in MSDN. my question this time will be textcolor "like changing it from white to blue or somthing like that." I first jumped into MSDN to look up text color,... in Index mode there are three C++ things i can choose from. "I want to do everything using the win32 app console project... (just noting it :)) there is: 1. Visual C++ Documintation. 2. Visual C++, platform SDK, and win ce docs and 3. visual c++, platform SDK, and enterprise docs. first question is: What one should i select to get the results to my questions most relative? second question is: how do i now what help files will help me with my project "win32 con. app." so that i dont get them consfused with MFC n so n so? Third question is: How do you use the syntax that the help files give you? "there is a bunch of code that i do not know how to use... the help files just list the code and seem to hope you know hoe to apply it to you code" (I dont know how to apply it)(to make it work) :) Thanks for the help! ~SilverShalkin :rose:

          P Offline
          P Offline
          Phil J Pearson
          wrote on last edited by
          #4

          The simple answer is that none of that stuff will let you change text colour in a console app. That's why Bill invented Windows! :)

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups