Click here to Skip to main content
15,891,529 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How can restart windows when user log off Pin
geo_m20-Aug-04 3:48
geo_m20-Aug-04 3:48 
QuestionHow to remove CLOSE Button from right top corner? Pin
kriaz19-Aug-04 21:03
kriaz19-Aug-04 21:03 
AnswerRe: How to remove CLOSE Button from right top corner? Pin
David Crow20-Aug-04 3:11
David Crow20-Aug-04 3:11 
Generalorientation of printing Pin
jvriend19-Aug-04 20:59
jvriend19-Aug-04 20:59 
GeneralRe: orientation of printing Pin
BadJerry20-Aug-04 3:54
BadJerry20-Aug-04 3:54 
GeneralRe: orientation of printing Pin
Andrew Peace22-Aug-04 5:49
Andrew Peace22-Aug-04 5:49 
QuestionHow to build a SAFEARRAY? Pin
anderslundsgard19-Aug-04 20:59
anderslundsgard19-Aug-04 20:59 
AnswerRe: How to build a SAFEARRAY? Pin
Antony M Kancidrowski20-Aug-04 0:01
Antony M Kancidrowski20-Aug-04 0:01 
This will generate a safe array of BSTRs. Hope the example helps.

// Generate the safe array for the data
VARIANT		var;
int		nSize = <enter size here>;
VariantInit(&var);

var.vt = VT_ARRAY | VT_BSTR;

SAFEARRAY*		pSA;
SAFEARRAYBOUND	bounds = {nSize, 0};	// nSize items starting with index 0

pSA = SafeArrayCreate(VT_BSTR, 1, &bounds);

BSTR*	bstrArray;

// Access the data and add the new items
SafeArrayAccessData(pSA, reinterpret_cast<void**>(&bstrArray));

for (int i = 0; i < nSize; i++)
{
  // Set the element	
  bstrArray[i] = <enter data here>;
}

SafeArrayUnaccessData(pSA);

var.parray = pSA;


Ant.

I'm hard, yet soft.
I'm coloured, yet clear.
I'm fruity and sweet.
I'm jelly, what am I? Muse on it further, I shall return!
- David Williams (Little Britain)

GeneralRe: How to build a SAFEARRAY? Pin
anderslundsgard20-Aug-04 0:10
anderslundsgard20-Aug-04 0:10 
GeneralRe: How to build a SAFEARRAY? Pin
Antony M Kancidrowski20-Aug-04 0:27
Antony M Kancidrowski20-Aug-04 0:27 
GeneralRe: How to build a SAFEARRAY? Pin
anderslundsgard20-Aug-04 0:31
anderslundsgard20-Aug-04 0:31 
QuestionHow to prepare code for using COM Pin
dudic19-Aug-04 20:42
dudic19-Aug-04 20:42 
AnswerRe: How to prepare code for using COM Pin
Rory Solley19-Aug-04 21:39
Rory Solley19-Aug-04 21:39 
QuestionHow to enable hibernation support in VC++? Pin
ErisonWu19-Aug-04 20:38
ErisonWu19-Aug-04 20:38 
AnswerRe: How to enable hibernation support in VC++? Pin
geo_m20-Aug-04 3:53
geo_m20-Aug-04 3:53 
Generalerror LNK2019 using AFX_MODULE_STATE in Release version Pin
sugumar19-Aug-04 20:08
sugumar19-Aug-04 20:08 
GeneralRe: error LNK2019 using AFX_MODULE_STATE in Release version Pin
Antony M Kancidrowski20-Aug-04 0:09
Antony M Kancidrowski20-Aug-04 0:09 
GeneralThreads and shared basic datatypes Pin
Cohen19-Aug-04 20:07
Cohen19-Aug-04 20:07 
GeneralRe: Threads and shared basic datatypes Pin
User 58385219-Aug-04 20:25
User 58385219-Aug-04 20:25 
GeneralRe: Threads and shared basic datatypes Pin
Henry miller20-Aug-04 3:29
Henry miller20-Aug-04 3:29 
Generalboost::regex++ Pin
alex.barylski19-Aug-04 19:59
alex.barylski19-Aug-04 19:59 
GeneralRe: boost::regex++ Pin
User 58385219-Aug-04 20:06
User 58385219-Aug-04 20:06 
GeneralRe: boost::regex++ Pin
alex.barylski19-Aug-04 20:35
alex.barylski19-Aug-04 20:35 
GeneralRe: boost::regex++ Pin
Jon Hulatt19-Aug-04 20:55
Jon Hulatt19-Aug-04 20:55 
GeneralRe: boost::regex++ Pin
Nemanja Trifunovic20-Aug-04 3:27
Nemanja Trifunovic20-Aug-04 3:27 

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.