Click here to Skip to main content
16,009,464 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: ListCtrl Flicker Pin
David Crow15-Oct-04 5:56
David Crow15-Oct-04 5:56 
General"GetDlgItem" call Fails...... Pin
Pazzuzu14-Oct-04 21:54
Pazzuzu14-Oct-04 21:54 
GeneralRe: "GetDlgItem" call Fails...... Pin
toxcct14-Oct-04 22:43
toxcct14-Oct-04 22:43 
GeneralRe: "GetDlgItem" call Fails...... Pin
Maximilien15-Oct-04 2:48
Maximilien15-Oct-04 2:48 
GeneralRe: "GetDlgItem" call Fails...... Pin
Blake Miller15-Oct-04 4:38
Blake Miller15-Oct-04 4:38 
GeneralRe: "GetDlgItem" call Fails...... Pin
Pazzuzu17-Oct-04 20:09
Pazzuzu17-Oct-04 20:09 
GeneralRe: "GetDlgItem" call Fails...... Pin
Pazzuzu17-Oct-04 22:13
Pazzuzu17-Oct-04 22:13 
GeneralRe: "GetDlgItem" call Fails...... Pin
Blake Miller18-Oct-04 6:30
Blake Miller18-Oct-04 6:30 
I think this will work.

You need to add a public member function BOOL HandleChildEnum(HWND) to your view class.

If this does not work, then you can not enumerate from within the OnInitDialog, and a message will have to be posted to yourself to cause the enumeration.




// global function maps from global space to class space
BOOL CALLBACK MyEnumChildProc(
HWND hwndChild,
LPARAM lParam
){
// lParam was apointer to 'this' a C_PropView
C_PropView* pMyView = (C_PropView*)lParam;
// now call function within context of the class data
return pMyView->HandleChildEnum(hwndChild);
}


// now you have access to all your member variables and are within t he // context of your class BOOL C_PropView::HandleChildEnum(
HWND hWindowChild
){
return TRUE;
}


// call the child window enumerator
// make sure
BOOL C_PropView::OnInitDialog()
{
// make sure to call base class
// first, so all the MFC crap is initialized
CDialog::OnInitDialog();

// enumerate child windows
// passing in our window, the local function, and a point to 'this'
::EnumChildWindows(m_hWnd, MyEnumChildProc, (LPARAM)this);
}


GeneralI would like to convert int to char Pin
sacoskun14-Oct-04 21:34
sacoskun14-Oct-04 21:34 
GeneralRe: I would like to convert int to char Pin
Mad__14-Oct-04 22:03
Mad__14-Oct-04 22:03 
GeneralRe: I would like to convert int to char Pin
sacoskun14-Oct-04 22:06
sacoskun14-Oct-04 22:06 
GeneralRe: I would like to convert int to char Pin
Mad__14-Oct-04 22:11
Mad__14-Oct-04 22:11 
GeneralRe: I would like to convert int to char Pin
sacoskun14-Oct-04 22:16
sacoskun14-Oct-04 22:16 
GeneralRe: I would like to convert int to char Pin
Mad__14-Oct-04 22:53
Mad__14-Oct-04 22:53 
GeneralRe: I would like to convert int to char Pin
David Crow15-Oct-04 6:14
David Crow15-Oct-04 6:14 
GeneralRe: I would like to convert int to char Pin
David Crow15-Oct-04 6:03
David Crow15-Oct-04 6:03 
GeneralRe: I would like to convert int to char Pin
sacoskun16-Oct-04 2:20
sacoskun16-Oct-04 2:20 
GeneralRe: I would like to convert int to char Pin
toxcct14-Oct-04 22:40
toxcct14-Oct-04 22:40 
GeneralRe: I would like to convert int to char Pin
sacoskun14-Oct-04 22:49
sacoskun14-Oct-04 22:49 
GeneralRe: I would like to convert int to char Pin
toxcct14-Oct-04 22:54
toxcct14-Oct-04 22:54 
GeneralRe: I would like to convert int to char Pin
sacoskun14-Oct-04 23:04
sacoskun14-Oct-04 23:04 
GeneralRe: I would like to convert int to char Pin
Bob Stanneveld15-Oct-04 2:25
Bob Stanneveld15-Oct-04 2:25 
GeneralRe: I would like to convert int to char Pin
Sujan Christo14-Oct-04 22:06
Sujan Christo14-Oct-04 22:06 
QuestionHow to trace handle leaks Pin
Member 6562814-Oct-04 20:13
Member 6562814-Oct-04 20:13 
GeneralToolbar button state Pin
ledallam14-Oct-04 20:09
ledallam14-Oct-04 20:09 

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.