1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Great fault.

Discussion in 'C' started by creative, May 24, 2010.

  1. creative

    creative New Member

    Joined:
    Feb 15, 2010
    Messages:
    87
    Likes Received:
    0
    Trophy Points:
    0
    Hi everybody!

    Does anybody know why Borland C++ 5.5 reports errors at line:

    CreateWindow ("button", "One",
    WS_CHILD| WS_VISIBLE| BS_PUSHBUTTON,
    20, 8, 75, 25, hwnd, (HMENU)IDBT_ONE, hInst, NULL);

    error is at '(HMENU)IDBT_ONE': cannot convert 'void *' to
    'HINSTANCE__ *'...
    Borland C++ 4.5 compile this code without any errors or warnings.
     
  2. inspiration

    inspiration New Member

    Joined:
    Feb 15, 2010
    Messages:
    85
    Likes Received:
    0
    Trophy Points:
    0
    Possibly, because you "cannot convert 'void *' to 'HINSTANCE__ *'".

    Since HINSTANCE__ is undefined in the C standard, you'll need
    show us how you defined it, or take it to some newsgroup that
    might actually be appropriate for that type of question.
     
  3. meyup

    meyup New Member

    Joined:
    Feb 15, 2010
    Messages:
    102
    Likes Received:
    0
    Trophy Points:
    0
    HInstance is supposed to be an unsigned int but Borland (contrary to their
    help file) has defined it
    as a void*. Do reinterpret_cast<unsigned> (HInstance)...
     

Share This Page