Solved

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

Posted on 1998-05-08
10
185 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
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
 
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
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.

 

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 50 total points
ID: 1399916
k
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

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…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

911 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