Page 2 of 2 FirstFirst 12
Results 21 to 25 of 25

Thread: Window colour

  1. #21
    Join Date
    Oct 2007
    Posts
    201
    Thanks
    19
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Window colour

    Quote Originally Posted by wysota View Post
    What kind of errors?
    mainwindow.cpp(33) : error C2065: 'COLOR_3DDKSHADOW' : undeclared identifier
    .\mainwindow.cpp(34) : error C3861: 'RGB': identifier not found
    .\mainwindow.cpp(35) : error C2065: 'm_ColourDay' : undeclared identifier
    .\mainwindow.cpp(35) : error C3861: 'SetSysColors': identifier not found

    Theses error.
    Cheers,
    Phillip



    --- Please post the solution you got to solve your problem. It may help others.

  2. #22
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Window colour

    Quote Originally Posted by phillip_Qt View Post
    mainwindow.cpp(33) : error C2065: 'COLOR_3DDKSHADOW' : undeclared identifier
    .\mainwindow.cpp(34) : error C3861: 'RGB': identifier not found
    .\mainwindow.cpp(35) : error C2065: 'm_ColourDay' : undeclared identifier
    .\mainwindow.cpp(35) : error C3861: 'SetSysColors': identifier not found
    As I said, read SetSysColors() docs. Look at the bottom where it says "Header".
    J-P Nurmi

  3. #23
    Join Date
    Oct 2007
    Posts
    201
    Thanks
    19
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Unhappy Re: Window colour

    Quote Originally Posted by wysota View Post
    What kind of errors?
    Im getting following errors.

    .\mainwindow.cpp(33) : error C2065: 'COLOR_3DDKSHADOW' : undeclared identifier
    .\mainwindow.cpp(35) : error C3861: 'SetSysColors': identifier not found

    Thank you.
    Cheers,
    Phillip



    --- Please post the solution you got to solve your problem. It may help others.

  4. #24
    Join Date
    Oct 2007
    Posts
    201
    Thanks
    19
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Window colour

    Quote Originally Posted by jpn View Post
    Qt is not a programming language but a library.


    Perhaps you should read SetSysColors() docs...

    #ifdef OS_WINDOWS
    quint32 m_ColourElement = COLOR_3DDKSHADOW;
    quint32 m_ColourNight = qRgb(100, 100, 100);
    SetSysColors(16, m_ColourElement, m_ColourNight);
    #endif

    Is it right?
    Cheers,
    Phillip



    --- Please post the solution you got to solve your problem. It may help others.

  5. #25
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Window colour

    Quote Originally Posted by phillip_Qt View Post
    Is it right?
    No, it's not. First of all, where is OS_WINDOWS defined? Qt does not define such but something similar. Read QtGlobal docs what Qt defines. Secondly, you must include the header mentioned in SetSysColors() docs. Otherwise compiler doesn't know any SetSysColors() function. Thirdly, SetSysColors() doens't take parameters like that. Read SetSysColors() docs what type of parameters it takes.
    J-P Nurmi

Similar Threads

  1. Set a window as child at runtime
    By sabeesh in forum Qt Programming
    Replies: 1
    Last Post: 26th November 2007, 09:30
  2. Change shape of window / animate window
    By sabeesh in forum Qt Programming
    Replies: 3
    Last Post: 31st October 2007, 08:16
  3. Replies: 1
    Last Post: 11th September 2007, 13:34
  4. move parent window to the front.
    By hvengel in forum Qt Programming
    Replies: 4
    Last Post: 2nd February 2007, 08:41
  5. background colour
    By kw in forum Qt Programming
    Replies: 6
    Last Post: 11th April 2006, 00:44

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.