Borland C++ 4.5 and 5.5?

  • Thread starter Vladimir Perkic
  • Start date
V

Vladimir Perkic

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.

Thank you in advance
 
K

Kevin Handy

Vladimir said:
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.

Thank you in advance

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.
 
D

Duane Hebert

Kevin Handy said:
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.

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)...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,208
Latest member
RandallLay

Latest Threads

Top