Click here to Skip to main content
15,888,286 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Question of DLL SendMessage to exe program Pin
Naveen17-Jul-06 18:52
Naveen17-Jul-06 18:52 
GeneralRe: Question of DLL SendMessage to exe program Pin
7nightlove17-Jul-06 22:33
7nightlove17-Jul-06 22:33 
Questionhow to set the button position??? Pin
mimimimilaw17-Jul-06 16:29
mimimimilaw17-Jul-06 16:29 
AnswerRe: how to set the button position??? Pin
Chris Losinger17-Jul-06 16:41
professionalChris Losinger17-Jul-06 16:41 
AnswerRe: how to set the button position??? Pin
Naveen17-Jul-06 17:26
Naveen17-Jul-06 17:26 
AnswerRe: how to set the button position??? Pin
Hamid_RT17-Jul-06 18:12
Hamid_RT17-Jul-06 18:12 
Questionsever Pin
With_problem17-Jul-06 16:24
With_problem17-Jul-06 16:24 
QuestionHow can we insert a new item to another program's ListCtrl control? Pin
tangbo617-Jul-06 15:58
tangbo617-Jul-06 15:58 
How can we insert a new item to another program's ListCtrl control?
I do this:

LVITEM lvi, *_lvi;
char item[512], *_item;
unsigned long pid;
HANDLE process;

GetWindowThreadProcessId(myHwnd1, &pid);
process=OpenProcess(PROCESS_VM_OPERATION|PROCESS_VM_READ|PROCESS_VM_WRITE|PROCESS_QUERY_INFORMATION, FALSE, pid);

_lvi=(LVITEM*)VirtualAllocEx(process, NULL, sizeof(LVITEM), MEM_COMMIT, PAGE_READWRITE);
_item=(char*)VirtualAllocEx(process, NULL, 512, MEM_COMMIT, PAGE_READWRITE);

lvi.cchTextMax=512;
lvi.iSubItem=1;
lvi.pszText=_item;

// WriteProcessMemory(process, _lvi, &lvi, sizeof(LVITEM), NULL);
// ::SendMessage(myHwnd1, LVM_GETITEMTEXT, (WPARAM)0, (LPARAM)_lvi);
// ReadProcessMemory(process, _item, item, 512, NULL);

lvi.iItem = 1;
lvi.iSubItem = 0;
lvi.pszText=_item;
WriteProcessMemory(process, _lvi, &lvi, sizeof(LVITEM), NULL);
i = (int)::SendMessage(myHwnd1, LVM_INSERTITEM, (WPARAM)0, (LPARAM)_lvi);

But there is problem when execute above, memory violate....
Who can help me??please!!!D'Oh! | :doh:

Who can help me??please!!!
QuestionDebug Assertion Failed(File wingdi.cpp, line : 1054) Pin
dashprasannajit17-Jul-06 15:41
dashprasannajit17-Jul-06 15:41 
QuestionRe: Debug Assertion Failed(File wingdi.cpp, line : 1054) Pin
Nibu babu thomas17-Jul-06 18:54
Nibu babu thomas17-Jul-06 18:54 
QuestionInherited Class as Base Class in ClassWizard? Pin
Reagan Conservative17-Jul-06 11:55
Reagan Conservative17-Jul-06 11:55 
AnswerRe: Inherited Class as Base Class in ClassWizard? Pin
Nibu babu thomas17-Jul-06 18:19
Nibu babu thomas17-Jul-06 18:19 
QuestionRegular expressions Pin
Harold_Wishes17-Jul-06 11:13
Harold_Wishes17-Jul-06 11:13 
AnswerRe: Regular expressions Pin
led mike17-Jul-06 11:24
led mike17-Jul-06 11:24 
Questiondynamic array of strings Pin
jon-8017-Jul-06 10:24
professionaljon-8017-Jul-06 10:24 
AnswerRe: dynamic array of strings [modified] Pin
Chris Losinger17-Jul-06 10:48
professionalChris Losinger17-Jul-06 10:48 
GeneralRe: dynamic array of strings Pin
led mike17-Jul-06 11:02
led mike17-Jul-06 11:02 
GeneralRe: dynamic array of strings Pin
Chris Losinger17-Jul-06 11:06
professionalChris Losinger17-Jul-06 11:06 
GeneralRe: dynamic array of strings Pin
led mike17-Jul-06 11:19
led mike17-Jul-06 11:19 
GeneralRe: dynamic array of strings Pin
jon-8018-Jul-06 10:52
professionaljon-8018-Jul-06 10:52 
GeneralRe: dynamic array of strings Pin
Chris Losinger18-Jul-06 11:33
professionalChris Losinger18-Jul-06 11:33 
QuestionRe: dynamic array of strings Pin
jon-8019-Jul-06 5:39
professionaljon-8019-Jul-06 5:39 
AnswerRe: dynamic array of strings Pin
Chris Losinger19-Jul-06 5:46
professionalChris Losinger19-Jul-06 5:46 
QuestionRe: dynamic array of strings Pin
jon-8019-Jul-06 6:05
professionaljon-8019-Jul-06 6:05 
AnswerRe: dynamic array of strings Pin
Chris Losinger19-Jul-06 6:57
professionalChris Losinger19-Jul-06 6:57 

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.