Click here to Skip to main content
15,886,919 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CRichEditCtrl Font Formating Pin
yurii_leorda31-Jul-11 0:21
yurii_leorda31-Jul-11 0:21 
GeneralRe: CRichEditCtrl Font Formating Pin
Code-o-mat31-Jul-11 0:37
Code-o-mat31-Jul-11 0:37 
QuestionRuntime Error in Visual Studio [modified] Pin
AndrewG123129-Jul-11 12:09
AndrewG123129-Jul-11 12:09 
AnswerRe: Runtime Error in Visual Studio Pin
Richard Andrew x6429-Jul-11 13:07
professionalRichard Andrew x6429-Jul-11 13:07 
GeneralRe: Runtime Error in Visual Studio Pin
AndrewG123129-Jul-11 13:20
AndrewG123129-Jul-11 13:20 
GeneralRe: Runtime Error in Visual Studio Pin
Richard Andrew x6429-Jul-11 13:36
professionalRichard Andrew x6429-Jul-11 13:36 
GeneralRe: Runtime Error in Visual Studio Pin
AndrewG123129-Jul-11 14:24
AndrewG123129-Jul-11 14:24 
QuestionTaskbar button text [modified] Pin
kartikdasani29-Jul-11 2:24
kartikdasani29-Jul-11 2:24 
I am trying to get the list of windows displayed in the windows taskbar and am doing so in the following manner:
HWND hDesktop = GetDesktopWindow();
HWND hTray = FindWindow(_T("Shell_TrayWnd"), NULL );
HWND hReBar   = FindWindowEx( hTray, NULL, _T("ReBarWindow32")   , NULL );
HWND hTask    = FindWindowEx( hReBar, NULL, _T("MSTaskSwWClass")  , NULL );
HWND hToolbar = FindWindowEx(hTask,NULL,_T("ToolbarWindow32") , _T("Running Applications") );
long cnt = SendMessage(hToolbar, TB_BUTTONCOUNT,0,0);
long pid,hprocess,text,len;
WCHAR * buttontext[128];
GetWindowThreadProcessId(hToolbar(LPDWORD)pid);
hprocess = (long)OpenProcess(PROCESS_VM_READ|PROCESS_VM_WRITE|PROCESS_VM_OPERATION,0,pid);
text = (long)VirtualAllocEx((HANDLE)hprocess,0,sizeof(buttontext),MEM_COMMIT|MEM_RESERVE, PAGE_READWRITE);
for(int i=0;i<cnt;i++)
{
     len = SendMessage(hToolbar,TB_GETBUTTONTEXT,i,(LPARAM)text);
     if(len>-1)
     {
	ReadProcessMemory((HANDLE)hprocess, (LPCVOID)text,buttontext,sizeof(buttontext),NULL);
	wcout<<buttontext<<"\n";
     }
}

I have not been able to get the text and any other message eg:TB_PRESSBUTTON doesn't work either.
Any suggestions?

modified on Friday, July 29, 2011 8:38 AM

AnswerRe: Taskbar button text Pin
Richard MacCutchan29-Jul-11 2:34
mveRichard MacCutchan29-Jul-11 2:34 
AnswerRe: Taskbar button text Pin
«_Superman_»29-Jul-11 3:19
professional«_Superman_»29-Jul-11 3:19 
AnswerRe: Taskbar button text Pin
Richard MacCutchan29-Jul-11 6:54
mveRichard MacCutchan29-Jul-11 6:54 
Questionfunction header temporary variable Pin
LionAM29-Jul-11 0:37
LionAM29-Jul-11 0:37 
AnswerRe: function header temporary variable Pin
barneyman29-Jul-11 1:29
barneyman29-Jul-11 1:29 
GeneralRe: function header temporary variable Pin
LionAM29-Jul-11 3:03
LionAM29-Jul-11 3:03 
Questionoverloading operator<<() vs. namespaces Pin
Michal Kaut28-Jul-11 23:46
Michal Kaut28-Jul-11 23:46 
AnswerRe: overloading operator<<() vs. namespaces Pin
Rick York31-Jul-11 7:02
mveRick York31-Jul-11 7:02 
GeneralRe: overloading operator<<() vs. namespaces Pin
Michal Kaut31-Jul-11 22:32
Michal Kaut31-Jul-11 22:32 
GeneralRe: overloading operator<<() vs. namespaces Pin
Rick York3-Aug-11 12:36
mveRick York3-Aug-11 12:36 
QuestionMapping of file Pin
sarfaraznawaz28-Jul-11 21:42
sarfaraznawaz28-Jul-11 21:42 
AnswerRe: Mapping of file Pin
«_Superman_»29-Jul-11 3:37
professional«_Superman_»29-Jul-11 3:37 
GeneralRe: Mapping of file Pin
sarfaraznawaz29-Jul-11 20:30
sarfaraznawaz29-Jul-11 20:30 
GeneralRe: Mapping of file Pin
Richard Andrew x6431-Jul-11 6:30
professionalRichard Andrew x6431-Jul-11 6:30 
QuestionIssue with ShellExecute on Windows 7 in windows service application Pin
Ganesh_T28-Jul-11 21:14
Ganesh_T28-Jul-11 21:14 
AnswerRe: Issue with ShellExecute on Windows 7 in windows service application Pin
«_Superman_»29-Jul-11 3:25
professional«_Superman_»29-Jul-11 3:25 
QuestionGet Active WIndow Name Pin
Anu_Bala28-Jul-11 20:35
Anu_Bala28-Jul-11 20:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.