An MDL dialog item usually has an access string that connects it to a published global variable. Here's an example taken from the delivered DialogBoxDemo...
DItem_TextRsc TEXTID_DialogDemoColor = { NOCMD, LCMD, SYNONYMID_DialogDemoColor, NOHELP, LHELPCMD, NOHOOK, NOARG, 3, "%-ld", "%ld", "0", "253", NOMASK, NOCONCAT, TXT_Color, "dlogdemo_colorNumber" };
Where dlogdemo_colorNumber is the item's access string. The item is placed in a dialog box resource like this...
{{X6, Y45, W2, 0}, Text, TEXTID_DialogDemoColor, ON, 0, "", ""},
In some circumstances, you may want to connect the dialog item to a different published variable. Rather than define a new item resource, one can override the access string like this...
{{X6, Y45, W2, 0}, Text, TEXTID_DialogDemoColor, ON, 0, "", "access=\"another_global_published_variable\""},
However, I'm having a problem overriding the access string for a ComboBox item...
{ { 13 * XC, GENY(2), 21 * XC, 0}, ComboBox, COMBOBOXID_Purpose, ON, ItemArgInterrogator, TXT_Purpose, "access=\"g_interrogatorVars.purpose\""},
In this case, the ComboBox continues to modify the access string defined in the item resource. The override has no effect.
Have I done something wrong, or is it impossible to override the access string of a ComboBox?
Unknown said:Can you provide a very simplified test case to review?
I added a couple of overridden ComboBoxes to the delivered CST Example. It occurred to me that my problem might have been caused by using a Unicode access string, so I overrode the example ComboBox twice, once with a multibyte string and once with a Unicode string...
Unfortunately (for me) both overridden ComboBoxes work fine. Now I'm stumped as to why my ComboBox in my app. doesn't work.
But thanks for your suggestion.
Regards, Jon Summers LA Solutions
Answer Verified By: Jon Summers
Hi Jon,
To try and get the most prompt solution/recommendation can you provide a very simplified test case to review? This will ensure no assumptions on my part and make easier to debug and file a defect if one is needed.
Sorry for any inconvenience though I believe this will provide the quickest resolution.
Thank you in advance,Bob
Unknown said:Does removing any "access=" and escaped double quotes (e.g. \", or \"" ), providing only your access string between a set of double quotes work?
Like this?
{ { 13 * XC, GENY(2), 21 * XC, 0}, ComboBox, ..., ..., ..., ..., "g_interrogatorVars.purpose"},
No, that doesn't work.
Unknown said:Check to see if providing "" vs "ItemArgInterrogator"
That [ItemArgInterrogator] is an integer modifier that informs the hook function. Changing it to 0 does nothing.
For a ComboBox does removing any "access=" and escaped double quotes (e.g. \", or \"" ), providing only your access string between a set of double quotes work?
Also check to see if providing "" vs "ItemArgInterrogator" using either form; access= or access string conventions; changes the results.
Thank you,Bob