COleVariant to COLORREF
-
Hi all of you. How can I convert COleVariant to COLORREF ? I have used
CMFCPropertyGridColorProperty
to store a colorref into CMFCProperrtyGrid, but I need to retrieve correctly the colorref value, becauseCMFCPropertyGridColorProperty
have been filled with COleVariant ... I get the value just like this:CMFCPropertyGridProperty* pProp = m_wndPropList.FindItemByData(TRM_PROPERTYGRID_COLORWINDOW);
pProp->GetValue();but
GetValue
get me COleVariant, and I have there COLORREF value ... how can overcome this ? I get the following error:error C2440: 'return' : cannot convert from 'const COleVariant' to 'COLORREF'
Thank you.
-
Hi all of you. How can I convert COleVariant to COLORREF ? I have used
CMFCPropertyGridColorProperty
to store a colorref into CMFCProperrtyGrid, but I need to retrieve correctly the colorref value, becauseCMFCPropertyGridColorProperty
have been filled with COleVariant ... I get the value just like this:CMFCPropertyGridProperty* pProp = m_wndPropList.FindItemByData(TRM_PROPERTYGRID_COLORWINDOW);
pProp->GetValue();but
GetValue
get me COleVariant, and I have there COLORREF value ... how can overcome this ? I get the following error:error C2440: 'return' : cannot convert from 'const COleVariant' to 'COLORREF'
Thank you.
Since
COLORREF
is aDWORD
, can't you just access theullVal
member ofCOleVariant
?"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
-
Since
COLORREF
is aDWORD
, can't you just access theullVal
member ofCOleVariant
?"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
-
Since
COLORREF
is aDWORD
, can't you just access theullVal
member ofCOleVariant
?"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles