• entries
707
1173
• views
434872

# Wewt, progress!!!

103 views

DragonForge Technology SettingsDialog class.

Shown above is my brand new (first one actually) settings dialog system. After being supplied a Device instance, it sets up the dialog and displays it (it will enumerate the Device first if needed.) I'm pretty sure it's not being handled right at the moment as I don't know how to handle listbox selection changes correctly (at the moment I just wait for a notify-code of 9 which seems to work right.) If anybody knows how I'm actually supposed to handle this, I'd appreciate it.

I have a short-poll question: Which solution do you prefer for maps that are smaller than the current resolution?
A) Restrict maps to certain size. (Won't work since support for different resolutions is required. I really don't want to require that houses or caves fit into a resolution greater than or even equal to 1680x1050.)
B) Display black area around the map.
C) Center the map and display black around it.
D) Center the map and display a tiled background (tile will be set by the map maker.) (For example, if I was in a house I'd use a grass tile background.)
E) Center the map and display a tiled, scrolling background (like the sky.) (This won't really work for an example like the above one.)
F) Other

Btw, I started a LiveJournal (on the advice of my niece and her friends.) I'll probably be moving all of my non-gamedev stuff over there.

Anyway, back to work.

-edit-
stuff <_< >_>
Almost let it slip ahead of schedule lol. I guess this is one thing I'm going to have to figure out on my own.

-edit-
Guess I'm going with 'C) Center the map and display black around it.'

C for sure!

To deal with selection of items in the list-view you'll need to process WM_NOTIFY messages when the LOWORD(wParam) == the id of your list-view. Then treat the lParam as a LPNMHDR and check the code. It should be NM_CLICK or NM_DBCLICK depending on what you're wanting to handle (dragging selection is a separate issue). Something like

...
case WM_NOITFY:
// Figure out what was clicked on
if(LOWORD(wParam) == ID_YOURLISTVIEW && ((LPNMHDR)lParam))->code == NM_CLICK)
{
int index = ::SendMessage(hWndOfYourListView, LVM_GETNEXTITEM, -1, LVNI_FOCUSED);
// index now contains what's selected, you can then get the text via
// the LVM_GETITEMTEXT message.
// If for some reason nothing is selected index will be -1.
}



Thanks Tallitus, that helps a lot! I'd rate you up, but it seems I already have.

Yes, I definitively recommend method #C as well. It just seems to be the "nicest" one. It would be great for rooms, small shops, etc.