On 14/01/2013 at 13:11, xxxxxxxx wrote:
No worries. Happens to me all the time.
I've got most of your code in place. But I'm afraid it's not working for me.
The Bitmap button is always blank.
The only code I couldn't use at all was this:
Bool PluginStart() {
Bool success;
success = MyDialog::InitStatic();
if (!success) {
MessageDialog("MyDialog class could not initialize internals.");
return FALSE;
}
// Register Command and Tag and stuff you need..
}
I'm guessing you want me to put that in the main.cpp file?
I couldn't make it work. But it looks like that just handles a no image found scenario. And shouldn't stop the plugin from working if there's an image in the tag.
You also used an Auto type C++ 11 feature that didn't work for me. I don't think the SDK supports this new C++ feature yet.
So I wrote it this way instead:
switch (type)
{
// Handle our custom message here !
case PMSG_GETSAMPLEIMAGE:
{
// C++11 Feature!
//auto data = (PMSG_GetSampleImageData* ) data; //<--Not supported by the SDK?
PMSG_GetSampleImageData *data = gNew PMSG_GetSampleImageData;
data->supported = TRUE;
data->bmp = image;
gDelete(data);
}
break;
}
I'm not sure if it's correct. But is doesn't crash.
I see what you're trying to do. But it's not working for me.
I'm still a learner with this C++ stuff so I might be doing something wrong.
Thanks anyway for trying to help,
-ScottA