|
Thanks for replying, and thanks for the solution!!
Yes, that was it. The ".cpp" file was NOT added to the project.
I was concentrating so hard on the compiler error, checking, double checking, and triple checking to make sure the 'ctor' and 'dtor' were defined (along with all the other syntax requirements), but totally overlooked the fact that the ".cpp" file had NOT been added to the project. As soon as you mentioned that as a possibility, I went to check if it were true, and sure enough, it was true. Thanks.
Up until you mentioned it, I still was not thinking in that direction, and still can't figure out why I hadn't added it to the project. Usually, when I add the ".h" file, I would also add the ".cpp" right afterwards, except in this case, I didn't, and I can't say why.
Thanks again. I appreciate the help!!
William
Fortes in fide et opere!
|
|
|
|
|
Hi
I used the SPY tool of Visual Studio to determine which messages are sent when you press the 'X'-button on a dialog: WM_CLOSE & WM_ONSYSCOMMAND if i'm not wrong.
The 'X' button makes sure you get ride of your dialog but i want the main dialog to be closed as well.
|==================================|
| Main window [ _][ X ]<----After first X click, this click too
===================================|
|==================================|
|[] Dialog [ X ]<--- First you click here;
===================================|
So i click the 'X' on the dialog, and that dialog gets closed. But the 'X' on the main window has to be closed aswell.
Anyone any ideas?!?
Greetings
Jens
|
|
|
|
|
Set a BOOL variable in your dialog when the X is clicked. After DoModal returns, check the value and close the main window if it is TRUE.
Jason Henderson "I can picture in my mind a world without war, a world without hate. And I can picture us attacking that world, because they'd never expect it."
- Jack Handey
|
|
|
|
|
Well, i can do this but i have to close the Mainframe for exiting the entire program. So how can i get a pointer to the mainframe? (If i get the pointer, i'll send a WM_CLOSE message.)
|
|
|
|
|
AfxGetMainWnd() will return a pointer to mainframe.
Jason Henderson "I can picture in my mind a world without war, a world without hate. And I can picture us attacking that world, because they'd never expect it."
- Jack Handey
|
|
|
|
|
great great
That global function did the trick:
AfxGetMainWnd()->PostMessage(WM_CLOSE,0 ,0);
thanks alot
|
|
|
|
|
hi everyone!
i'm trying to login to a site ("POST" the username and password) using ssl. the problem is that my app does not receive the cookies after the login. actually it doesn't recieve the Set-Coookie header at all.
this is the code i use:
<br />
HINTERNET hSession = InternetOpen("betfairAPI", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0);<br />
HINTERNET hConnection=0, hReq=0;<br />
TCHAR hdrs[] = _T("Content-Type: application/x-www-form-urlencoded");<br />
TCHAR frmdata[] = _T("Username=<usrnm>&Password=<passwd>&fa=ul");<br />
const char **accept = new (char*);<br />
*accept=new char[12];<br />
strcpy(*accept,"Accept: */*");<br />
<br />
<br />
DWORD dwSize = 0;<br />
LPVOID lpOutBuffer = NULL;<br />
<br />
<br />
if(!hSession)<br />
{<br />
printf("damn...\n");<br />
return;<br />
}<br />
<br />
try<br />
{<br />
hConnection = InternetConnect(hSession, _T("www.mysite.com"), <br />
INTERNET_DEFAULT_HTTPS_PORT,<br />
NULL, NULL, INTERNET_SERVICE_HTTP, 0, 1);<br />
if(!hConnection)<br />
{<br />
printf("nu ma pot conecta la adresa specificata...\n");<br />
InternetCloseHandle(hSession);<br />
<br />
return;<br />
}<br />
<br />
hReq = HttpOpenRequest(hConnection, "POST", <br />
_T("User/User_Login.asp"),"HTTP/1.1", NULL, &accept, <br />
INTERNET_FLAG_SECURE | INTERNET_FLAG_KEEP_CONNECTION , 1);<br />
if(!hReq)<br />
{<br />
printf("nu pot crea request...\n");<br />
InternetCloseHandle(hSession);<br />
InternetCloseHandle(hConnection);<br />
<br />
return;<br />
}<br />
<br />
HttpSendRequest( hReq, hdrs, strlen(hdrs), frmdata, strlen(frmdata));<br />
<br />
retry:<br />
if(!HttpQueryInfo(hReq,HTTP_QUERY_SET_COOKIE,<br />
(LPVOID)lpOutBuffer,&dwSize,NULL))<br />
{<br />
if (GetLastError()==ERROR_HTTP_HEADER_NOT_FOUND)<br />
{<br />
printf("no headers...\n");<br />
} <br />
else<br />
{<br />
if (GetLastError()==ERROR_INSUFFICIENT_BUFFER)<br />
{<br />
lpOutBuffer = new char[dwSize];<br />
<br />
goto retry; <br />
} <br />
else<br />
{<br />
printf("%s", lpOutBuffer);<br />
} <br />
} <br />
} <br />
}<br />
catch( CInternetException* e) <br />
{<br />
e->ReportError();<br />
e->Delete();<br />
}<br />
<br />
<br />
InternetCloseHandle(hConnection);<br />
InternetCloseHandle(hReq);<br />
any ideas would be appreciated.
thx!
|
|
|
|
|
hello
Q1:
i have written a C++ client which parses an email from the inbox of default mail client of any machine..the program uses MAPI functions like MAPIReadmail,MAPIFindnext,MAPILogon,MAPILogoff,
MAPIReadnext..
what are the header files need to be included in my client program!
Q2:
what is the format in which the message is storerd in my system?
kindly help me in this regard!
Q3:
what is a message identifier??
Q4:
where will the profile of the user be stored in a system??
i need to specify the path of the file which contains my profile in my MAPI porgram..
ranjani
|
|
|
|
|
Hi All,
I want to disable some keys and key combinations when my applciation is running..like Alt+ F4 and Ctrl + Esc etc...I did this using Keyboard hook..but this hook seems to wrok only in WinNT and above and when I test my applcaition with Win-98..it fails..can anyone throw some light why this is happening and also if something can be done to make this happen...I need it urgently..Someone please help??? Any help or pointers are thoroughly appreciated..
Thanks a lot in advance..
Himanshu
|
|
|
|
|
I am compiling (rather most precisely try to) compile ATL COM thingys written probably in VC 5 in VC .NET. All was doin cool but now me getting following stupid errors.
FILEA.obj : error LNK2001: unresolved external symbol "public: static class ATL::CTrace ATL::CTrace::s_trace" (?s_trace@CTrace@ATL@@2V12@A)
FILEB.obj : error LNK2001: unresolved external symbol "public: static class ATL::CTrace ATL::CTrace::s_trace" (?s_trace@CTrace@ATL@@2V12@A)
.... and about thousand more just like above.
HELP!!!!!... yes, plz help me out!
Have a Good Day
mE
---------------------
A gasp of breath,
A sudden death:
The tale begun.
A rustled page
Passes an age:
The tale is done.
|
|
|
|
|
Found the solution!
Link with atlsd.lib in DEBUG mode should solve the problem.
HTH
Braulio
|
|
|
|
|
Heyyyyyyyyy..... thanks for the help. You helped me to remove 1425 errors!!! You rule.
thanks, keep on the great work.
mE
---------------------
A gasp of breath,
A sudden death:
The tale begun.
A rustled page
Passes an age:
The tale is done.
|
|
|
|
|
I'd like to develop a VC++ application using the POSIX standard
more than possible in order to reduce portability problems.
Does WINNT support POSIX semaphores and order synchronization
utilities ??
|
|
|
|
|
resp sirs
i have written a C++ client which parses an email from the inbox of default mail client of any machine..the program uses MAPI functions like MAPIReadmail,MAPIFindnext,MAPILogon,MAPILogoff,MAPIReadnext..
what are the header files need to be included in my client program!
what is the format in which the message is storerd in my system?
kindly help me in this regard!
ranjani
|
|
|
|
|
ranjjj wrote:
what are the header files need to be included in my client program!
mapi.h
ranjjj wrote:
what is the format in which the message is storerd in my system?
The MapiMessage structure might be what you are looking for. However, I don't know if the disk image is identical to the data structure kept in memory.
|
|
|
|
|
Is it possible for a user to alter the code of a .dll(in VC++) file ,used by an application.
Ur help is greatly appreciated.
|
|
|
|
|
well once you hand out the dll, it's possible but pretty hard.
|
|
|
|
|
Thanx.can u give me some pointers as how it can be done. And is there any way I can avoid it ... atleast in future.
(
|
|
|
|
|
they can dis-assemble it (tough)
or they can use a hex editor (very tough)
but not impossible
"there is no spoon" biz stuff about me
|
|
|
|
|
Hey.
Any of you know the easiest way to do this ?
Right now, I have a dialog box, and buttons (skinned) on the side and these are the major categories. Now the thing is, my app is getting really really crowded and I don't know what to do.
I read about property sheets and this seems like the right answer except getting the sidebar buttons to link up accordingly looks to be quite time consuming.
thoughts ?
|
|
|
|
|
AllocConsole fails in release mode.
Hi,guys:
I have an ActiveX which includes a Library file (foo.lib). In this foo.lib, a console is created with AllocConsole() function. Everything is OK in the Debug mode. But in the releasemindependency mode, the AllocConsole function fails to create a new console window.
The related code is as below:
/////////////////////////////
FreeConsole();
AllocConsole();
/////////////////////////////
Any ideas ?
TIA
-gusd
|
|
|
|
|
Hi
I am the student of masters of computer science. I am now in the last semester and i have to complete a final year project. I has not been getting any good ideas regarding the project since three months. Please suggest me some ideas regarding the final project. The tool most probably will be Visual C++ and the language will be C++.
I have five months to complete the project.
I am interested in the following areas.
Network Programming.
System Programming.
Data Mining.
Network Protocols.
Looking Forward for kind responses.
Muhammad Irfan Azam
Common Man
|
|
|
|
|
Muhammad Irfan Azam wrote:
I am the student of masters of computer science.
From where?
I believe I can suggest you some nice ideas .
mE
---------------------
A gasp of breath,
A sudden death:
The tale begun.
A rustled page
Passes an age:
The tale is done.
|
|
|
|
|
Muhammad Irfan Azam wrote:
Please suggest me some ideas regarding the final project.
Your thesis advisor is a good resource for such ideas. At least mine was.
|
|
|
|
|
Dear All,
I am developing an application in MFC VC++ Version 6.0 for Windows 2000.
I need to copy ntuser.dat , but this file is always in use. Is there any way out to copy this file. Any Shell Level API's ?
Regards,
Rohit
|
|
|
|