Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


#965 The INSTALLBITMAPBUTTON method cannot be invoked.

Mark Miesfeld
ooDialog (58)

When my program tries to create a Bitmap Button, it fails with an RC of -93. See attached screen copy. This is on a Windows 7 x64 system and the program runs with no change when I switch back to 4.1.0.


  • Mark Miesfeld
    Mark Miesfeld

    If you move your installBitmapButton() invocation to initDialog() or later in the life cycle of the dialog you will not get the syntax error. In other words, to a point where the underlying Windows dialog has been created.

    One of the problems people had in earlier versions of ooDialog is that things would just not work, and there was no indication to the user what the problem was.

    In ooDialog 4.2.0 one of the changes I'm making is to raise syntax errors when the user (the ooDialog programmer) uses methods incorrectly. Many of the methods in ooDialog can only be used after the underlying Windows dialog is created. A very common problem people have is invoking one of those methods in defineDialog(). When that is done, the method will not work, and people have been confused as to why it won't work.

    The syntax condition message you see:

    The INSTALLBITMAP method can not be invoked on FILELOC*DIALOG when the Windows dialog does not exist.

    comes from just this condition, you are invoking a method in defineDialog() that should be invoked after the underlying Windows dialog is created. I.e., you should use the method in initDialog().

    Now, having said that, I would need to see your code to see if this is a bug or not. You should only be getting this error if your 'bmp' argument is a number, or if it is the empty string.

    What is the actual value of bmp when you pass it to installBitmapButton() ?

  • Mark Miesfeld
    Mark Miesfeld

    Okay, this is a bug. It is not working as I intended, I'll fix it. Thanks for bringing it to my attention.

    If you want to, you can work around the bug by moving the createBitmapButton() to initDialog().

  • Mark Miesfeld
    Mark Miesfeld

    Committed revision 6488.

    Thanks for finding this bug. It will be fixed in the next beta release of ooDialog 4.2.0



Cancel   Add attachments