Click here to Skip to main content
15,893,337 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to start .exe and get hWnd Pin
Goggelmoggel25-Apr-07 7:25
Goggelmoggel25-Apr-07 7:25 
AnswerRe: How to start .exe and get hWnd Pin
Mark Salsbery25-Apr-07 8:29
Mark Salsbery25-Apr-07 8:29 
AnswerRe: How to start .exe and get hWnd Pin
Hamid_RT25-Apr-07 9:01
Hamid_RT25-Apr-07 9:01 
GeneralRe: How to start .exe and get hWnd Pin
David Crow25-Apr-07 10:29
David Crow25-Apr-07 10:29 
GeneralRe: How to start .exe and get hWnd Pin
Stephen Hewitt25-Apr-07 14:22
Stephen Hewitt25-Apr-07 14:22 
GeneralRe: How to start .exe and get hWnd Pin
Hamid_RT25-Apr-07 18:51
Hamid_RT25-Apr-07 18:51 
AnswerRe: How to start .exe and get hWnd Pin
jk chan25-Apr-07 23:28
jk chan25-Apr-07 23:28 
QuestionHandle to a window? Pin
iayd25-Apr-07 6:33
iayd25-Apr-07 6:33 
Hi How can I set a Handle to a window?For example I want to create a new dialog box when I push the first button in main dialog box.And I want to destroy the created dialog box when I push the second button in main dialog box.I wrote this code to do that:

void CMainDialog::OnButton1()
{
CDlg1 *dlg1 = new CDlg1;
dlg1->Create(IDD_DIALOG1,this);
dlg1->ShowWindow(SW_SHOW);
dlg1->Attach(hwnd);
}

void CMainDialog::OnButton2()
{
CDlg1 *dlg1 = (CDlg1 *) FromHandlePermanent(hwnd);
dlg1->DestroyWindow();
}
That doesn't work.It doesn't give a syntax error but when I push the buttons it fails.How can I attach a handle to a window and how can I use this handle?And how can I solve this problem?
Thanks
AnswerRe: Handle to a window? Pin
David Crow25-Apr-07 6:51
David Crow25-Apr-07 6:51 
QuestionVC++2005 : how do I enable the xp look in my app? Pin
Joan M25-Apr-07 6:28
professionalJoan M25-Apr-07 6:28 
AnswerRe: VC++2005 : how do I enable the xp look in my app? Pin
krmed25-Apr-07 8:04
krmed25-Apr-07 8:04 
GeneralRe: VC++2005 : how do I enable the xp look in my app? Pin
Joan M25-Apr-07 8:12
professionalJoan M25-Apr-07 8:12 
QuestionWindows form in C++ Pin
Anka_Ame25-Apr-07 5:46
Anka_Ame25-Apr-07 5:46 
AnswerWrong forum Pin
CPallini25-Apr-07 6:05
mveCPallini25-Apr-07 6:05 
AnswerRe: Windows form in C++ Pin
Hamid_RT25-Apr-07 6:41
Hamid_RT25-Apr-07 6:41 
QuestionConvert VC+ 2003 Project to VC++ 6.0 Pin
JBAK_CP25-Apr-07 4:14
JBAK_CP25-Apr-07 4:14 
AnswerRe: Convert VC+ 2003 Project to VC++ 6.0 Pin
GuyM25-Apr-07 4:35
GuyM25-Apr-07 4:35 
GeneralRe: Convert VC+ 2003 Project to VC++ 6.0 Pin
JBAK_CP25-Apr-07 5:00
JBAK_CP25-Apr-07 5:00 
QuestionBitmap Copying Pin
PsychicSmurf25-Apr-07 4:00
PsychicSmurf25-Apr-07 4:00 
QuestionSorting CListCtrl with LVS_OWNERDATA property? Pin
bosfan25-Apr-07 3:34
bosfan25-Apr-07 3:34 
AnswerRe: Sorting CListCtrl with LVS_OWNERDATA property? Pin
GuyM25-Apr-07 3:39
GuyM25-Apr-07 3:39 
GeneralRe: Sorting CListCtrl with LVS_OWNERDATA property? Pin
bosfan25-Apr-07 4:15
bosfan25-Apr-07 4:15 
QuestionHELP! About CoUninitialize() Pin
kcynic25-Apr-07 3:08
kcynic25-Apr-07 3:08 
AnswerRe: HELP! About CoUninitialize() Pin
Sam_c25-Apr-07 3:15
Sam_c25-Apr-07 3:15 
GeneralRe: HELP! About CoUninitialize() Pin
kcynic25-Apr-07 5:18
kcynic25-Apr-07 5:18 

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.