Announcement

Collapse
No announcement yet.

MessageBoxIndrect demo in Source Code forum

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • MessageBoxIndrect demo in Source Code forum

    hi fellows,

    just posted a messageboxindirect demo at: http://www.powerbasic.com/support/pb...ad.php?t=23111
    it demonstrates how to add your own icons in a standard windows message box.


    ------------------
    mailto:[email protected][email protected]</a>
    www.basicguru.com/zijlema/

    Egbert Zijlema, journalist and programmer (zijlema at basicguru dot eu)
    http://zijlema.basicguru.eu
    *** Opinions expressed here are not necessarily untrue ***

  • #2
    Made some changes. The messagebox also includes a working help button now.


    ------------------
    mailto:[email protected][email protected]</A>
    www.basicguru.com/zijlema/

    Egbert Zijlema, journalist and programmer (zijlema at basicguru dot eu)
    http://zijlema.basicguru.eu
    *** Opinions expressed here are not necessarily untrue ***

    Comment


    • #3
      Karl,

      There are such programs, indeed. Search the Internet for IconExplorer and/or IconLib.


      ------------------
      mailto:[email protected][email protected]</A>
      www.basicguru.com/zijlema/

      Egbert Zijlema, journalist and programmer (zijlema at basicguru dot eu)
      http://zijlema.basicguru.eu
      *** Opinions expressed here are not necessarily untrue ***

      Comment


      • #4
        Egbert,

        Thanks for posting the code for sprucing up message boxes!

        I found that I had to add the following to avoid a compile error (460 Undefined Equate)
        Code:
        %MB_HELP = &H00004000
        %MB_USERICON = &H00000080
        I checked that I have the latest win32api.inc - it doesn't have these equates defined in it.
        The values are in the resource.h file however, which is 'included' in the .pbr file (with the correct path for my machine
        Code:
        #define MB_HELP                     0x00004000L // Help Button
        #define MB_USERICON                 0x00000080L
        Shouldn't the compiler find the equates via the msgbox.pbr file (#include resource.h), or am I missing something here?

        Cheers, Dave

        ------------------
        Rgds, Dave

        Comment


        • #5
          The resource.h file is used by the resource compiler (RC.EXE), not by
          PowerBASIC.

          The %MB_* equates were updated in Win32API on July 9th, so your version
          is at least 15 releases out of date. For the latest Win32API includes,
          keep an eye on http://www.powerbasic.com/files/pub/pbwin/


          ------------------
          Tom Hanlin
          PowerBASIC Staff

          Comment


          • #6
            i checked that i have the latest win32api.inc - it doesn't have these equates defined in it
            just a little reminder: in the source code forum, at...

            http://www.powerbasic.com/support/pb...ad.php?t=22637

            .. you will find pb/win source code to compare two versions of win32api.inc (or any files, for that matter).

            for functions, declares, udts and equates it tells you what's in one file but not in another.

            it does not tell you if any of these definitions have changed, but hey, it's a start if you're using a really old version (like me: i use the 1999 version).

            of course, someone could enhance that software to show the 'unit-level' changes...

            mcm


            Michael Mattias
            Tal Systems (retired)
            Port Washington WI USA
            [email protected]
            http://www.talsystems.com

            Comment


            • #7
              Originally posted by Tom Hanlin:
              The resource.h file is used by the resource compiler (RC.EXE), not by
              PowerBASIC.
              Thanks for clarifying that for me Tom.
              Probably, in this case there is no need to include resource.h in the msgbox.rc file, as all it has is an icon definition anyway?
              I've re-read the some of Herbert Schildt's Windows 2000 Programming from the Ground Up. He explains resource files pretty well - though unfortunately from a C/C++ angle. It's slowly sinking in! .
              (It would sure be nice to have a book like that written for Power Basic! I hope Troy King hasn't abandoned the book he started?)
              The %MB_* equates were updated in Win32API on July 9th, so your version
              is at least 15 releases out of date. For the latest Win32API includes,
              keep an eye on http://www.powerbasic.com/files/pub/pbwin/
              [/B]
              That was the problem - I had downloaded the latest winapi.zip; but managed to unpack it to the wrong folder

              Michael,
              Thanks for the pointer to your source code for comparing win32api.inc releases (/ any text files) - it did confirm that the equates had been updated since the release I was using (1/6/99)!
              (BTW I found that "History.txt" in win32api.zip from the PowerBasic file library lists changes made to the PowerBasic API files).

              Thanks again for the help, Dave

              ------------------
              Rgds, Dave

              Comment

              Working...
              X