Click here to Skip to main content
15,889,034 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
AnswerRe: Set window position Pin
Chuck O'Toole5-Feb-12 4:57
Chuck O'Toole5-Feb-12 4:57 
GeneralRe: Set window position Pin
_Flaviu5-Feb-12 20:30
_Flaviu5-Feb-12 20:30 
QuestionGetter and setter style class implementation in VC++ Pin
Member 78851053-Feb-12 19:23
Member 78851053-Feb-12 19:23 
AnswerRe: Getter and setter style class implementation in VC++ Pin
Albert Holguin3-Feb-12 21:17
professionalAlbert Holguin3-Feb-12 21:17 
GeneralRe: Getter and setter style class implementation in VC++ Pin
Member 78851053-Feb-12 22:19
Member 78851053-Feb-12 22:19 
AnswerRe: Getter and setter style class implementation in VC++ Pin
Albert Holguin4-Feb-12 8:08
professionalAlbert Holguin4-Feb-12 8:08 
QuestionMessage for CASynsocket::OnConnect Pin
ForNow3-Feb-12 10:55
ForNow3-Feb-12 10:55 
AnswerRe: Message for CASynsocket::OnConnect Pin
Albert Holguin3-Feb-12 11:20
professionalAlbert Holguin3-Feb-12 11:20 
QuestionUpdating the color of child Window Pin
cpp_prgmer3-Feb-12 9:39
cpp_prgmer3-Feb-12 9:39 
AnswerRe: Updating the color of child Window Pin
Albert Holguin3-Feb-12 10:41
professionalAlbert Holguin3-Feb-12 10:41 
AnswerRe: Updating the color of child Window Pin
«_Superman_»3-Feb-12 15:32
professional«_Superman_»3-Feb-12 15:32 
QuestionHow to use DeviceIoControl to access an external USB device from MFC Pin
StefanKittel3-Feb-12 5:37
StefanKittel3-Feb-12 5:37 
AnswerRe: How to use DeviceIoControl to access an external USB device from MFC Pin
Erudite_Eric3-Feb-12 6:29
Erudite_Eric3-Feb-12 6:29 
GeneralRe: How to use DeviceIoControl to access an external USB device from MFC Pin
StefanKittel3-Feb-12 6:46
StefanKittel3-Feb-12 6:46 
GeneralRe: How to use DeviceIoControl to access an external USB device from MFC Pin
Erudite_Eric4-Feb-12 4:32
Erudite_Eric4-Feb-12 4:32 

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.