typedef struct _data
{
TCHAR* szFileName;
}DATA, *PDATA;
...
PDATA myData;
myData = (PDATA)malloc(sizeof(DATA));
...
//set up main window
wnclass.cbWndExtra = sizeof(PDATA);
...
hStats = CreateDialog(...);
SetWindowLongPtr(hStats, 0, (LONG)myData);
...
//in the dlgProc
// how would I extract the myData?
pData = (PDATA)GetWindowLong(hDlg, 0);
Not sure where to, or if I can actually do that?
---------- Post added at 09:07 AM ---------- Previous post was at 08:13 AM ----------
Don't know how proper this is but I used CreateDialogParam() and passed the pointer of my struct into it casting it as a (LPARAM) (which is just a pointer to a long)
Seems to have worked.... this alright?


Sign In
Create Account


Back to top









