Solved

how to define Wndproc in Borland c++4.5

Posted on 1997-11-25
3
456 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
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
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 and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

759 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now