Solved

[windows] what type of variable is an handle ?

Posted on 2007-11-28
4
186 Views
Last Modified: 2010-04-01
how do I create an array of handles?
0
Comment
Question by:Troudeloup
  • 2
4 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 400 total points
ID: 20367975
Juat use

HANDLE array1[42];

or

HWND array2[42];

Jandles are opaque data structures that pretend to be "complex", but in fact they aren't. Basically, they represent an index into an internal table that windows uses to store more information.
0
 

Author Comment

by:Troudeloup
ID: 20368010
0
 
LVL 86

Assisted Solution

by:jkr
jkr earned 400 total points
ID: 20368040
No, in that case, you'd use

vector<HWND> array2;

or

vector<HANDLE> array1;

Then yozu can use 'array1.size();' to find out about the size.
0
 
LVL 53

Assisted Solution

by:Infinity08
Infinity08 earned 100 total points
ID: 20368043
>> does array.size()
>> 
>> work?

Not if array is defined like jkr showed. You might want to use a vector instead.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now