Solved

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

Posted on 1998-05-08
10
184 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

758 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

17 Experts available now in Live!

Get 1:1 Help Now