Click here to Skip to main content
15,908,634 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: double core processors support from VC Pin
Rick York28-Apr-06 10:26
mveRick York28-Apr-06 10:26 
Questionprogram windows servies in Visual C++ 6.0 Pin
prajwolkumar28-Apr-06 2:35
prajwolkumar28-Apr-06 2:35 
AnswerRe: program windows servies in Visual C++ 6.0 Pin
David Crow28-Apr-06 3:30
David Crow28-Apr-06 3:30 
QuestionEvents Pin
HakunaMatada28-Apr-06 2:30
HakunaMatada28-Apr-06 2:30 
AnswerRe: Events Pin
David Crow28-Apr-06 2:34
David Crow28-Apr-06 2:34 
AnswerRe: Events Pin
Roger Stoltz28-Apr-06 2:35
Roger Stoltz28-Apr-06 2:35 
GeneralRe: Events Pin
HakunaMatada28-Apr-06 2:42
HakunaMatada28-Apr-06 2:42 
AnswerRe: Events Pin
Roger Stoltz28-Apr-06 2:56
Roger Stoltz28-Apr-06 2:56 
Regarding HRESULT:
You won't need it since HRESULT is usually only needed as a return type for methods defined in interfaces that are not dispatch interfaces, i.e. doesn't inherit from IDispatch.
HRESULT cannot be represented within a VARIANT, there's no need.

Regarding VARIANT:
This is a union used to represent different data types such as short, BSTR and many more. Look it up in MSDN.
To be able to know which data type it represents, there is a member in the VARAINT struct called "vt" which is a bitfield.

Regarding BSTR in VARIANTs:
The easiest way to do this is to use the MFC implementation of the VARIANT structure/union, COleVariant. One its constructors takes an LPCTSTR as argument which will make the internal VARIANT hold a BSTR.
If you like to use the raw VARIANT type, you set the "vt" member equal to VT_BSTR and set the pbstr member equal to the return value of CString::AllocSysString().

Hope this helps
--
Roger



It's suppose to be hard, otherwise anybody could do it!
QuestionWorking with Help [ F1 ] Pin
parichaybp28-Apr-06 1:12
parichaybp28-Apr-06 1:12 
QuestionDouble click event for RichEditControl Pin
mosali satish28-Apr-06 0:38
mosali satish28-Apr-06 0:38 
AnswerRe: Double click event for RichEditControl Pin
Trollslayer28-Apr-06 1:59
mentorTrollslayer28-Apr-06 1:59 
Questionlogin failure while using crystal reprot Pin
sumathi_k27-Apr-06 23:58
sumathi_k27-Apr-06 23:58 
AnswerRe: Having som MFC / ATL problem .. Any ideea? Pin
Stephen Hewitt28-Apr-06 1:34
Stephen Hewitt28-Apr-06 1:34 
Questionthe different between "WM_GETTEXT" and GetWindowText() Pin
wanglei198027-Apr-06 23:36
wanglei198027-Apr-06 23:36 
AnswerRe: the different between "WM_GETTEXT" and GetWindowText() Pin
Cedric Moonen27-Apr-06 23:39
Cedric Moonen27-Apr-06 23:39 
AnswerRe: the different between "WM_GETTEXT" and GetWindowText() Pin
David Crow28-Apr-06 2:30
David Crow28-Apr-06 2:30 
Questionminimize icon display Pin
WillTian27-Apr-06 23:26
WillTian27-Apr-06 23:26 
AnswerRe: minimize icon display Pin
Russell'27-Apr-06 23:56
Russell'27-Apr-06 23:56 
GeneralRe: minimize icon display Pin
WillTian28-Apr-06 15:07
WillTian28-Apr-06 15:07 
Questionhow to monitor the network Pin
zt978827-Apr-06 23:19
zt978827-Apr-06 23:19 
QuestionVideo Mixing??? Pin
jeykumars27-Apr-06 23:04
jeykumars27-Apr-06 23:04 
AnswerRe: Video Mixing??? Pin
Justin Tay28-Apr-06 2:51
Justin Tay28-Apr-06 2:51 
QuestionIdentifying OLE DB errors Pin
panzerdivisionmarkus27-Apr-06 22:35
panzerdivisionmarkus27-Apr-06 22:35 
Questionhexadecimal to decimal-newbie Pin
antonaras_marcou27-Apr-06 21:49
antonaras_marcou27-Apr-06 21:49 
AnswerRe: hexadecimal to decimal-newbie Pin
Nibu babu thomas27-Apr-06 21:55
Nibu babu thomas27-Apr-06 21:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.