?
Solved

[windows] what type of variable is an handle ?

Posted on 2007-11-28
4
Medium Priority
?
201 Views
Last Modified: 2010-04-01
how do I create an array of handles?
0
Comment
Question by:Troudeloup
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 1600 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
 
LVL 86

Assisted Solution

by:jkr
jkr earned 1600 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 400 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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 be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

765 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