private String setExtraCommentForDialogResource(Data data) throws MemoryAccessException {

		final String[] afterTemplate = { "Menu", "Class", "Title", "Font Size", "Font Name" };
		final String[] templateType0 = { "None", "Predefined", "None" };
		final String[] afterItem = { "Class", "Title", "Data" };

		//just need this to use a method from the class
		DialogResourceDataType temp = new DialogResourceDataType();

		DumbMemBufferImpl buffer = new DumbMemBufferImpl(data.getMemory(), data.getAddress());

		StringBuilder comment = new StringBuilder();
		if (data.getBaseDataType().getName().equals("DialogResource")) {

			int offset = 0;
			//get first structure
			Data componentAt = data.getComponentContaining(offset);
			if (componentAt.isStructure() &&
				componentAt.getBaseDataType().getName().equals("DLGTEMPLATE")) {

				//determine if 3 or 5 components after initial structure
				int numAfter = 3;
				if ((buffer.getByte(0) & 0x40) > 0) {
					numAfter += 2;
				}

				int numItems = buffer.getShort(offset + 8);
				int currentItem = 0;
				comment.append("\nNumber of Items in Dialog: " + numItems);

				//get three or five components after initial structure
				for (int i = 0; i < numAfter; i++) {
					offset += componentAt.getLength();
					componentAt = data.getComponentContaining(offset);
					comment.append("\n" + afterTemplate[i] + ": ");
					if (componentAt.getBaseDataType().getName().equals("short")) {
						comment.append(componentAt.getDefaultValueRepresentation());
					}
					if (componentAt.getBaseDataType().getName().equals("short[1]")) {
						if (buffer.getShort(offset) == 0x0000) {
							comment.append(templateType0[i]);
						}
					}
					if (componentAt.getBaseDataType().getName().equals("short[2]")) {
						if ((buffer.getShort(offset) & 0xffff) == 0xffff) {
							int ordinal = buffer.getShort(offset + 2);
							comment.append("External Ordinal Number " + ordinal);
						}
					}

					if (componentAt.getBaseDataType().getName().equals("unicode")) {
						comment.append(
							fixupStringRepForDisplay(componentAt.getDefaultValueRepresentation()));
					}
				}
				//loop over item structures
				comment.append("\n");
				while (currentItem < numItems) {
					offset += componentAt.getLength();
					componentAt = data.getComponentContaining(offset);
					if (componentAt.getBaseDataType().getName().equals("DLGITEMTEMPLATE")) {
						currentItem++;
						comment.append("\nItem " + currentItem + ": ");
						//loop over three items after each item structure
						for (int i = 0; i < 3; i++) {
							offset += componentAt.getLength();
							componentAt = data.getComponentContaining(offset);
							comment.append("\n   " + afterItem[i] + ": ");
							if (componentAt.getBaseDataType().getName().startsWith("short[")) {
								//no other info
								if (buffer.getShort(offset) == 0x0000) {
									comment.append("None");
								}
								//followed by ordinal
								else if ((buffer.getShort(offset) & 0xffff) == 0xffff) {
									int ordinal = buffer.getShort(offset + 2);
									comment.append(temp.getItemType(ordinal));
								}
								//first item is size array
								else {
									int sizeArray = buffer.getShort(offset);
									comment.append(
										"Size " + sizeArray + " (see internals of structure)");
								}
							}

							if (componentAt.getBaseDataType().getName().equals("unicode")) {
								comment.append(fixupStringRepForDisplay(
									componentAt.getDefaultValueRepresentation()));
							}
						}
					}

				}
			}

		}
		return comment.toString();

	}
Gets a program property name to represent PE resource property with the given key name

@param key The key name
@return A program property name to represent PE resource property with the given key name
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pe/ResourceDataDirectory.java