[CE OpenCities Map MapPowerView 10.6.1.2] Combo box does not open

Hi All,

I’m working on an OpenCities Map PowerView (10.6.1.2) C++ plugin.
This is a migration process of an old plugin that was formerly run with Bentley V8i MapPowerView.
Originally it was written in C (compiled withbmake).

The problem is that when I click the ComboBox it does not Pop Open on the screen. I just can not see the items that I added to it.

Also if I click the ComboBox again its changeType becomes PopClose as if it had been open.

In the example I’m handling the StateChanging message in the ComboBox item hook. I try to refresh the string list that contains the items in the ComboBox, and it seems to do what it is supposed to, except the ComboBox does not Open.

What am I missing?


 Here you can find the cpp code:
}

void ComboBox_dialogItemHook_find ( DialogItemMessage    *dimP)
{
  StringList      *pS;
  long            k;
  RawItemHdr      *pRAW;

  switch (dimP->messageType)
  {   
	case DITEM_MESSAGE_CREATE:
	case DITEM_MESSAGE_SYNCHRONIZE:
    {
      pS = mdlStringList_create (0,1+1);     // nRow, nInfo
	  
	  ...

    case DITEM_MESSAGE_STATECHANGING:
    {
      if (dimP->u.stateChanging.changeType == StateChangingType::PopOpen)
      {   
        pRAW    = mdlDialog_comboBoxGetTextP    (dimP->dialogItemP->rawItemP);

        pS = mdlDialog_comboBoxGetStrListP (dimP->dialogItemP->rawItemP);
        if(!pS) 
          return;
        
		mdlStringList_deleteMember( pS, 0, -1 );

        WString temp_0 (L"Alpha");
        WString temp_1( L"Bravo" );
        WString temp_2( L"Charlie" );
        WString temp_3( L"Delta" );
        InfoField temp_info_0[2] = { 0, 12};
        InfoField temp_info_1[2] = { 0, 17};
        InfoField temp_info_2[2] = { 0, 35};
        InfoField temp_info_3[2] = { 0, 22};

        mdlStringList_deleteMember( pS, 0, -1 );
        mdlStringList_insertMember( &k, pS, -1, 1 );
        mdlStringList_setMember( pS, k, temp_0.GetWCharCP(), temp_info_0 );
		mdlStringList_insertMember( &k, pS, -1, 1 );
        mdlStringList_setMember( pS, k, temp_1.GetWCharCP(), temp_info_1 );
		mdlStringList_insertMember( &k, pS, -1, 1 );
        mdlStringList_setMember( pS, k, temp_2.GetWCharCP(), temp_info_2 );
		mdlStringList_insertMember( &k, pS, -1, 1 );
        mdlStringList_setMember( pS, k, temp_3.GetWCharCP(), temp_info_3 );

        mdlDialog_comboBoxSetStrListP( pRAW, pS, 1 );

      }

      if (StateChangingType::PopClose == dimP->u.stateChanging.changeType)
      {
      }   
    }
    break;
  }
  // ...
}

Here is the resource definition:
The name of the combo box is: COMBOBOX_MatchCodeValueFind

DialogBoxRsc DIALOGID_OBJ_FIND =
{
    DIALOGATTR_DEFAULT | DIALOGATTR_GROWABLE,
    GX(88), GY(28),
    NOHELP, MHELP, NOHOOK, NOPARENTID,
    "Objektum keresés",
  {
  { {GX(1), GY(1),GX(10),0}, OptionButton, OPTIONBUTTONID_ViewFind,                 ON, 0, "", ""},
  { {GX(18),GY(1),GX(15),0}, OptionButton, OPTIONBUTTONID_ViewTypeFind,            OFF, 0, "", ""},
  { {GX(40),GY(1),GX(35),0}, OptionButton, OPTIONBUTTONID_ObjectTypeIDFind,         ON, 0, "", ""},
                                                                                    
  { {GX(1), GY(3),GX(5), 0}, OptionButton, OPTIONBUTTONID_StartBracketFind,         ON, 0, "", ""},
  { {GX(6), GY(3),GX(25),0}, OptionButton, OPTIONBUTTONID_ColumnNameFind,           ON, 0, "", ""},
  { {GX(31),GY(3),GX(12),0}, OptionButton, OPTIONBUTTONID_MatchTypeFind,            ON, 0, "", ""},

  { {GX(43),GY(3), GX(20),0}, OptionButton, OPTIONBUTTONID_MatchValidListValueFind, HIDDEN | ON, 0, "", ""},
  { {GX(43),GY(3), GX(20),0}, ComboBox,     COMBOBOX_MatchCodeValueFind,       HIDDEN | ON, 0, "", ""},
  { {GX(43),GY(3), GX(20),0}, Text,         TEXTID_MatchIntValueFind,          HIDDEN | ON, 0, "", ""},    //   
  { {GX(43),GY(3), GX(20),0}, Text,         TEXTID_MatchFloatValueFind,        HIDDEN | ON, 0, "", ""},    //   
  { {GX(43),GY(3), GX(20),0}, Text,         TEXTID_MatchCharValueFind,         HIDDEN | ON, 0, "", ""},    //   
  { {GX(43),GY(3), GX(20),0}, Text,         TEXTID_MatchDateValueFind,         HIDDEN | ON, 0, "", ""},    //   

  { {GX(63),GY(3), GX(5), 0}, OptionButton, OPTIONBUTTONID_EndBracketFind,              ON, 0, "", ""},
  { {GX(68),GY(3), GX(7), 0}, OptionButton, OPTIONBUTTONID_MatchAppendFind,             ON, 0, "", ""},

  { {GX(0.5),GY(6), GX(75),GY(6) }, ListBox, LISTBOXID_WhereSQLFind,                     ON, 0, "", ""},

  { {GX(0.5),GY(14),GX(87),GY(12)}, ListBox, LISTBOXID_SQLReturnFind,                    ON, 0, "", ""},


  { {GX(1), GY(26.5),GX(60),0}, Text,       TEXTID_MessageFind,                          ON, 0, "", ""},    //   


  { {GX(77),GY(0.6), GX(10),0}, PushButton,   PUSHBUTTONID_AddFind,                       ON, 0, "", ""},
  { {GX(77),GY(2.6), GX(10),0}, PushButton,   PUSHBUTTONID_DropFind,                      ON, 0, "", ""},

  { {GX(77),GY(4.6), GX(10),0}, PushButton,   PUSHBUTTONID_ListFind,                      ON, 0, "", ""},
  { {GX(77),GY(6.6), GX(10),0}, PushButton,   PUSHBUTTONID_DumpFind,                      ON, 0, "", ""},
  { {GX(77),GY(8.6), GX(10),0}, PushButton,   PUSHBUTTONID_ZoomFind,                      ON, 0, "", ""},

  { {GX(84.6),GY(26.0),GX(3),GY(1.5)},PushButton, PUSHBUTTONID_ExtendListFind,     HIDDEN | ON, 0, "", ""},

  }
};

...

DItem_ComboBoxRsc COMBOBOX_MatchCodeValueFind =
{   NOCMD, LCMD, NOSYNONYM, NOHELP, MHELP, 
    HOOKITEMID_ComboBox, NOARG, 255, "", "", "", "", NOMASK,
    0,  20, 0, 0, 0, COMBOATTR_INDEXISVALUE, 
    "",
    "_findUI.ColumnInfo.j_matchCodeTableIndex",
    {   {0, 255, 0 , ""}, 
    }
};

...

Thanks in advance.

Br,

Miklos