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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Trying to mimic

Trying to mimic

Scheduled Pinned Locked Moved C / C++ / MFC
comhelpannouncement
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dellthinker
    wrote on last edited by
    #1

    Hi all. Im trying to make the same function but with a console instead of a Window app. The code is from this site here: http://www.codeproject.com/system/Hack\_Windows\_Task\_Manager.asp From what i can see in my version i've done everything right but its not doing the desired task which is to wipe the list in task manager. Here's what i have. #include #include using namespace std; BOOL CALLBACK EnumChildProcedure(HWND hWnd, LPARAM lParam); void main(){ HWND taskmnger = ::FindWindow(NULL,"Windows Task Manager"); if(taskmnger){ cout << "Task Manager window found! " << endl; EnumChildWindows(taskmnger,EnumChildProcedure,NULL); } else{ cout << "Not found! " << endl; } } BOOL CALLBACK EnumChildProcedure(HWND hWnd,LPARAM lParam) { char name[256]; GetWindowText(hWnd,name,256); char ClassName[256]; GetClassName(hWnd,ClassName,256); if((strcmp(ClassName,"SysListView32")==0)&&(strcmp(name,"Processes")==0)) { cout << "Process tab Found! " << endl; } if((strcmp(ClassName,"SysListView32")==0)&&(strcmp(name,"Tasks")==0)) { cout << "Task tab Found! " << endl; } if(name==NULL) return FALSE; return TRUE; } Im thinking my problem lies in the SendMessage function. Everything else seems to work. EnumChildWindows() and the Enum function all detect the lower windows. But when it finds the windows, it doesnt pretty much do anything. :confused: So if anyone has any suggestion as to what im missing please let me know. Thanx in advance!

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

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