Solved

how to define Wndproc in Borland c++4.5

Posted on 1997-11-25
3
467 Views
Last Modified: 2011-10-03
Dear sir:
   I just begin to learn Bc++,yesterday,I finished my first
programm for windows.but when I compiled it,It always display "can not convert 'long[pascal*][unsigned int,unsigned short,unsigned short,long]'tolong [pascal*] [unsigned int,int,int,long]in function pascal WinMain[unsigned int,unsigned,char *,int]
Why?Thank you!


0
Comment
Question by:youngest
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 1

Expert Comment

by:tulin
ID: 1256417
Your function probably differs from its prototype
(second and third parameters conflict),
or needs to be prototyped.
Send full program code for exact answer.
0
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 100 total points
ID: 1256418
You should use the exact WNDPROC declaration for defining your function:

  LRESULT MyWndProc(HWND hwnd, MSG msg, WPARAM wparam, LPARAM lparam)
  {
    // rest of your code here.
  }


0
 

Author Comment

by:youngest
ID: 1256419
Dear thui:
  Can you tell me your E-mail address so that I can send my
programm to you?thank you!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question