Is there any way to copy the content of a edit field to another edit field without using GETTEXT, SETTEXT and a var to hold the value?
Maybe theres wome smart api way to do it?
Thank you!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Not sure since I skipped to wxWindows, but I can't think of any. Using MFC it's just like a = b; but with pure win32 I on't think there is another way. Maybe one of the API Gurus knows a solution... :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
// Copy contents of control nID1 to control nID2...
void CopyEditField(HWND hDialog, int nID1, int nID2)
{
// Variables...
char szBuffer[1024] = {0};
// Copy text from one and paste into another...
GetDlgItemText(hDialog, nID1, pszBuffer, sizeof(pszBuffer));
SetDlgItemText(hDialog, nID2, pszBuffer);
}
=)
Kip
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is there any way to copy the content of a edit field to another edit field without using GETTEXT, SETTEXT and a var to hold the value?
Maybe theres wome smart api way to do it?
Thank you!
Not sure since I skipped to wxWindows, but I can't think of any. Using MFC it's just like a = b; but with pure win32 I on't think there is another way. Maybe one of the API Gurus knows a solution... :)
// Copy contents of control nID1 to control nID2...
void CopyEditField(HWND hDialog, int nID1, int nID2)
{
// Variables...
char szBuffer[1024] = {0};
// Copy text from one and paste into another...
GetDlgItemText(hDialog, nID1, pszBuffer, sizeof(pszBuffer));
SetDlgItemText(hDialog, nID2, pszBuffer);
}
=)
Kip