标题:请问如何修改?
只看楼主
flaght
Rank: 1
等 级:新手上路
帖 子:22
专家分:0
注 册:2006-8-29
 问题点数:0 回复次数:1 
请问如何修改?

//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
TForm1::WndProc(TMessage &Message);
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}


void_fastcall TForm1::WndProc(TMessage &Message)
{

switch(Message.msg)
{
case WM_WINDONWPSCHAGING:
if (LPWINDOWPOS(Message.LParam)->y<20)
LPWINDOWPOS(Message.LParam)->y=0;
if (LPWINDOWPOS(Message.LParam)->x<100)
LPWINDOWPOS(Message.LParam)->x=0;
break;

}
TForm1::WndProc(Message);
}

错误:
[C++ Error] Unit1.cpp(11): E2316 'TForm1::WndProc(TMessage &)' is not a member of 'TForm1'
[C++ Error] Unit1.cpp(19): E2141 Declaration syntax error

搜索更多相关主题的帖子: pragma include dfm vcl 
2007-07-04 12:37
IPV6
Rank: 1
等 级:新手上路
威 望:2
帖 子:265
专家分:0
注 册:2006-9-7
得分:0 
在头文件中声明一下WndProc函数

2007-08-24 08:40



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-152621-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.434776 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved