Solved

[windows] what type of variable is an handle ?

Posted on 2007-11-28
4
183 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

758 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

20 Experts available now in Live!

Get 1:1 Help Now