CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2002
    Location
    China
    Posts
    53

    Question How to use picture botton and edit box?

    Just like the picture, thanks...
    Attached Images Attached Images

  2. #2
    Join Date
    Jun 2003
    Posts
    58
    Use Bitmap Button Style ?

    for Edit Background used :

    WM_CTLCOLOREDIT for or WM_CTLCOLORSTATIC;
    WM_CTLCOLOREDIT is for EDIT Text ;
    WM_CTLCOLORSTATIC is for Readonly Edit Text
    case WM_CTLCOLOREDIT :
    {hBmp=LoadImage(...);
    HBRUSH hBrush=CreatePatternBrush(hBmp);
    return hBrush;
    }

  3. #3
    Join Date
    Mar 2002
    Location
    China
    Posts
    53
    When I use Bitmap Button Style. Should I must use SendMessage(...)?

    SendMessage(
    (HWND) hWnd, // handle to destination window
    BM_SETIMAGE, // message to send
    (WPARAM) wParam, // image type
    (LPARAM) lParam // handle to the image (HANDL)
    )

    Code:
    HBITMAP hBit1;
    hBit1=LoadBitmap(hInstance,"IDB_LARC");
    SendMessage(hwnd,BM_SETIMAGE,IMAGE_BITMAP,(LPARAM)hBit1);
    I notice the botton have frame, how can I get rid the frame, only picture I want.
    Last edited by had; January 3rd, 2004 at 11:07 PM.

  4. #4
    Join Date
    Jun 2003
    Posts
    58
    Dunno I never try BITMAP Button,
    May be, you can Remove the Border style From BUTTON Window,
    or
    if it doesn't work, use try to used Owner draw Button.

  5. #5
    Join Date
    Mar 2002
    Location
    China
    Posts
    53
    Owner draw Button, It works very good. thanks all.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured