The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: z941998 on March 14, 2011, 01:51:04 PM

Title: Dialog problem
Post by: z941998 on March 14, 2011, 01:51:04 PM
Hi all,

Attached is a popup that I created.

The errors I get are:
     SetDlgItemInt: Instruction failed error code 1421: Control ID not found and
     GetDlgItemInt: Instruction failed error code 1421: Control ID not found

The popup compiles and runs with all controls being displayed.
I can enter data into each control.
However, the two functions to load and save the data is failing because of the above.
You can see that the control ids are there.

Any suggestions?
Title: Re: Dialog problem
Post by: MichaelW on March 14, 2011, 05:32:43 PM
 GetDlgItemInt (http://msdn.microsoft.com/en-us/library/ms645485(VS.85).aspx) and  SetDlgItemInt (http://msdn.microsoft.com/en-us/library/ms645485(VS.85).aspx) both expect the control to be identified with a control identifier, and you are passing a HWND (returned by  GetDlgItem (http://msdn.microsoft.com/en-us/library/ms645481(VS.85).aspx)).

Title: Re: Dialog problem
Post by: z941998 on March 15, 2011, 04:47:20 AM
Sorry, I miss read the SDK parameter definitions.   Thanks Steve