Gumape

Hi,

I need some information about how can I add new item to the 'Look in' combobox on the common file open dialog in c++ (like in Visual Studio 2005 'FTP Locations').

I know, the resource id is cmb2 (Dlgs.h), therefore I can add new string to this combo, but i don't know,

how can i add icon and pidl to this. When I call the CB_GETITEMDATA for an existing member,

for example the 'Desktop', it returns not null, but I don't know what type of structure point it.

I think all necessary information is inside in this unknown structure, because if I add a new string to this combo and ask the CB_GETITEMDATA of the 'Desktop' item, and set this data to the new item (CB_SETITEMDATA),

and delete the 'Desktop' item from the combo, the new item behaves like the old 'Desktop' item.

Can you give me some information about this structure, and how can i use it

Thanks,

Vilmos Nagy



Re: Visual C++ General Open file dialog

Shakje

As I understand it, when you use CB_GETITEMDATA it retrieves a UINT which is usually really just an index used internally and sent to the combo box with CB_SETITEMDATA. The value used for the desktop member is probably added internally to specify special behaviour for the desktop object. In order to actually change the way the list is populated I'm guessing there's a totally different way of doing it (if it is in fact possible), completely unrelated to getitemdata.




Re: Visual C++ General Open file dialog

Gumape

Thanks for your help Shakje.

Have you got any idea, how can I add a new item to this combo

If I add text only, without user data, the file open dialog crashes.

Thanks,

Vilmos Nagy