Announcement

Collapse
No announcement yet.

Where does Windows find button text for message boxes?

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

  • Where does Windows find button text for message boxes?

    Hi fellows,

    Does somebody know where (and how) Windows finds the appropriate text for messagebox buttons?
    For instance, if you only specify the style flag %MB_OKCANCEL then Windows not only 'knows' that the messagebox should have 2 buttons, but also that their content should be "OK" and "Cancel" respectively.
    I guess this information is in USER32.DLL, but I don't know how to retrieve it. Most likely it is an undocumented FUNCTION?

    Thanks for any help or hint.



    ------------------
    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
    I suspect this text is not located in a single place (or at least in a place where it is accessable to third-party developers). For example, when I opened SHELL32.DLL in a resource viewer and searched the Dialog resources, every dialog resource that used an OK button defined a button object with the text "OK" on it, every dialog that used a Cancel button defined a button object with the text "Cancel" on it, etc. I wouldn't be surprised if the MessageBox() API function dynamically created in memory a dialog resource with the necessary button objects and set their text as required, rather than using a static resource from a library.
    If you try to make something idiot-proof, someone will invent a better idiot.

    Comment


    • #3
      Even if it did, it seems logical that the API would dynamically alter the text to suit the current language set anyway, but leave it untouched in US/English language...


      ------------------
      Lance
      PowerBASIC Support
      mailto:[email protected][email protected]</A>
      Lance
      mailto:[email protected]

      Comment

      Working...
      X