[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

[q]ID and Handle of a child window..

Posted on 1998-05-08
10
Medium Priority
?
208 Views
Last Modified: 2013-12-04
In BC++4.5, I used MDI in my application.
I want to convert a specific ID(integer) to handle type(hwnd) to use an API function such as InvalidateRegion.
In my application, many child windows are shown so I control one window in way of giving a specfic ID.
I think there exists a difference between integer type and hwnd type.. Right..?
 
How to do..?

Thanks..
0
Comment
Question by:lsjunii
[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
10 Comments
 

Author Comment

by:lsjunii
ID: 1399907
Edited text of question
0
 
LVL 8

Expert Comment

by:MikeP090797
ID: 1399908
Use the GetDlgItem() API to get the control hWnd by it's ID
0
 

Author Comment

by:lsjunii
ID: 1399909
Is GetDlgItem() for child window API funtion..?
I used it in the Dialogbox...
0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
LVL 15

Expert Comment

by:Tommy Hui
ID: 1399910
MikeP is correct. You can use GetDlgItem() for any windows regardless of whether it is a dialog or not.
0
 

Author Comment

by:lsjunii
ID: 1399911
Dear Thui and MikeP:

GetDlgItem needs two parameters; handle of dialog box and ID.
So I don't know how to give the handle of dialog box(hDlg) because I used a child WINDOW.
Is this right.?

Anyway, I know there exists a API function(GetWindow()) when I search GetDlgItem at the help file..
I want to give above points to whom reply this message first..

Thanks for your assistance..


0
 

Author Comment

by:lsjunii
ID: 1399912
Sorry, you right..
I know I should use only GetDlgItem function..
0
 

Author Comment

by:lsjunii
ID: 1399913
Please reply my another question related to this problem..
Subject:"[q]let me show my code.."

Thanks..
0
 
LVL 1

Expert Comment

by:lekshmikr
ID: 1399914
The GetDlgItem function retrieves the handle of a control in the specified dialog box.
HWND GetDlgItem(
    HWND hDlg,      // handle of dialog box
    int nIDDlgItem       // identifier of control
   );      
 

0
 

Author Comment

by:lsjunii
ID: 1399915
Dear MikeP:

Write your proposed answer here because I want to give my above points
0
 
LVL 8

Accepted Solution

by:
MikeP090797 earned 150 total points
ID: 1399916
k
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

656 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