Click here to Skip to main content
15,887,812 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Serialization of enumerated types Pin
David Crow26-Sep-07 6:02
David Crow26-Sep-07 6:02 
AnswerRe: Serialization of enumerated types Pin
bob1697226-Sep-07 8:05
bob1697226-Sep-07 8:05 
GeneralRe: Serialization of enumerated types Pin
David Crow26-Sep-07 8:28
David Crow26-Sep-07 8:28 
GeneralRe: Serialization of enumerated types Pin
bob1697226-Sep-07 8:37
bob1697226-Sep-07 8:37 
QuestionRe: Serialization of enumerated types Pin
Nelek26-Sep-07 20:16
protectorNelek26-Sep-07 20:16 
AnswerRe: Serialization of enumerated types Pin
David Crow27-Sep-07 2:27
David Crow27-Sep-07 2:27 
GeneralRe: Serialization of enumerated types Pin
Nelek27-Sep-07 3:10
protectorNelek27-Sep-07 3:10 
QuestionLVN_ONITEMCHANGING Pin
paper6726-Sep-07 4:54
paper6726-Sep-07 4:54 
Hi,

Is there a possibility to get the previous item selection in a LVN_ONITEMCHANGING handler.
The handler provides the item that is about to change from unselected to selected, but I can not
find a way to get the item that loses the selection.

void CMPRSDlg::OnItemChangingMPRSLst(NMHDR *pNMHDR, LRESULT *pResult)
{
NM_LISTVIEW *pNMListView = (NM_LISTVIEW *) pNMHDR;

*pResult = 0;

// TODO : Add your control notification handler code here.
if (pNMListView->uChanged & LVIF_STATE)
{
int nItem = pNMListView->iItem;

// An item's state is about to change.
if (!(pNMListView->uOldState & LVIS_SELECTED) && (pNMListView->uNewState & LVIS_SELECTED))
{
// Item will go from unselected to selected.
ASSERT(::IsWindow(m_ctlMPRSLst.m_hWnd));

POSITION pos = m_ctlMPRSLst.GetFirstSelectedItemPosition();
/// THIS DOES NOT WORK. pos = NULL ???? Is there another way ?
:
:

// Prevent selection if the item is locked.
CMPRSEntry *pEntry = (CMPRSEntry *) m_ctlMPRSLst.GetItemData(nItem);

if (pEntry->m_SKU.IsLocked())
{
*pResult = 1;
return;
}
}
}
}
AnswerRe: LVN_ONITEMCHANGING Pin
Nelek26-Sep-07 5:37
protectorNelek26-Sep-07 5:37 
AnswerRe: LVN_ONITEMCHANGING Pin
Mark Salsbery26-Sep-07 5:46
Mark Salsbery26-Sep-07 5:46 
GeneralRe: LVN_ONITEMCHANGING Pin
paper6726-Sep-07 6:36
paper6726-Sep-07 6:36 
QuestionRe: LVN_ONITEMCHANGING Pin
Mark Salsbery26-Sep-07 7:12
Mark Salsbery26-Sep-07 7:12 
AnswerRe: LVN_ONITEMCHANGING Pin
paper6726-Sep-07 7:44
paper6726-Sep-07 7:44 
GeneralRe: LVN_ONITEMCHANGING Pin
Mark Salsbery26-Sep-07 8:05
Mark Salsbery26-Sep-07 8:05 
QuestionRe: LVN_ONITEMCHANGING Pin
Nelek26-Sep-07 20:25
protectorNelek26-Sep-07 20:25 
Questionoperator delete Pin
Waldermort26-Sep-07 4:13
Waldermort26-Sep-07 4:13 
AnswerRe: operator delete Pin
Maximilien26-Sep-07 4:25
Maximilien26-Sep-07 4:25 
AnswerRe: operator delete [modified] Pin
Randor 26-Sep-07 5:26
professional Randor 26-Sep-07 5:26 
GeneralRe: operator delete Pin
Waldermort26-Sep-07 6:23
Waldermort26-Sep-07 6:23 
Questionsyatem level Hooks related issue Pin
Sharad Goyal26-Sep-07 4:00
Sharad Goyal26-Sep-07 4:00 
AnswerRe: syatem level Hooks related issue Pin
ThatsAlok26-Sep-07 19:35
ThatsAlok26-Sep-07 19:35 
Questionthe function FILE Pin
youbo26-Sep-07 3:01
youbo26-Sep-07 3:01 
AnswerRe: the function FILE Pin
jhwurmbach26-Sep-07 3:34
jhwurmbach26-Sep-07 3:34 
AnswerRe: the function FILE Pin
toxcct26-Sep-07 3:40
toxcct26-Sep-07 3:40 
Questiongraph include? Pin
srvsah26-Sep-07 2:35
srvsah26-Sep-07 2:35 

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.