Click here to Skip to main content
15,910,661 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionSegFault Pin
chidacode5-Feb-12 7:07
chidacode5-Feb-12 7:07 
AnswerRe: SegFault Pin
Albert Holguin5-Feb-12 8:45
professionalAlbert Holguin5-Feb-12 8:45 
AnswerRe: SegFault Pin
CPallini5-Feb-12 21:57
mveCPallini5-Feb-12 21:57 
GeneralRe: SegFault Pin
Albert Holguin6-Feb-12 10:14
professionalAlbert Holguin6-Feb-12 10:14 
AnswerRe: SegFault Pin
Stephen Hewitt6-Feb-12 4:07
Stephen Hewitt6-Feb-12 4:07 
QuestionTCP/IP problems Pin
ForNow4-Feb-12 16:27
ForNow4-Feb-12 16:27 
AnswerRe: TCP/IP problems Pin
Mohibur Rashid5-Feb-12 4:34
professionalMohibur Rashid5-Feb-12 4:34 
AnswerRe: TCP/IP problems Pin
Albert Holguin5-Feb-12 8:42
professionalAlbert Holguin5-Feb-12 8:42 
GeneralRe: TCP/IP problems Pin
ForNow5-Feb-12 12:14
ForNow5-Feb-12 12:14 
GeneralRe: TCP/IP problems Pin
Albert Holguin5-Feb-12 13:46
professionalAlbert Holguin5-Feb-12 13:46 
GeneralRe: TCP/IP problems Pin
ForNow5-Feb-12 16:05
ForNow5-Feb-12 16:05 
Questionsystem phisycal drive Pin
RomTibi4-Feb-12 6:15
RomTibi4-Feb-12 6:15 
AnswerRe: system phisycal drive Pin
Rajesh R Subramanian4-Feb-12 8:15
professionalRajesh R Subramanian4-Feb-12 8:15 
GeneralRe: system phisycal drive Pin
RomTibi5-Feb-12 2:04
RomTibi5-Feb-12 2:04 
GeneralRe: system phisycal drive Pin
Jochen Arndt5-Feb-12 3:00
professionalJochen Arndt5-Feb-12 3:00 
GeneralRe: system phisycal drive Pin
RomTibi5-Feb-12 3:12
RomTibi5-Feb-12 3:12 
GeneralRe: system phisycal drive Pin
Jochen Arndt5-Feb-12 3:25
professionalJochen Arndt5-Feb-12 3:25 
GeneralRe: system phisycal drive Pin
RomTibi5-Feb-12 4:31
RomTibi5-Feb-12 4:31 
GeneralRe: system phisycal drive Pin
parths5-Feb-12 20:01
parths5-Feb-12 20:01 
GeneralRe: system phisycal drive Pin
Jochen Arndt5-Feb-12 22:43
professionalJochen Arndt5-Feb-12 22:43 
AnswerRe: system phisycal drive Pin
«_Superman_»4-Feb-12 17:20
professional«_Superman_»4-Feb-12 17:20 
AnswerRe: system phisycal drive Pin
RomTibi14-Feb-12 17:57
RomTibi14-Feb-12 17:57 
QuestionSet window position Pin
_Flaviu4-Feb-12 5:34
_Flaviu4-Feb-12 5:34 
I want to set a window position below on listctrl selected item :
C++
// CMyDlg.cpp
BOOL CMyDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	// TODO: Add extra initialization here
	SetIcon(m_hIcon, FALSE);
	SetWindowPos(NULL, m_nX, m_nY, 0, 0, SWP_NOSIZE | SWP_NOZORDER);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}


and from an form with a list-control, I want to show above dialog right below of selected list-control item :
C++
int nItem = 0;
POSITION pos = m_List.GetFirstSelectedItemPosition();
if(pos)nItem = m_List.GetNextSelectedItem(pos);
CRect rect;
CPoint point;
CMyDlg dlg;
m_List.GetWindowRect(rect);
m_List.GetItemPosition(nItem,&point);
ClientToScreen(&point);
dlg.m_nX = rect.left;
dlg.m_nY = rect.top + point.y;
dlg.DoModal();


still, the CMyDlg dialog does not position right below of selected listcontrol item ...

I didn't find an list-control method to help me out ... can you give me a little ideea ?

Thank you.
AnswerRe: Set window position Pin
Richard Andrew x644-Feb-12 10:57
professionalRichard Andrew x644-Feb-12 10:57 
GeneralRe: Set window position Pin
_Flaviu4-Feb-12 21:33
_Flaviu4-Feb-12 21:33 

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.