在vc ++中遇到了一个不正确的参数 [英] Encountered an improper argument in vc++

查看:98
本文介绍了在vc ++中遇到了一个不正确的参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HTREEITEM htree = m_tree.GetSelectedItem();

BOOL保存,状态,原因,reasoncbo,reasoncmt;

int qp,pq;



if(htree)

{}

i当我从组合框中选择一些东西时,我将htree变为null

解决方案

从文档中:CTreeCtrl :: GetSelectedItem [ ^ ],看起来你正在尝试检索 TreeCtrl (而不是 ComboBox )的选定项目,此类操作失败。

HTREEITEM htree = m_tree.GetSelectedItem();
BOOL save, status, reason, reasoncbo, reasoncmt;
int qp,pq;

if (htree)
{}
i am getting htree as null when i select something from combobox

解决方案

From the documentation: "CTreeCtrl::GetSelectedItem"[^], it looks you are trying to retrieve the selected item of a TreeCtrl (instead of a ComboBox), and such operation is failing.


这篇关于在vc ++中遇到了一个不正确的参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆