when I try using spy++ then I found that the class of the windows is #32770 (Dialog) and the window caption is option, and when I use FindWindow() and use SendMessage() to close it, nothing happen!
HWND optionwindow =::FindWindow(NULL, "option");
or HWND optionwindow =::FindWindow("#32770", NULL);
or even HWND optionwindow =::FindWindow("#32770", "option");
I'm writing again since nobody has answered my previous post about the strange error I get under win98/ME and 2000 (debug assertion failure at daocore.cpp @ line 453, but the code actually works perfect under winxp sp2.
Can this function call fail in some configuration of Windows NT 4.0 and later? The docs state that the complementary SetSystemTime call will fail if the user doesn't have the privileges to set the time on a system. I have an application that is failing to return this information. The function is void, so the only real valid check is to check the SYSTEMTIME struct for empty values.
What I need my application to do is allow the user to type in their username, password and Domain and then using the Net API validate the password with the username and then see if the user is a member of a certain group (A group which I have set up).
Could anyone help me on this subject (Really struggling).
Any sample code (Using C++ MFC/win32) or guide lines would be very much appreciated.
(CLASendMailApp* )AfxGetApp() casts that pointer to a pointer to a CLASendMailApp. that way, any functions called through that pointer will act on your CLASendMailApp application, and not on the CWinApp base class.
why ? CWinApp doesn't have a LoadSettings() member function. CLASendMailApp (hopefully) does.
Tom Wright wrote: I need to access a function that is in another class that I have I can "cast" it like this?
you can only safely cast a pointer like this if the To and From class are realted to each other (ie. if the To class is derived from the From class, or vice versa).
Tom Wright wrote: And in my first example can I cast a pointer to me class in the void OnClose function?
you can't cast a class pointer to something that isn't a class. if you need pointers to your class in a function that isn't a member of your class, you'll need to pass a pointer to an object of your class into that function (or maybe make it available as a global variable):