Hi all!
I am having a problem in creating a docklet. It seems that the dock was not able to recognize my DLL even though I put it under the /docklets folder. When I choose Add Docklet... the dll I placed there will not appear on the list!
I included the YzDocklet.lib under Linker --> Input --> Additional Dependencies but it still does not work. I can't find my DLL in the list of docklets!
Here is my source code:
#include <windows.h>
#include "YzDocklet.h"
HWND g_hWndDocklet = NULL;
int g_idDocklet = -1;
HINSTANCE g_hInst = NULL;
LRESULT CALLBACK wndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
return (DefWindowProc(hWnd, message, wParam, lParam));
}
EXPORT HWND __cdecl OnInitialize(HINSTANCE hInst, HWND hWndDock, int idDocklet)
{
g_hInst = hInst;
g_hWndDocklet = hWndDock;
g_hWndDocklet = YzDockletCreate(hInst, idDocklet, wndProc);
g_idDocklet = idDocklet;
return g_hWndDocklet;
}
EXPORT void __cdecl YzDockletTerminate(HINSTANCE hInst, HWND hWndDocklet)
{
YzDockletDestroy(hInst, hWndDocklet);
}
EXPORT void __cdecl OnTerminate(HINSTANCE hInst, HWND hWndDocklet)
{
YzDockletDestroy(hInst, hWndDocklet);
}
EXPORT BOOL __cdecl OnLeftButtonClick(int x, int y, int width, int height, UINT key,
BOOL& isMenuPopup, TypeDockletAnim& typeAnim)
{
MessageBox(g_hWndDocklet, "Left button clicked", NULL, MB_OK);
return TRUE;
}
Help!
Aqua-Soft Forums