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
C

capint

@capint
About
Posts
53
Topics
17
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Picasa Web Albums Data API
    C capint

    I want to write an application interacting with Picasa Web Albums of Google by MFC. I've read this document : http://code.google.com/apis/gdata/basics.html[^] but I still have no idea how to write it in MFC. Some one plz help me :rose:

    C / C++ / MFC c++ html com json help

  • How to convert from AVI to WMV
    C capint

    :D R u present me a software to convert. I would like to use MFC to do that :(.

    C / C++ / MFC help tutorial

  • How to convert from AVI to WMV
    C capint

    I'm writing a program to record window activities but I just can save in AVI format. I would like to convert it to WMV format. Some one plz help me :rose:

    C / C++ / MFC help tutorial

  • Send message to window
    C capint

    This is my code :

    HWND windowHandle = ::FindWindow(0, _T("Test"));
    INPUT *key;
    ::SetForegroundWindow(windowHandle);
    key = new INPUT;
    key->type = INPUT_KEYBOARD;
    key->ki.wVk = VK_CONTROL;
    key->ki.dwFlags = 0;
    key->ki.time = 0;
    key->ki.wScan = 0;
    key->ki.dwExtraInfo = 0;
    SendInput(1,key,sizeof(INPUT));
    key->ki.dwExtraInfo = KEYEVENTF_KEYUP;
    SendInput(1,key,sizeof(INPUT));

    ::SendMessage(windowHandle,WM_KEYUP,0,0); //==> No effect ?

    C / C++ / MFC help

  • Send message to window
    C capint

    I've read many pages from the pages you gave me but I still can't find the answer :( They recommend to use SendMessage but it doesn't work with SendMessage...

    C / C++ / MFC help

  • Send message to window
    C capint

    Plz help me one more time. I would like to know how to send WM_KEYUP by SendInput. When I send a key, it seems to be pressed forever ...

    C / C++ / MFC help

  • Send message to window
    C capint

    Thank you very much :D

    C / C++ / MFC help

  • Send message to window
    C capint

    Could you show me an example of using SendInput to send a key to an active window plz ? I find it difficult to find a specific example :(

    C / C++ / MFC help

  • Send message to window
    C capint

    What do you mean ? Do I have to send three messages at one time ?

    C / C++ / MFC help

  • Send message to window
    C capint

    I want to send a key to a window. I used Global Hook and my code is like this : //In hook proc : if(nCode <0) CallNextHookEx(MyHook,nCode,wParam,lParam); hWndApp = CWnd::FindWindow(0,_T("Test")); if (hWndApp == NULL) MessageBox(NULL,L" Can't find the window", L"",0); hWndApp->SendMessage(WM_CHAR, 8, 0); //Backspace It can find the window but it can't send the message. Some one plz help me :rose:

    C / C++ / MFC help

  • Capture control
    C capint

    Thanks so much Nibu babu thomas, I got it :D

    C / C++ / MFC help

  • Capture control
    C capint

    I write a program to capture window controls. I used global mouse hook to catch mouse message. I want that when I move my mouse to a control, there's a rectangle around that control. I got the handle of the control, drew the rectangle but my problem is when I move to another control, the previous rectangle hasn't disappeared yet. I tried RedrawWindow() like this but there was no effect :

    CDC *hScrDC;
    hScrDC = CDC::FromHandle ( ::GetDCEx(NULL, NULL, 0));
    //Tmp is the CDC * of the control
    Tmp->RedrawWindow(NULL, NULL, RDW_ERASE | RDW_INVALIDATE | RDW_FRAME | RDW_ALLCHILDREN);
    RECT rect;
    Tmp->GetWindowRect(&rect);
    int nX = rect.left;
    int nY = rect.top;
    int nX2 = rect.right;
    int nY2 = rect.bottom;
    hScrDC->Rectangle(nX, nY, nX2, nY2);

    Some one plz help me :rose:

    C / C++ / MFC help

  • Please help me to solve a problem about global mouse hook
    C capint

    I created a dll file like this :

    HHOOK MyHook;
    HINSTANCE MyInstance;
    LRESULT CALLBACK MyMouseHookProc(int nCode, WPARAM wParam, LPARAM lParam);
    extern "C" __declspec(dllexport) void Hook();
    extern "C" __declspec(dllexport) void Unhook();

    //I initialized MyInstance
    BOOL CMouseHook1App::InitInstance()
    {
    CWinApp::InitInstance();
    MyHook = NULL;
    MyInstance = this->m_hInstance;
    return TRUE;
    }

    void Hook()
    {
    if(MyHook == NULL && MyInstance != NULL )
    {
    MyHook = SetWindowsHookEx(WH_MOUSE,MyMouseHookProc,MyInstance, 0);
    if(MyHook!= NULL)
    MessageBox(NULL,_T(" HOOKED "), _T(""),0);
    }
    else
    MessageBox(NULL,L" Not Hooked", L"",0);

    }

    LRESULT CALLBACK MyMouseHookProc(int nCode, WPARAM wParam, LPARAM lParam)
    {
    if(nCode <0)
    {
    CallNextHookEx(MyHook,nCode,wParam,lParam);
    return 0;
    }

    if(wParam == WM_LBUTTONDOWN || wParam == WM_NCLBUTTONDOWN)
    {
    MessageBox(NULL,_T("OK"),_T("Test"),MB_OK);
    PostMessage(hWndApp,WM_LBUTTONDOWN,0,0);
    }

    return CallNextHookEx(MyHook,nCode,wParam,lParam);

    }

    But in my app, when I use the function Hook(), it doesn't work at all. Did I do anything wrong? Someone plz help me

    C / C++ / MFC help question

  • Save CBitmap object to disk
    C capint

    Thanks so much :D

    C / C++ / MFC graphics help

  • Save CBitmap object to disk
    C capint

    I save a CBitmap object to disk with this code : CDC * pDC = GetDC(); CBitmap Bitmap; Bitmap.CreateCompatibleBitmap(pDC,screenMaxX, screenMaxY); Image.Attach(Bitmap); Image.Save(_T("xxx.bmp")); but the bitmap I saved was completely black Some one plz help me :rose:

    C / C++ / MFC graphics help

  • Connection pooling
    C capint

    I'm using ADO to connect to database in C++. I would like to understand about the technique "Connection pooling" but I can't find any document about it in C++. Some one plz help me ...

    Database c++ database help

  • How to hide window when the app starts ?
    C capint

    Thanks so much. It's really helpful ...

    C / C++ / MFC tutorial question

  • How to hide window when the app starts ?
    C capint

    Do you mean setting the visible property to false ? I did so but there's no effect :(

    C / C++ / MFC tutorial question

  • How to hide window when the app starts ?
    C capint

    I have an app with an icon on system tray. I want to hide the window (just let the icon appear). I tried to use dlg->ShowWindow(SW_HIDE)instead of DoModal() but when the icon appears, it's useless (when we move the mouse to it, it disappears). Someone plz give me a solution, thanks :rose:

    C / C++ / MFC tutorial question

  • Connect database when start with window
    C capint

    I don't know :-O I will wander some IT forum to ask if anyone has the same problem. Thanks for all of your answers :)

    C / C++ / MFC database debugging help
  • Login

  • Don't have an account? Register

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