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
A

Aigledefer

@Aigledefer
About
Posts
2
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Need help
    A Aigledefer

    But the cmd.exe window is not listening.

    C / C++ / MFC help testing tools tutorial

  • Need help
    A Aigledefer

    I want to develop a tool which is similar with test automation tool. This tool launches a cmd window and writes some command lines in that window. Now I am able to get cmd window handle, but I don't know how to write the lines. Could anyone help me and I will appreciate it. Here is the code I have done. WinExec("cmd.exe", SW_SHOW); CWnd* pDeskWnd = CWnd::GetDesktopWindow(); CWnd* pPrevWnd = pDeskWnd->GetWindow(GW_CHILD); while (pPrevWnd) { CString s; pPrevWnd->GetWindowText(s); if (s.CompareNoCase("C:\\WINDOWS\\System32\\cmd.exe") == 0) { if (pPrevWnd->IsIconic()) pPrevWnd->ShowWindow(SW_RESTORE); pPrevWnd->SetForegroundWindow(); pPrevWnd->GetLastActivePopup()->SetForegroundWindow(); CWnd* pCmd = pPrevWnd->GetActiveWindow(); // CPoint id = pPrevWnd->GetActiveWindow();// GetDlgCtrlID(); // pPrevWnd->SetDlgItemText(id, "A command"); /* CDC* pDC = pPrevWnd->GetDC(); pDC->TextOut(0, 100, "A command I want to issue:)");*/ return; } pPrevWnd = pPrevWnd->GetWindow(GW_HWNDNEXT); }

    C / C++ / MFC help testing tools tutorial
  • Login

  • Don't have an account? Register

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