|
-
July 20th, 2005, 02:44 PM
#1
Get Dialog Box ID
I am trying to get the ID of a dialog box inside the callback function. I figured the following should work:
Upon entry to the dialog callback function:
dlgidd = GetWindowLong(hwindow, GWL_ID); // Get the dialog ID number
if(dlgidd == 0)
{
radioID = GetLastError();
}
But I get the error "Invalid window handle". It happens even if I put it after the WM_INITDIALOG message. I have no problem setting a value (the 'hwindow' value seems okay for the SetWindowLong() function).
Any ideas? I must be doing something VERY stupid!!
I am passing different dialog box templates and I thought this would be a good way to get the ID without placing it as a parameter.
Thanks,
Brian
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|