当前位置:编程学习 > C#/ASP.NET >>

我想使用SendMessage改变ListView图标距离,但是编译出错,麻烦帮我看一下谢谢了

代码片断如下:

#pragma once
#include "LinkDataBase.h"
#include "DataGridNoActiveCellColumn.h"
#include "SelectNewRoom.h"





using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;





namespace My
{
/// <summary> 
/// HotelReserveConfirm 摘要
///
/// 警告: 如果您更改该类的名称,则将需要更改 
///          与该类所依赖的所有 .resx 文件关联的托管资源编译器工具的 
///          “资源文件名”属性。  否则,
///          设计器将不能与此窗体关联的
///          本地化资源正确交互。
/// </summary>
public __gc class HotelReserveConfirm : public System::Windows::Forms::Form
{
//--------------------成员声明------------------------
private:
LinkDataBase* MyDataBase; //数据库连接类
SqlDataAdapter* OderAdapter;
SqlDataAdapter* RoomAdapter;
SqlDataAdapter* BookRoomAdapter;
DataView* BookRoomView;
DataSet* ds;
String* strTableName;
String* strSQL;
CurrencyManager* cmOder;




int   LVM_SETICONSPACING;






private: System::Windows::Forms::Panel *  panel1;
private: System::Windows::Forms::Button *  btnFindRoom;
private: System::Windows::Forms::TextBox *  tBoxRoomID;
private: System::Windows::Forms::Label *  label9;
private: System::Windows::Forms::Label *  label20;
private: System::Windows::Forms::Label *  label18;
private: System::Windows::Forms::Label *  label16;
private: System::Windows::Forms::Label *  label14;
private: System::Windows::Forms::Label *  label13;
private: System::Windows::Forms::Label *  label11;
private: System::Windows::Forms::Label *  label7;
private: System::Windows::Forms::Label *  label4;
private: System::Windows::Forms::Label *  label2;
private: System::Windows::Forms::TextBox *  tBoxGuestName;
private: System::Windows::Forms::Label *  label1;
private: System::Windows::Forms::Label *  label26;
private: System::Windows::Forms::Label *  label8;
private: System::Windows::Forms::TextBox *  tBoxOderID;
private: System::Windows::Forms::Label *  label5;
private: System::Windows::Forms::Label *  label12;
private: System::Windows::Forms::TextBox *  tBoxOperator;
private: System::Windows::Forms::Label *  label15;
private: System::Windows::Forms::Label *  label17;
private: System::Windows::Forms::TextBox *  tBoxMeetingRoom;
private: System::Windows::Forms::TextBox *  tBoxRequestion;
private: System::Windows::Forms::TextBox *  tBoxReceiptionGuest;
private: System::Windows::Forms::TextBox *  tBoxDeluxeSuiteRoom;
private: System::Windows::Forms::TextBox *  tBoxDeluxeSingleRoom;
private: System::Windows::Forms::TextBox *  tBoxDeluxeDoubelRoom;
private: System::Windows::Forms::TextBox *  tBoxStandardSuite;
private: System::Windows::Forms::TextBox *  tBoxStandardSingleRoom;
private: System::Windows::Forms::TextBox *  tBoxStandardDoubleRoom;
private: System::Windows::Forms::TextBox *  tBoxDays;
private: System::Windows::Forms::TextBox *  tBoxBooker;
private: System::Windows::Forms::DateTimePicker *  dtpArrival;
private: System::Windows::Forms::Label *  label3;
private: System::Windows::Forms::TextBox *  tBoxPhoneNumber;
private: System::Windows::Forms::Label *  label6;
private: System::Windows::Forms::Label *  label19;
private: System::Windows::Forms::Label *  label21;
private: System::Windows::Forms::Label *  label22;
private: System::Windows::Forms::Label *  label23;
private: System::Windows::Forms::Label *  label24;
private: System::Windows::Forms::Label *  label25;
private: System::Windows::Forms::GroupBox *  groupBox1;
private: System::Windows::Forms::Label *  label29;
private: System::Windows::Forms::GroupBox *  groupBox2;
private: System::Windows::Forms::TextBox *  tBoxSSuRoom;
private: System::Windows::Forms::TextBox *  tBoxDSuRoom;
private: System::Windows::Forms::Button *  btnCancel;
private: System::Windows::Forms::TextBox *  tBoxDSRoom;
private: System::Windows::Forms::TextBox *  tBoxDDRoom;
private: System::Windows::Forms::TextBox *  tBoxSSRoom;
private: System::Windows::Forms::TextBox *  tBoxSDRoom;
private: System::Windows::Forms::Button *  btnSave;
private: System::Windows::Forms::TextBox *  tBoxConfirmTime;
private: System::Windows::Forms::TextBox *  tBoxRooms;
private: System::Windows::Forms::GroupBox *  groupBox3;
private: System::Windows::Forms::GroupBox *  groupBox4;
private: System::Windows::Forms::DataGrid *  dgrdBookRoom;
private: System::Windows::Forms::ListView *  listView1;
private: System::Windows::Forms::ImageList *  imageList2;
private: System::Windows::Forms::ImageList *  imageList1;
private: System::Windows::Forms::TextBox *  tBoxStatus;



//-------------------成员声明结束-----------------------
public: 
HotelReserveConfirm(void)
{
InitializeComponent();
//初始化
this->MyDataBase = new LinkDataBase();
this->ds = new DataSet();
this->OderAdapter = new SqlDataAdapter();
this->RoomAdapter = new SqlDataAdapter();
this->BookRoomAdapter = new SqlDataAdapter();
this->BookRoomView = new DataView();



this->LVM_SETICONSPACING   =   0x1035; 




//设置ListView的图标距离
//this->SendMessage(this->listView1->Handle,this->LVM_SETICONSPACING, 0, 0x10000 * 140 + 130);
::SendMessage(this->listView1->Handle,this->LVM_SETICONSPACING, 0, 0x10000 * 140 + 130);


到红字这里出错,错误信息如下:

e:\my project\酒店管理系统\HotelReserveConfirm.h(148): error C2039: “SendMessage” : 不是“operator``global namespace''”的成员
e:\my project\酒店管理系统\HotelReserveConfirm.h(148): error C3861: “SendMessage”: 即使使用参数相关的查找,也未找到标识符

麻烦各位帮我看一下是怎么会事不胜感激...

--------------------编程问答-------------------- #include <winuser.h> --------------------编程问答-------------------- --------------------编程问答-------------------- 好像.不行额,什么意思哦
补充:.NET技术 ,  VC.NET
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,