我做的是将视图分割成两个窗口,一个LISTVIEW,一个FORMVIEW,是想单击某LISTVIEW的某一行,将信息在FORMVIEW的EDIT里显示出来,视图间怎样通信呢?麻烦说详细点,我是菜鸟啊
解决方案 »
- 问个FAT文件系统的问题。
- 怎么让CListCtrl显示图标?
- 程序执行过程中,硬盘突然变慢,有时甚至死机,请问是怎么回事?
- 无法定位序数 26 于动态链接库 bb.dll 上,,,在线等,马上给分
- 请用 GetPrivateProfileString 读取 资源文件 ,多谢
- ctreeCtrl的换肤!把滚 动条换了!急!!!!!!!
- 请教:如何动态改变CFormView窗口的大小
- 超菜问题?
- 请问如何屏蔽掉从CEditView中退出时的“保存文档”提示?
- BitBlt的参数SRCINVERT有什么用?
- 多用户下的CreateFileMapping,OpenFileMapping不能正常调用的问题.
- 动态生成的Radio如何设成一组..急
那边定义一个实现的函数,这边通过那边的视图指针调用该函数显示数据!在创建窗口的时候你就把该指针保存到框架中就可以了,你就可以在任何时候方便的得到该指针了通过得到框架窗口指针函数MFC的
NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)lParam;
int nSelItem = pNMListView->iItem;NM_LISTVIEW 是什么?
typedef struct tagNMLISTVIEW{
NMHDR hdr;
int iItem;
int iSubItem;
UINT uNewState;
UINT uOldState;
UINT uChanged;
POINT ptAction;
LPARAM lParam;
} NMLISTVIEW, FAR *LPNMLISTVIEW;Contains information about a list view notification message. This structure is the same as the NM_LISTVIEW structure but has been renamed to fit standard naming conventions. hdr
NMHDR structure that contains information about this notification message.
iItem
Identifies the list view item, or -1 if not used.
iSubItem
Identifies the subitem, or zero if none.
uNewState
New item state. This member is zero for notification messages that do not use it.
uOldState
Old item state. This member is zero for notification messages that do not use it.
uChanged
Set of flags that indicate the item attributes that have changed. This member is zero for notifications that do not use it. Otherwise, it can have the same values as the mask member of the LVITEM structure.
ptAction
POINT structure that indicates the location at which the event occurred. This member is undefined for notification messages that do not use it.
lParam
Application-defined 32-bit value of the item. This member is undefined for notification messages that do not use it.