Menu

I need to see a message :\

2002-11-25
2012-09-26
  • Nobody/Anonymous

    I want to see a message... so im trying to:

    CHAR debug[50];
      debug[50]=(SendMessage(ThatDamnedControl, BM_GETSTATE, (WPARAM)0 ,(LPARAM)0));
      MessageBox (NULL, TEXT (debug), "The Message is...", MB_ICONERROR);

    The window pop with a lot of junk ascii. Any ideas?

     
    • Nobody/Anonymous

      what are you trying to do?

      Used in that format, it returns a 1 or 0 (on or off).

      do this:

      int bstate;
      char debug[50];
      bstate = SendMessage(.......);
      sprintf(debug, "The Message is... %d", bstate);
      MessageBox(...);

       
    • Nobody/Anonymous

      BM_GETSTATE returns an int.
      You might want to try IsDlgButtonChecked function as well:
      if (IsDlgButtonChecked(hwnd, IDC_XXXX)==BST_CHECKED)
      {
      ...
      }
      Works with toggles, like checkboxes, toggle buttons.
      rpeter

       

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.