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

C / C++ / MFC

 
AnswerRe: How do you go about making a custom control? Pin
NiceNaidu7-Jul-06 21:32
NiceNaidu7-Jul-06 21:32 
GeneralRe: How do you go about making a custom control? Pin
Lord Kixdemp8-Jul-06 13:12
Lord Kixdemp8-Jul-06 13:12 
Questionstack simulation [modified] Pin
trinh_van7-Jul-06 18:00
trinh_van7-Jul-06 18:00 
QuestionArray/CListBox Issue Pin
SySt7-Jul-06 17:07
SySt7-Jul-06 17:07 
AnswerRe: Array/CListBox Issue Pin
Steve Echols7-Jul-06 20:38
Steve Echols7-Jul-06 20:38 
GeneralRe: Array/CListBox Issue Pin
SySt8-Jul-06 1:31
SySt8-Jul-06 1:31 
QuestionCTabCtrl with CFormViews instead of CDialogs Pin
Tygernoot7-Jul-06 14:00
Tygernoot7-Jul-06 14:00 
Questionproblem selecting listview item Pin
method0077-Jul-06 11:22
method0077-Jul-06 11:22 
I am using this code to select a listview item. i specify the postion of item using (WPARAM)2 . So this one supposed to highlight and selct the postion 2 in the listview. But unfortuently it does not select but it does deselct. I mean if the item is selected by mouse click it can deselect it but can not select it. Could any one tell me what i am doing wrong here.Thanks


SendMessage(listview, LVM_SETITEMSTATE, (WPARAM)2, (LPARAM)_lvi);

void CSelectuserDlg::OnButton1() <br />
{<br />
	// TODO: Add your control notification handler code here<br />
<br />
	HWND listview=NULL;  // List View identifier <br />
 HWND parent,child; <br />
 parent=NULL; <br />
 child=NULL; <br />
 parent = ::FindWindow("My Window Class",NULL); <br />
<br />
 child =::FindWindowEx(parent,0,"WTL_SplitterWindow",NULL); <br />
 child =::FindWindowEx(child,0,"WTL_SplitterWindow",NULL); <br />
 child =::FindWindowEx(child,0,"WTL_SplitterWindow",NULL); <br />
 child =::FindWindowEx(child,0,"ATL:0053C8D0",NULL); <br />
 listview=::FindWindowEx(child,0,"SysListView32",NULL); <br />
<br />
 LVITEM lvi, *_lvi; <br />
 unsigned long pid; <br />
 HANDLE process; <br />
<br />
 GetWindowThreadProcessId(listview, &pid); <br />
 process=OpenProcess(PROCESS_VM_OPERATION|PROCESS_VM_READ|PROCESS_VM_WRITE|PROCESS_QUERY_INFORMATION, FALSE, pid); <br />
<br />
    <br />
 _lvi=(LVITEM*)VirtualAllocEx(process, NULL, sizeof(LVITEM), MEM_COMMIT, PAGE_READWRITE); <br />
 lvi.mask = LVIF_STATE; <br />
 lvi.state = true; <br />
 lvi.stateMask = LVIS_SELECTED; <br />
<br />
 WriteProcessMemory(process, _lvi, &lvi, sizeof(LVITEM), NULL); <br />
 ::SendMessage(listview, LVM_SETITEMSTATE, (WPARAM)2, (LPARAM)_lvi); <br />
 VirtualFreeEx(process, _lvi, 0, MEM_RELEASE);<br />
	<br />
}

Questionstrange prototype [modified] Pin
Jay037-Jul-06 11:08
Jay037-Jul-06 11:08 
AnswerRe: strange prototype Pin
Steve Echols7-Jul-06 11:19
Steve Echols7-Jul-06 11:19 
QuestionSir , I am in need of math library. Pin
CodeVarma7-Jul-06 9:07
CodeVarma7-Jul-06 9:07 
AnswerRe: Sir , I am in need of math library. Pin
earl7-Jul-06 11:27
earl7-Jul-06 11:27 
AnswerRe: Sir , I am in need of math library. Pin
ThatsAlok9-Jul-06 22:00
ThatsAlok9-Jul-06 22:00 
QuestionSerialize CListCtrl Pin
DanYELL7-Jul-06 8:44
DanYELL7-Jul-06 8:44 
AnswerRe: Serialize CListCtrl Pin
Ravi Bhavnani7-Jul-06 8:46
professionalRavi Bhavnani7-Jul-06 8:46 
QuestionFormating of Date in class CTime? Pin
G Haranadh7-Jul-06 8:38
G Haranadh7-Jul-06 8:38 
AnswerRe: Formating of Date in class CTime? Pin
Ravi Bhavnani7-Jul-06 8:45
professionalRavi Bhavnani7-Jul-06 8:45 
AnswerRe: Formating of Date in class CTime? Pin
ThatsAlok9-Jul-06 20:58
ThatsAlok9-Jul-06 20:58 
QuestionControlling the volume' sound in DirectX Pin
Alex Cutovoi7-Jul-06 6:41
Alex Cutovoi7-Jul-06 6:41 
AnswerRe: Controlling the volume' sound in DirectX Pin
Justin Tay7-Jul-06 6:49
Justin Tay7-Jul-06 6:49 
GeneralRe: Controlling the volume' sound in DirectX Pin
Alex Cutovoi7-Jul-06 8:23
Alex Cutovoi7-Jul-06 8:23 
Questionhelp coloring individual listview item instead of all listview item in visual c++ [modified] Pin
method0077-Jul-06 6:16
method0077-Jul-06 6:16 
AnswerRe: help coloring individual listview item instead of all listview item in visual c++ Pin
Justin Tay7-Jul-06 6:20
Justin Tay7-Jul-06 6:20 
GeneralRe: help coloring individual listview item instead of all listview item in visual c++ Pin
method0077-Jul-06 6:24
method0077-Jul-06 6:24 
GeneralRe: help coloring individual listview item instead of all listview item in visual c++ Pin
PJ Arends7-Jul-06 6:29
professionalPJ Arends7-Jul-06 6:29 

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.