Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

BM_CLICK (Constants)
 
.

C# Constants:

const int BM_CLICK = 0x00F5;

Sample Code:

LRESULT APIENTRY buttonPlsVisibleProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{
    RECT r;
    switch (Msg) {
        case BM_CLICK:
            MessageBox(hWnd, L"Hello bn", NULL, MB_OK);
            break;


    case WM_INITDIALOG:
        SetBitmap(buttonPlsVisible, IDB_NOW_PLAYING);
        break;


    case WM_LBUTTONDOWN:
        SetBitmap(buttonPlsVisible, IDB_NOW_PLAYING);
        //GetClientRect(mainFrame, &r);
        //MoveWindow(hWnd, r.right - 28, 6, 24, 24, TRUE);
        //SetBitmap(hWnd, (isPlaylistVisible ? IDB_RESTORE_PRESSED : IDB_CLOSE_PRESSED));
        break;


    case WM_LBUTTONUP:
        //GetClientRect(mainFrame, &r);
        //MoveWindow(hWnd, r.right - 29, 5, 24, 24, TRUE);
        //SetBitmap(hWnd, (isPlaylistVisible ? IDB_RESTORE_NORMAL : IDB_CLODE_NORMAL));

        GetClientRect(pls_frame, &r);
        /*if (isPlaylistVisible) {
            for (int i = r.bottom - 300; i <= r.bottom - 50; i++)
                MoveWindow(mainFrame, 0, i, r.right, r.bottom - 50, TRUE);
        } else {
            for (int i = r.bottom - 50; i >= r.bottom - 300; i--)
                MoveWindow(mainFrame, 0, i, r.right, r.bottom-50, TRUE);
            MoveWindow(mainFrame, 0, r.bottom - 300, r.right, 300, TRUE);
        }*/

        if (isPlaylistVisible) {
            for(int i = 0; i > -176; i--)
                MoveWindow(pls_frame, i, 0, 200, r.bottom, TRUE);
        } else {
            for (int i = -176; i < 1; i++)
                MoveWindow(pls_frame, i, 0, 200, r.bottom, TRUE);
        }

        isPlaylistVisible = !isPlaylistVisible;
        SendMessage(parent, WM_SIZE, SIZE_RESTORED, 0);
        break;
    }


    return CallWindowProc(buttonPlsVisible_proc, hWnd, Msg, wParam, lParam);
}

 

Please edit this page!

Do you have...

  • helpful tips?
  • corrections to the existing content?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it!

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions