Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
M

Member 2965471

@Member 2965471
About
Posts
36
Topics
15
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Drawing semitransparent rectangle
    M Member 2965471

    Hi, I'm drawing on a topmost semitransparent Window. I'd draw rectangle with transparent background. I tried: rec.Fill = new SolidColorBrush(Color.FromArgb(0, 255, 255, 255)); canvas.Children.Add(rec); but doesn't work. How can I do?

    WPF question graphics

  • Check if a window is hidden by another window
    M Member 2965471

    Hi all, how can I check if window is hidden by another window? I tried IsWindowVisible but doesn't work.

    C / C++ / MFC question

  • Avoid flicker
    M Member 2965471

    I use EnumWindows, the problem is that more than one windows pass the check(point in rect). How can I determine the right window on which lies the mouse?

    WPF graphics question

  • Avoid flicker
    M Member 2965471

    I don't know how perform hit test without hiding my window...

    WPF graphics question

  • Avoid flicker
    M Member 2965471

    because with visual tree I can handle only the windows that own to my application, but under the mouse cursor there may be a window of any application running on desktop.

    WPF graphics question

  • Avoid flicker
    M Member 2965471

    The main problem is to get the hwnd of the window immediately under my wpf topmost Window.

    WPF graphics question

  • Avoid flicker
    M Member 2965471

    Hi all, I've a transparent topmost window, I need on mouse move to highlight the window under the cursor I tried so in mouse_move_handler:

    ...
    this.Hide();
    hWnd = Win32.WindowFromPoint(p);
    this.Show();
    ...
    Win32.GetWindowRect(hWnd, ref rc);
    and so on drawing rectangle
    ...

    this code works, but I can't avoid flicker. There is some alternative way to do this?

    WPF graphics question

  • All window handle from point
    M Member 2965471

    hi, how can i get all the windows handle from a point? For example if in (100,100) i have two windows overlapped, i want to get the handle of the topmost window and the handle of the other window.

    C / C++ / MFC question tutorial

  • [Win32]Add context menu to edit control
    M Member 2965471

    I'm not using MFC. So i've to call SetWindowSubclass function and set my own EditProc in which handle WM_CONTEXTMENU?

    C / C++ / MFC question

  • [Win32]Add context menu to edit control
    M Member 2965471

    How can i add a context menu to an edit control? I try to handle WM_RBUTTONDOWN in the main window, but don't work if the mouse click is on the edit control.

    C / C++ / MFC question

  • [Win32]Set Dialog Bitmap Background
    M Member 2965471

    Hi, I've a modal dialog box and I've tried to set a bitmap background:

    case WM_ERASEBKGND:
    {
    HDC memDC, hdc;
    HBITMAP hBmp;
    BITMAP bmp;
    RECT rcc;

    hdc = GetDC(hDlg);
    hBmp = LoadBitmap(hInst, MAKEINTRESOURCE(IDB_BMP));
    memDC = CreateCompatibleDC(hdc);

    SelectObject(memDC,hBmp);
    GetObject(hBmp, sizeof(bmp), &bmp);
    GetClientRect(hDlg,&rcc);

    SetStretchBltMode(hdc, HALFTONE);
    StretchBlt(hdc,
    0,0, rcc.right,rcc.bottom,
    memDC,
    0,0,bmp.bmWidth, bmp.bmHeight,
    SRCCOPY);

    DeleteDC(memDC);
    DeleteObject(hBmp);
    ReleaseDC(hDlg,hdc);

    return (INT_PTR)TRUE;
    }

    this code set a background bitmap, but when I move or resize the dialog controls(edit,button,listbox,...) disappear under the bitmap...what's wrong?how can i repaint correctly the dialog?

    C / C++ / MFC question graphics

  • [Win32]Set bitmap to button
    M Member 2965471

    I know but don't work in that way!

    C / C++ / MFC graphics question

  • [Win32]Set bitmap to button
    M Member 2965471

    no because with BS_BITMAP style show bitmap only without text in the button. I need [Bitmap+Text]

    C / C++ / MFC graphics question

  • [Win32]Set bitmap to button
    M Member 2965471

    not NULL

    C / C++ / MFC graphics question

  • [Win32]Set bitmap to button
    M Member 2965471

    but is it possible to add an image with BM_SETIMAGE without ownerdraw button?

    C / C++ / MFC graphics question

  • [Win32]Set bitmap to button
    M Member 2965471

    Hi, I want to add a bitmap to a button in my DialogBox. The code is:

    case WM_INITDIALOG:

    hBmp = LoadBitmap(hInst, MAKEINTRESOURCE(IDB_QUIT));
    SendMessage(GetDlgItem(hDlg,ID_QUIT),BM_SETIMAGE,(WPARAM)IMAGE_BITMAP,(LPARAM)hBmp);

    return (INT_PTR)TRUE;

    but why don't work?

    C / C++ / MFC graphics question

  • [Win32]Scroll bitmap
    M Member 2965471

    I draw a bitmap in the window client area

    case WM_PAINT:
    hdc = BeginPaint(hWnd, &ps);
    memDC = CreateCompatibleDC(hdc);
    SelectObject(memDC,hbmp);
    GetObject(bmp, sizeof(bm), &bm);
    GetClientRect(hWnd,&rcc);

    BitBlt(hdc,
    0,0, rcc.right,rcc.bottom,
    memDC,
    0,0,SRCCOPY);

    If the the bitmap is bigger than the client area how can i implement VSCROLL and HSCROLL?

    C / C++ / MFC question graphics

  • [Win32] Threads communication
    M Member 2965471

    In my program I have a MainThread and more WorkerThread. Suppose that at certain event (which I'll manage) the MainTh must send a string (char []) to all WorkerTh, which will then process the request and send a response to MainTh. What methods provided by windows are more suitable to handle a similar thing?

    C / C++ / MFC question

  • [Win32] How draw a rectangle on the desktop
    M Member 2965471

    InvalidateRect doesn't work, the screen is still dirty.

    C / C++ / MFC graphics question

  • [Win32] How draw a rectangle on the desktop
    M Member 2965471

    Hi, I'm trying to draw a rectangle on the screen with MouseHook, but i can't:

    LRESULT CALLBACK MouseProc(int nCode,WPARAM wParam,LPARAM lParam)
    {
    LPMOUSEHOOKSTRUCT info=(LPMOUSEHOOKSTRUCT) lParam;
    static BOOL capturing = 0;
    Pen p(Color(255,255,0,0),5);
    Graphics g(GetDC(0));

    switch(wParam)
    {
    case WM_LBUTTONDOWN:
    capturing = TRUE;
    rcCaptured.left = info->pt.x;
    rcCaptured.top = info->pt.y;
    break;
    case WM_LBUTTONUP:
    if( capturing )
    {
    rcCaptured.right = info->pt.x;
    rcCaptured.bottom = info->pt.y;
    capturing = FALSE;
    }
    break;
    case WM_MOUSEMOVE:
    InvalidateRect(GetDesktopWindow(),NULL,FALSE);
    g.DrawRectangle(&p,rcCaptured.left,rcCaptured.top,info->pt.x-rcCaptured.left,info->pt.y-rcCaptured.top);
    break;
    }
    }

    how can force repaint of the screen? and how remove hook after select a rectangle?

    C / C++ / MFC graphics question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups