Click here to Skip to main content
15,905,686 members
Home / Discussions / COM
   

COM

 
GeneralRe: hWnd in COM Question. Pin
Heath Stewart12-Nov-03 3:05
protectorHeath Stewart12-Nov-03 3:05 
GeneralRe: hWnd in COM Question. Pin
Matt Gates12-Nov-03 14:06
Matt Gates12-Nov-03 14:06 
GeneralCAxDialogImpl Pin
Abhishek Srivastava12-Nov-03 17:19
Abhishek Srivastava12-Nov-03 17:19 
GeneralRe: CAxDialogImpl Pin
Matt Gates13-Nov-03 13:25
Matt Gates13-Nov-03 13:25 
GeneralRe: CAxDialogImpl Pin
dharani13-Nov-03 17:12
dharani13-Nov-03 17:12 
GeneralRe: CAxDialogImpl Pin
Abhishek Srivastava13-Nov-03 17:29
Abhishek Srivastava13-Nov-03 17:29 
GeneralRe: CAxDialogImpl Pin
dharani13-Nov-03 17:54
dharani13-Nov-03 17:54 
GeneralRe: CAxDialogImpl Pin
Abhishek Srivastava13-Nov-03 18:36
Abhishek Srivastava13-Nov-03 18:36 
Hi there,

Actually , u r commiting a mistake,
U have tried to get the Window handle of your edit box before Doing DOModal,
that means , ur controls are still not created

ndlg=new CNewDialog();
HWND wnd=::GetActiveWindow();
HWND h=ndlg->GetDlgItem(IDC_NAME);
CEdit *e=new CEdit(); // i treid with simple CEdit e; then switched to CEdit* e
e->Attach(h);
CString s="hello";
e->SetWindowText(_T("hello"));

in the above code , u have just created an instance of your dialog class, but controls are still not created , so setting text wil not work
and the same thing u r doing after DoModal
when OK Button is pressed ur dialog box is again closed ,and for that reason ur Control Box have also left Memory , i mean now they are not there , so when u try to get text when Dialog is closed from the EDit box will not work again.

So try to do these things in your Dilaog class , i mean try to set text, in InitDialog Method of your dialog class,
try to create some member variable in your class , get The text of ur edit box in OnOK method and then u will be able to access

I Hope I am making myself clear!!

Abhishek Srivastava
Software Engg (VC++)
India ,Noida
Mobile no 9891492921 Smile | :)

GeneralRe: CAxDialogImpl Pin
dharani13-Nov-03 19:04
dharani13-Nov-03 19:04 
GeneralRe: CAxDialogImpl Pin
Tomaz Rotovnik21-Nov-03 2:42
Tomaz Rotovnik21-Nov-03 2:42 
GeneralRe: hWnd in COM Question. Pin
Heath Stewart13-Nov-03 2:54
protectorHeath Stewart13-Nov-03 2:54 
GeneralRe: hWnd in COM Question. Pin
Prakash Nadar14-Nov-03 3:12
Prakash Nadar14-Nov-03 3:12 
GeneralRe: hWnd in COM Question. Pin
Anonymous17-Nov-03 22:07
Anonymous17-Nov-03 22:07 
GeneralDTE.LaunchWizard() Pin
RockHard PartyNipples11-Nov-03 8:25
RockHard PartyNipples11-Nov-03 8:25 
GeneralIIS mime Type Pin
fenil jacob10-Nov-03 23:38
fenil jacob10-Nov-03 23:38 
GeneralRe: IIS mime Type Pin
Vi211-Nov-03 19:21
Vi211-Nov-03 19:21 
GeneralCoGetClassObjectFromURL Pin
JOG10-Nov-03 14:35
JOG10-Nov-03 14:35 
QuestionCan the operator be overloaded in ATL and how? Pin
sqwang10-Nov-03 13:42
sqwang10-Nov-03 13:42 
GeneralDllMain issues Pin
Matt Gates7-Nov-03 17:51
Matt Gates7-Nov-03 17:51 
GeneralRe: DllMain issues Pin
MultiThread8-Nov-03 7:17
MultiThread8-Nov-03 7:17 
GeneralRe: DllMain issues Pin
Matt Gates9-Nov-03 12:06
Matt Gates9-Nov-03 12:06 
GeneralCOM+ proxy application problem Pin
Member 7638697-Nov-03 4:54
Member 7638697-Nov-03 4:54 
GeneralRe: COM+ proxy application problem Pin
MultiThread8-Nov-03 7:22
MultiThread8-Nov-03 7:22 
GeneralRe: COM+ proxy application problem Pin
Anonymous13-Nov-03 4:09
Anonymous13-Nov-03 4:09 
GeneralRe: COM+ proxy application problem Pin
Steve S13-Nov-03 4:34
Steve S13-Nov-03 4:34 

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.