ResEdit programming issue

Eric's Edge

Tinkerer
Oct 31, 2021
122
87
28
I’m stumped! The DITL renders the controls but the DLOG does not! I’ve rechecked and rebuilt it twice.

F600EB6E-608D-4A7A-A395-3E72E89782FB.jpeg
 

Eric's Edge

Tinkerer
Oct 31, 2021
122
87
28
Went ahead and created it anyway. It renders correctly from the program. However, when I am reading the minutes dialog box, the following code segment isn't working properly. It is able to get the val - the position of the selected menu item. GetItem() either returns a garbage string (first resource created) or an empty string (second attempt at building the resource) instead of the menu text. Same problem with the hours dialog box. The original code used the val returned by GetCtlValue() for the hour since it starts at 1 and increments by 1 so the position happens to correspond with the menu text.

C:
GetDItem(dialog, iMinutesPopup, &itemType, &itemType, &itemHandle, &itemRect);
val = GetCtlValue((ControlHandle)itemHandle);
menu = GetMHandle(mMinutes);
GetItem(menu, val, string);
StringToNum(string, &tmp);
reminder->minute = tmp;