[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 212
  • Last Modified:

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

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
lsjunii
Asked:
lsjunii
1 Solution
 
lsjuniiAuthor Commented:
Edited text of question
0
 
MikeP090797Commented:
Use the GetDlgItem() API to get the control hWnd by it's ID
0
 
lsjuniiAuthor Commented:
Is GetDlgItem() for child window API funtion..?
I used it in the Dialogbox...
0
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
Tommy HuiCommented:
MikeP is correct. You can use GetDlgItem() for any windows regardless of whether it is a dialog or not.
0
 
lsjuniiAuthor Commented:
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
 
lsjuniiAuthor Commented:
Sorry, you right..
I know I should use only GetDlgItem function..
0
 
lsjuniiAuthor Commented:
Please reply my another question related to this problem..
Subject:"[q]let me show my code.."

Thanks..
0
 
lekshmikrCommented:
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
 
lsjuniiAuthor Commented:
Dear MikeP:

Write your proposed answer here because I want to give my above points
0
 
MikeP090797Commented:
k
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now