CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 1999
    Posts
    6

    AfxMessageBox(), can it be modified?

    Hi,

    I need to know if it's at all possible to modify any of the button labels and/or return codes (ID_XXX) of AfxMessageBox(), since I dont want to write my own version of AfxMessageBox().
    Not really *that* important, just asking though.
    AfxMessageBox() was probably, only designed for certain uses. I want to know
    if I can tweak it, just a little.

    Thanks in advance.
    Rossi.



    ==============================================
    Allen Van Der Ross
    Systems Programmer
    Software Performance Improvement
    South Africa
    E-Mail: allen@ct.spi.co.za
    ==============================================

  2. #2
    Join Date
    May 2009
    Location
    Bengaluru, India
    Posts
    460

    Re: AfxMessageBox(), can it be modified?

    Even I have a similar requirement, I want to enable more buttons like I need 2 Yes buttons with different options written on them, one No button and one cancel button..

    Any idea how to customize it

  3. #3
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: AfxMessageBox(), can it be modified?

    Quote Originally Posted by vcdebugger View Post
    Even I have a similar requirement, I want to enable more buttons like I need 2 Yes buttons with different options written on them, one No button and one cancel button..

    Any idea how to customize it
    Why bother trying to customize AfxNessageBix when it is easy enough to write your own dialog box?

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: AfxMessageBox(), can it be modified?

    Quote Originally Posted by vcdebugger View Post
    Even I have a similar requirement, I want to enable more buttons like I need 2 Yes buttons with different options written on them, one No button and one cancel button..

    Any idea how to customize it
    Use a CBT hook.
    See:
    https://www.codeguru.com/cpp/w-p/win...essage-Box.htm
    https://www.codeguru.com/cpp/w-p/win...MessageBox.htm
    https://www.codeguru.com/cpp/w-p/win...n-Captions.htm
    Victor Nijegorodov

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured