hi i use one edit Control in my Dialog. when i use below code for read content of it : Code: GetWindowTextA(hEdit,editStr,10); if content of Edit control is more than one Character my program give error in : Code: EndDialog( hDlg, FALSE ); error: First-chance exception at 0x7e424f4a in CreateDevice.exe: 0xC0000005: Access violation reading location 0x00003355. Unhandled exception at 0x7e424f4a in CreateDevice.exe: 0xC0000005: Access violation reading location 0x00003355. if i enter one Character in Edit control error dont accure. why ?
Looks like you have not allocated editStr correctly and so when the content of the box is being copied it gives an error.
editStr is LPSTR and i debug it. my program get string correctly and store it on editStr but only cant do EndDialog() if string be more than one Character!