?
Solved

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

Posted on 1998-05-08
10
Medium Priority
?
202 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
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
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…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

752 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