Click here to Skip to main content
15,901,122 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: wierd debug / release error... Pin
Joaquín M López Muñoz10-Jan-02 10:08
Joaquín M López Muñoz10-Jan-02 10:08 
GeneralRe: wierd debug / release error... Pin
l a u r e n10-Jan-02 10:55
l a u r e n10-Jan-02 10:55 
GeneralRe: wierd debug / release error... Pin
Joaquín M López Muñoz10-Jan-02 11:13
Joaquín M López Muñoz10-Jan-02 11:13 
GeneralRe: wierd debug / release error... Pin
Michael Dunn10-Jan-02 13:06
sitebuilderMichael Dunn10-Jan-02 13:06 
GeneralEnumWindows and EnumWindowsProc Pin
RobJones10-Jan-02 9:08
RobJones10-Jan-02 9:08 
GeneralRe: EnumWindows and EnumWindowsProc Pin
Joaquín M López Muñoz10-Jan-02 9:36
Joaquín M López Muñoz10-Jan-02 9:36 
GeneralRe: EnumWindows and EnumWindowsProc Pin
Ernest Laurentin10-Jan-02 10:20
Ernest Laurentin10-Jan-02 10:20 
GeneralRe: EnumWindows and EnumWindowsProc Pin
2-Feb-02 13:37
suss2-Feb-02 13:37 
I use this function to enum current dialog, i'm looking for a way to
look for a handle given in CString style.
I need to convert string to HWND bbut dont now how.
any ideas ?
anyway here's your enum sample.

BOOL CALLBACK EnumChildProc(HWND hWndParent,LPARAM lParam)
{
CString str = "";
char cCaption[1000];
char cClassName[1000];
int iCaptionMaxLength = 1000;
int iClassMaxLenght = 1000;

UINT nCtrlId = GetDlgCtrlID(hWndParent);
::GetClassName(hWndParent,cClassName,iClassMaxLenght);
::GetWindowText(hWndParent,cCaption,iCaptionMaxLength);
str.Format("%s,%s,%d,%d",cClassName,cCaption,nCtrlId,hWndParent);

HWND hDlg = GetParent(hWndParent);

SendMessage(GetDlgItem(hDlg,IDC_COMBO_CHILD),CB_ADDSTRING,0,(LPARAM)(LPCTSTR)str);

return TRUE;
}

void PP_HANDLE::OnButton6()
{
m_child.ResetContent();// combobox
HWND hWndParent = GetSafeHwnd();
EnumChildWindows(m_hWnd,EnumChildProc,0);

// Count handles and show it above the ComboBox
int iCount = m_child.GetCount();
char convert[8];
itoa(iCount,convert,10);
CString strCount;
strCount += "Found ";
strCount += convert;
strCount += " handle's.";
m_stcChild.SetWindowText(strCount);

// Set Current Selection
m_child.SetCurSel(0);
}

Bug Alert
Generalstupid VC++ 7 error... Pin
Mario M.10-Jan-02 8:15
Mario M.10-Jan-02 8:15 
GeneralRe: stupid VC++ 7 error... Pin
Nemanja Trifunovic10-Jan-02 8:36
Nemanja Trifunovic10-Jan-02 8:36 
GeneralRe: stupid VC++ 7 error... Pin
Mario M.10-Jan-02 8:43
Mario M.10-Jan-02 8:43 
GeneralRe: stupid VC++ 7 error... Pin
James R. Twine10-Jan-02 8:52
James R. Twine10-Jan-02 8:52 
GeneralRe: stupid VC++ 7 error... Pin
Mario M.10-Jan-02 9:28
Mario M.10-Jan-02 9:28 
GeneralRe: stupid VC++ 7 error... Pin
James R. Twine10-Jan-02 10:15
James R. Twine10-Jan-02 10:15 
GeneralRe: stupid VC++ 7 error... Pin
James R. Twine10-Jan-02 8:51
James R. Twine10-Jan-02 8:51 
GeneralRe: stupid VC++ 7 error... Pin
Christian Graus10-Jan-02 9:19
protectorChristian Graus10-Jan-02 9:19 
GeneralRe: stupid VC++ 7 error... Pin
Mario M.10-Jan-02 9:35
Mario M.10-Jan-02 9:35 
GeneralRe: stupid VC++ 7 error... Pin
Christian Graus10-Jan-02 9:47
protectorChristian Graus10-Jan-02 9:47 
GeneralRe: stupid VC++ 7 error... Pin
Mario M.10-Jan-02 10:22
Mario M.10-Jan-02 10:22 
GeneralRe: stupid VC++ 7 error... Pin
Christian Graus10-Jan-02 11:01
protectorChristian Graus10-Jan-02 11:01 
GeneralRe: stupid VC++ 7 error... Pin
Mario M.10-Jan-02 11:34
Mario M.10-Jan-02 11:34 
GeneralRe: stupid VC++ 7 error... Pin
Christian Graus10-Jan-02 11:42
protectorChristian Graus10-Jan-02 11:42 
GeneralRe: stupid VC++ 7 error... Pin
Mario M.10-Jan-02 11:51
Mario M.10-Jan-02 11:51 
GeneralRe: stupid VC++ 7 error... Pin
Tim Smith10-Jan-02 12:15
Tim Smith10-Jan-02 12:15 
GeneralRe: stupid VC++ 7 error... Pin
Mario M.10-Jan-02 12:33
Mario M.10-Jan-02 12: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.