Problem C++ LNK2019 error

Asked

Viewed 127 times

0

Gravity Code Description Project Path File Line Deletion State

Erro    LNK2019 símbolo externo indefinido "public: void __thiscall Shop::ButtonScroll(short)" (?ButtonScroll@Shop@@QAEXF@Z) referenciado na função "long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z)    

I have a problem with my code someone knows what it can be?

    class Shop
{
public:
    static              Shop*   GetInstance() { static Shop instance; return &instance; }
    void                RecvItemToServer(SHOP * Shop);
    void                SendItemToServer(SHOP_ITEM item);
    void                RecvCoinToServer(SHOP_COIN * Shop);
    bool                MouseAction(int x, int y, int w, int h);
    bool                IsOpen() { return fOpen; }
    void                Open();
    void                Init();
    void                Draw();
    void                Close();
    void                Button();
    int                 GetSlot();
    int                 GetScroll();
    void                ButtonScroll(short Dist);
private:
    int                Image[84];
    bool               fOpen;
    int                Scroll;
    int                Tag;
    int                SubTag;
    int                Coin;
}; 

meu if

        case WM_MOUSEWHEEL:

        if (hFocusWnd)

        {
            if (((short)HIWORD(wParam)) / 120 > 0 && sinChatEnter)

            {
                if (ChatScrollPoint < 32 && ChatBuffCnt - ChatScrollPoint >= 14)
                    ChatScrollPoint += 1;
            }
            if (((short)HIWORD(wParam)) / 120 < 0 && sinChatEnter)

            {
                if (ChatScrollPoint != 0)
                    ChatScrollPoint -= 1;
            }
        }

        if (g_IsDxProjectZoomIn <= 0 && !Shop::GetInstance()->IsOpen() && !hFocusWnd && !TShop::GetInstance()->IsOpen() || g_iFzmCursorFocusGame && !Shop::GetInstance()->IsOpen() && !TShop::GetInstance()->IsOpen() && !hFocusWnd)
        {
            zDelta = (short)HIWORD(wParam);

            if (cSinHelp.sinGetScrollMove(-zDelta / 16) == TRUE) break;
            if (TJBscrollWheel(zDelta) == TRUE) break;

            if (whAnx == ANX_NONE) whAnx = anx + zDelta;
            else whAnx += zDelta;
            AutoCameraFlag = FALSE;
        }

        Shop::GetInstance()->ButtonScroll((short)(HIWORD(wParam)) / 120);
        TShop::GetInstance()->ButtonScroll((short)(HIWORD(wParam)) / 120);

        break;

1 answer

0

Buttonscroll method definition of Shop class is missing.

  • how would I do that ? thanks for the help

  • 1

    You have to write the Shop::Buttonscroll method...

Browser other questions tagged

You are not signed in. Login or sign up in order to post.