我在插入的时候调用了DeleteAllItems()然后再调用InsertItem()插入数据就不显示数据了。
把DeleteAllItems()注释掉之后就可以显示了。
用UpdateWindow()强制跟新也不行,不知道为什么?
怎么解决?
把DeleteAllItems()注释掉之后就可以显示了。
用UpdateWindow()强制跟新也不行,不知道为什么?
怎么解决?
解决方案 »
- 怎么样实现ComboboxEx控件,输入文字,超长时,文字横向滚动
- 跪求高手指点,如何在没有装office等相关软件的情况下显示相应的文档?
- 显示大文本的问题
- 菜鸟的问题
- 提个菜鸟问题,有关TextOut(),各位大哥帮帮忙。
- 典型线程问题,急救!!!
- 菜鸟!小问题---如何在编辑框中输值(2)
- 在单文档中 ,视图全屏后,再恢复全屏。我的工具栏就没有了。有什么办法?
- 我在ISAPI中用ADO方法打开SQL SERVER,速度奇慢,大家帮我看看是不是代码写的不对啊!!
- 人世间最美好的是美女那魔鬼般的身体,最丑恶的是美女那毒蝎般的心肠,同意者POP,人人有分!
- waram怎么转换为字符串数组
- 关于数据打包跟解析的问题(几种数据类型按字节打包跟拆分)
int InsertItem( const LVITEM* pItem );int InsertItem( int nItem, LPCTSTR lpszItem );int InsertItem( int nItem, LPCTSTR lpszItem, int nImage );int InsertItem( UINT nMask, int nItem, LPCTSTR lpszItem, UINT nState, UINT nStateMask, int nImage, LPARAM lParam );Return ValueThe index of the new item if successful or -1 otherwise.ParameterspItemPointer to anLVITEM structure that specifies the item’s attributes, as described in the Platform SDK. nItemIndex of the item to be inserted.lpszItem Address of a string containing the item’s label, or LPSTR_TEXTCALLBACK if the item is a callback item. For information on callback items, see CListCtrl::GetCallbackMask.nImageIndex of the item’s image, or I_IMAGECALLBACK if the item is a callback item. For information on callback items, see CListCtrl::GetCallbackMask.nMaskThe nMask parameter specifies which item attributes passed as parameters are valid. It can be one or more of the mask values described inLVITEM structure in the Platform SDK. The valid values can be combined with the bitwise OR operator.nStateIndicates the item's state, state image, and overlay image. See the Platform SDK topics LVITEM for more information andList View Item States for a list of valid flags.nStateMaskIndicates which bits of the state member will be retrieved or modified. See LVITEM in the Platform SDK for more information.nImageIndex of the item’s image within the image list.lParamA 32-bit application-specific value associated with the item. If this parameter is specified, you must set the nMask attribute LVIF_PARAM.ResInserts an item into the list view control.CListCtrl Overview | Class Members | Hierarchy ChartSee Also CListCtrl::DeleteItem, CListCtrl::DeleteAllItems
CListCtrl::EnsureVisible
BOOL EnsureVisible( int nItem, BOOL bPartialOK );Return ValueNonzero if successful; otherwise zero.ParametersnItemIndex of the list view item that is to be visible.bPartialOKSpecifies whether partial visibility is acceptable.ResCall this function to ensure that a list view item is at least partially visible. The list view control is scrolled if necessary. If the bPartialOK parameter is nonzero, no scrolling occurs if the item is partially visible.CListCtrl Overview | Class Members | Hierarchy ChartSee Also CListCtrl::Scroll
CListCtrl::Update
BOOL Update( int nItem );Return ValueNonzero if successful; otherwise zero.ParametersnItemIndex of the item to be updated.ResCall this function to force the list view control to repaint the item specified by nItem. This function also arranges the list view control if it has the LVS_AUTOARRANGE style.CListCtrl Overview | Class Members | Hierarchy ChartSee Also CListCtrl::DrawItem