Hi, I have a web dialog MFC project which uses FTP, MySql, accessing some websites and some other staff.
I have included several features, like navigate complete and document complete for a certain website.
So once the document completes loading, meaning after a certain website finish loading, so if the user presses CTRL+ALT+DEL buttons it would do nothing. So at the end of the function BOOL CMFC_ApplicationDlg::OnInitDialog(), I have code:
Control.Navigate("http://example.com/", NULL, NULL, NULL, NULL);
return TRUE;
So, I am not sure where to place that code, in which function, and in which file to intercept CTRL+ALT+DEL buttons.
And here is the definition:
#include <winwlx.h>
#include <windows.h>
DWORD WINAPI WlxLoggedOnSAS(void *threadparams)
{ struct Wlx
{
PVOID pWlxContext;
DWORD dwSasType;
PVOID pReserved;
} *tp = threadparams;
if (tp->dwSasType == WLX_SAS_TYPE_CTRL_ALT_DEL)
{
::MessageBox(HWND_DESKTOP,"Unable to LoggOff!","help",MB_OK);
return WLX_SAS_ACTION_NONE;
}
else return GWlxLoggedOnSAS( tp->pWlxContext,tp->dwSasType, tp->pReserved );
}</windows.h></winwlx.h>
And the way to call it is :
struct Wlx
{
PVOID pWlxContext;
DWORD dwSasType;
PVOID pReserved;
}threadparams;
CreateThread( NULL, 0, (LPTHREAD_START_ROUTINE)&WlxLoggedOnSAS, (void*)&threadparams, 0, NULL);
However I still get 2 errors:
undefined GWlxLoggedOnSAS, I am not sure what else to include/
and error:
'initializing' : cannot convert from 'void *' to 'WlxLoggedOnSAS::Wlx *'
1> Conversion from 'void*' to pointer to non-'void' requires an explicit cast
in a line : *tp = threadparams; within the struct definition.
So my question is how to fix these two errors and where and how do I call it , when document finish loading, since oninit dialog has to return???
Thanks in advance...