Click here to Skip to main content
15,885,244 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to Find files using http url path? Pin
SIJUTHOMASP26-Apr-09 3:37
professionalSIJUTHOMASP26-Apr-09 3:37 
GeneralRe: How to Find files using http url path? Pin
ThatsAlok26-Apr-09 18:34
ThatsAlok26-Apr-09 18:34 
QuestionStartup program blocked. Pin
Le@rner25-Apr-09 2:57
Le@rner25-Apr-09 2:57 
Questionhead file including problem Pin
linux_xjtu25-Apr-09 0:19
linux_xjtu25-Apr-09 0:19 
AnswerRe: head file including problem Pin
Garth J Lancaster25-Apr-09 0:37
professionalGarth J Lancaster25-Apr-09 0:37 
GeneralRe: head file including problem Pin
linux_xjtu25-Apr-09 2:24
linux_xjtu25-Apr-09 2:24 
GeneralRe: head file including problem Pin
Stuart Dootson25-Apr-09 3:26
professionalStuart Dootson25-Apr-09 3:26 
Questionsetting active audio output vista [modified] Pin
Snoepie25-Apr-09 0:03
Snoepie25-Apr-09 0:03 
Confused | :confused: i am trying to adapt
http://www.codeproject.com/KB/system/AudioConfigurationManager.aspx to work under vista sp2.

Having it all running except for the interaction with the applet's button's
using i can't get it to supply me with information.

This code part gives me a headache:

ZeroMemory(&lvItem,sizeof(LVITEM));
ZeroMemory(&lState,0,sizeof(LVITEM));
ZeroMemory(&item,512);
defaultButton = handAcq->findChildWindow(appletWindow,BUTTON,DEFAULT_BUTTON);
listView = handAcq->findChildWindow(appletWindow,COMBO_BOX,NULL);
GetWindowThreadProcessId(listView,&procID);
HANDLE lView=OpenProcess(PROCESS_VM_OPERATION|PROCESS_VM_READ|PROCESS_VM_WRITE|PROCESS_QUERY_INFORMATION,false,procID);
if (lView)
{
LVITEM *_lvi=(LVITEM*)VirtualAllocEx(lView, NULL, sizeof(LVITEM),MEM_COMMIT,
PAGE_READWRITE);
char *_item=(char*)VirtualAllocEx(lView, NULL, 512, MEM_COMMIT, PAGE_READWRITE);
lvi.cchTextMax=512;
lvi.pszText=_item;

_lvi->stateMask= (UINT)-1;
_lvi->mask=LVIF_STATE;

if (applyButton && defaultButton) //found buttons
{
// THIS DOESN'T WORK, RETURNS AN EMPTY lvitem STRUCTURE
SendMessage(listView, LVM_GETITEMSTATE, (WPARAM)0, (LPARAM)_lvi);
ReadProcessMemory(lView, _lvi, &lState, sizeof(LVITEM), NULL);


// THIS WORKS AND RETURNS THE ITEM NAMES
SendMessage(listView, LVM_GETITEMTEXT, (WPARAM)0, (LPARAM)_lvi);
ReadProcessMemory(lView, _item, item, 512, NULL);
}

There are no errors, just ignores any interaction with the applet other then retrieving strings.

What am i doing wrong?

modified on Saturday, April 25, 2009 9:02 AM

AnswerRe: setting active audio output vista Pin
Yovav25-Apr-09 0:21
Yovav25-Apr-09 0:21 
GeneralRe: setting active audio output vista Pin
Snoepie25-Apr-09 0:37
Snoepie25-Apr-09 0:37 
AnswerRe: setting active audio output vista Pin
Stuart Dootson25-Apr-09 0:57
professionalStuart Dootson25-Apr-09 0:57 
GeneralRe: setting active audio output vista Pin
Snoepie25-Apr-09 1:18
Snoepie25-Apr-09 1:18 
GeneralRe: setting active audio output vista Pin
Snoepie25-Apr-09 3:04
Snoepie25-Apr-09 3:04 
GeneralRe: setting active audio output vista Pin
Stuart Dootson25-Apr-09 3:17
professionalStuart Dootson25-Apr-09 3:17 
GeneralRe: setting active audio output vista Pin
Snoepie25-Apr-09 3:36
Snoepie25-Apr-09 3:36 
Questionextern usage problem Pin
linux_xjtu24-Apr-09 23:27
linux_xjtu24-Apr-09 23:27 
AnswerRe: extern usage problem Pin
Stuart Dootson25-Apr-09 0:19
professionalStuart Dootson25-Apr-09 0:19 
AnswerRe: extern usage problem Pin
linux_xjtu25-Apr-09 0:23
linux_xjtu25-Apr-09 0:23 
QuestionHow to determine if the current window is the desktop ? Pin
Yovav24-Apr-09 23:10
Yovav24-Apr-09 23:10 
AnswerRe: How to determine if the current window is the desktop ? Pin
Hamid_RT24-Apr-09 23:26
Hamid_RT24-Apr-09 23:26 
GeneralRe: How to determine if the current window is the desktop ? Pin
Yovav25-Apr-09 0:23
Yovav25-Apr-09 0:23 
QuestionHow to set focus on the next window after minimizing ? Pin
Yovav24-Apr-09 22:32
Yovav24-Apr-09 22:32 
AnswerRe: How to set focus on the next window after minimizing ? [modified] Pin
Yovav24-Apr-09 22:55
Yovav24-Apr-09 22:55 
QuestionMicrosoft Soap tool Kit compatible with all the versions of mssoap.dll Pin
Member 401661624-Apr-09 22:13
Member 401661624-Apr-09 22:13 
QuestionService not started. Pin
Le@rner24-Apr-09 21:39
Le@rner24-Apr-09 21:39 

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.