Win32api: How to send a Struct in DialogBox?

Marcone marcone at email.com
Tue Oct 13 22:26:35 UTC 2020


struct Teste {
     string nome = "Paul";
     int idade = 33;
}

extern(Windows):
BOOL DlgMain(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM 
lParam) nothrow
{
     // I want to be able to use the struct object here.
     // writeln(test.nome);
     return false;
}

void chamaJanela(){
     Test test; // How to send this object to the DlgMain function?
     DialogBox(null, MAKEINTRESOURCE(IDD_DIALOG1), null, &DlgMain);
}


More information about the Digitalmars-d-learn mailing list