Menu

WM_CTLCOLORMSGBOX (?)

2004-10-05
2012-09-26
  • Nobody/Anonymous

    Hi,

    I'm trying to give a msgbox a new backgroundcolor.
    First way was to try out WM_CTLCOLORMSGBOX but it didnt seem to work. All other WM_CTLCOLOR-things (for DLG and EDIT etc.) worked, but I dont get a response to the above mentioned one.

    So I searched the web and found this link:
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winprog/winprog/deleted_windows_programming_elements.asp

    Platform SDK: Windows API
    Deleted Windows Programming Elements

    and also this one:

    http://www.codeproject.com/wtl/ChangeColorWtlDlg.asp

    "By the way, "Deleted Windows Programming Elements" in MSDN mentions WM_CTLCOLORMSGBOX as gone, never again to return. It was part of 16-bit Windows."

    Does it mean one can't use it anymore? Or does it mean its just not recommend to use it anymore like the "iostream.h" thing?

    I searched the web for hours but unfortunately I didnt found anything that was helpful on this subject.

    I tried out the turtorial on http://www.catch22.net/tuts/msgbox.asp, but also didnt manage to set colors with that. Maybe I have to subclass the msgbox-messages, do not know (and also do not know how to do that ;O( )

    Anyone in here is able to give me some hints or reference links?

    Thx,

    rik

     
    • Nobody/Anonymous

      sniffsnuff :'O(

      rik

       
    • Kip

      Kip - 2004-10-09

      Send me your catch22 source =)

      Kip

       
    • Nobody/Anonymous

      @kip:
      nope, I was speaking about the ctlcolorexplorer.zip sources, they are a bit larger, also, they seem to be $%&-MFC. There must be a way to do this without this crap.

      Since all my attemps failed so far and ignorance is bliss I will give up.

      rik

       
    • Kip

      Kip - 2004-10-09

      Don't. I think I have done this before, some how. Give me some time to think about it =)

      Kip

       
    • Nobody/Anonymous

      hm, nobody knows? ;(

      Meanwhile I found this file: http://www.flounder.com/ctlcolorexplorer.zip

      it does exactly what I want to do, it sets a hook for the messagebox, subclass it and change colors+fonts later. But it's c++ and uses classes. I'm not really familiar with classes, and did not found out how the subclassing is done. I found the hook in sampler.cpp and a msgbox-class in CBTMsg.cpp.
      Maybe someone is willing to help me please? (if not I will have to send the whole code to kip ;O j/k)

      Thanks for suggestions, if any.

      rik

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.