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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. messagebox problem

messagebox problem

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelp
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.
  • T Offline
    T Offline
    tiziacaia
    wrote on last edited by
    #1

    I open a MessageBox from a dialog "mydialog". When i push the ok button on the MessageBox mydialog be closed but i don't want that. How can i let open mydialg? thanks a lot

    N V 2 Replies Last reply
    0
    • T tiziacaia

      I open a MessageBox from a dialog "mydialog". When i push the ok button on the MessageBox mydialog be closed but i don't want that. How can i let open mydialg? thanks a lot

      N Offline
      N Offline
      Nish Nishant
      wrote on last edited by
      #2

      Post the relevant code where you bring up the messagebox. Nish


      My blog on C++/CLI, MFC/Win32, .NET - void Nish(char* szBlog); My MVP tips, tricks and essays web site - www.voidnish.com

      T 1 Reply Last reply
      0
      • T tiziacaia

        I open a MessageBox from a dialog "mydialog". When i push the ok button on the MessageBox mydialog be closed but i don't want that. How can i let open mydialg? thanks a lot

        V Offline
        V Offline
        V 0
        wrote on last edited by
        #3

        Sorry, i read wrong, my mistake :doh: I think you should override the OnOK function of the dialog, do not call CDialog::OnOK() in it. good luck. "If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix

        1 Reply Last reply
        0
        • N Nish Nishant

          Post the relevant code where you bring up the messagebox. Nish


          My blog on C++/CLI, MFC/Win32, .NET - void Nish(char* szBlog); My MVP tips, tricks and essays web site - www.voidnish.com

          T Offline
          T Offline
          tiziacaia
          wrote on last edited by
          #4

          void CFatture::message(HWND wnd,CString str,int type) { if(type==0){ MessageBox(NULL,str,"Info",MB_OK|MB_ICONINFORMATION); }else{ MessageBox(NULL,str,"Errore",MB_OK|MB_ICONEXCLAMATION); } } and i call this message function with (for example) theApp.message(NULL,e->Message,1); from class off "mydialog"

          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