Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Columns UI SDK - extending cui::colours::client ("unresolved exte (Read 2842 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Columns UI SDK - extending cui::colours::client ("unresolved exte

I'm trying to add my component's custom colour to Columns UI -> Colours and Fonts settings page.

Code: [Select]
class colours_client : public cui::colours::client {
    virtual const GUID & get_client_guid() const {
        static const GUID guid = { 0x6004a690, 0x4cfc, 0x11dd, { 0xae, 0x16, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66 } };
        return guid;
    }
    virtual void get_name (pfc::string_base & p_out) const {
        p_out.set_string("My colour");
    }
    virtual t_size get_supported_bools() const { return 0; }
    virtual bool get_themes_supported() const { return true; }
    virtual void on_colour_changed(t_size mask) const { /* */ }
    virtual void on_bool_changed(t_size mask) const { /* */ }
};

cui::colours::client::factory< colours_client > g_colours_client_factory;


Trying to compile this code results in error:
Code: [Select]
1>Compiling...
1>colours_client.cpp
1>Linking...
1>colours_client.obj : error LNK2001: unresolved external symbol "public: static struct _GUID const columns_ui::colours::client::class_guid" (?class_guid@client@colours@columns_ui@@2U_GUID@@B)
1>D:\SDK\foobar2000\test\Release\test.dll : fatal error LNK1120: 1 unresolved externals


I'm using Visual Studio Express.

 

Columns UI SDK - extending cui::colours::client ("unresolved exte

Reply #1
Sorry I forgot to include those GUIDs..

Paste this at about line 101 in columns_ui.cpp

Code: [Select]
// {A4AE2971-64C8-4118-8E2A-EFDC37A59372}
const GUID colours::client::class_guid =
{ 0xa4ae2971, 0x64c8, 0x4118, { 0x8e, 0x2a, 0xef, 0xdc, 0x37, 0xa5, 0x93, 0x72 } };

// {3FBCC2B0-978E-406f-A446-4677E0D4C58E}
const GUID fonts::client::class_guid =
{ 0x3fbcc2b0, 0x978e, 0x406f, { 0xa4, 0x46, 0x46, 0x77, 0xe0, 0xd4, 0xc5, 0x8e } };
.