2

So basically what I want to do is display the contents of a map on a child window of a parent window. Both the parts of map the key and value side by side. Should I iterate through the map save the values separately in char arrays and then pass it to the function?

CreateWindow("STATIC",MyMap,
          WS_VISIBLE|WS_CHILD,150,80,300,200,hwnd,NULL,NULL,NULL);

Is there any way to do that? When I have to display an array I just simply write the name of the array and it gets displayed.. and also for strings.. What can I do for the map?

davide
  • 1,918
  • 2
  • 20
  • 30
ffff
  • 19
  • 3
  • Use a `LISTVIEW` control in report mode with 2 columns. Iterate the `map` adding items to the ListView. Or use the ListView in virtual mode, using `LVN_GETDISPINFO` notifications to retrieve values from the `map` for display. – Remy Lebeau Apr 30 '15 at 09:40

1 Answers1

0

CreateWindow function requires a "LPCTSTR" string for its title argument. First generate a string from the map, and use that string for the window name.

See Stackoverflow question how to get string values from the map.

Community
  • 1
  • 1
  • 1
    Note that `"STATIC"` is a MS Windows common control (a static text label), for which the "title" proeprty really is the content. – MSalters Apr 30 '15 at 08:16