Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

[windows] what type of variable is an handle ?

Posted on 2007-11-28
4
Medium Priority
?
204 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

Independent Software Vendors: 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

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 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 use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
Suggested Courses

636 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