Microsoft KB Archive/259284

= BUG: List Is Not Repopulated in the OLE Standard Insert Object Dialog Box If You Specify IOF_SHOWINSERTCONTROL =

Article ID: 259284

Article Last Modified on 10/23/2003

-

APPLIES TO


 * Microsoft COM+ 2.0 Standard Edition, when used with:
 * Microsoft Windows 2000 Standard Edition

-



This article was previously published under Q259284



SYMPTOMS
When you specify the IOF_SHOWINSERTCONTROL flag in the OleUIInsertObject function or the Microsoft Foundation Class (MFC) COleInsertDialog class, the Create Control radio button is displayed. However, when the user switches between the Create New and Create Control radio buttons, the list does not change.



CAUSE
A cache is added to the OLE standard Insert Object dialog box so that the list of objects appears more quickly. This problem occurs because the cache is not flushed when you change between objects and controls.



RESOLUTION
The cache is cleared only if you call OleUIInsertObject again with a different set of flags. To work around this problem, change the user interface so that the user first has to select whether to insert objects or controls. Then, use the following code so that the user can see a list of either objects or controls: if (bObjects) dwFlags=IOF_SELECTCREATENEW; else dwFlags=IOF_SHOWINSERTCONTROL | IOF_SELECTCREATECONTROL; In the case of controls, if the user clicks Create New, controls still appear in the list.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.



Steps to Reproduce Behavior
  Call the OleUIInsertObject function or the MFC COleInsertDialog class, and make sure that you specify the following flags: IOF_SELECTCREATEFROMFILE | IOF_SHOWINSERTCONTROL Notice that the Create Control radio button appears, but the Create from File radio button is selected initially.  Click Create New to populate the list with objects, and then click Create Control. Notice that the list does not change (it is not repopulated) to display the controls as expected.

Keywords: kbbug kbfix kboleapp KB259284

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.