|
does anyone know how to print file.html?
I used ShellExecute(..) to print. It seems printed coz I got no error or warning.. but when you open your printer ( I paused the printer before), you won't see any file in the printer spool..
it is samething like when you right click print on file.html in window explore. nothing get printed...
is there anyway to print file.html programmatically??
thanks.
|
|
|
|
|
|
|
I have a code that uses fprintf function. The program is crashing every time it hits this function. It asks for a path to fprintf.c (can't find it anywhere). Shouldn't this file be included in the MFC libraries? Anyone has this file?!
Thanks!
Cintch
|
|
|
|
|
Post the piece of code that is calling fprintf . (Forget about the asking for a path, it is debugger stuff you don't need to care about.)
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
You forgot to ask for the CRT when you installed VisualStudio. Go back and reinstall and select C Runtime Libraries Source, which is un-checked by default in VisualStudio 6.0.
|
|
|
|
|
Is it possible to create a program that would run concurrently with any web browser and would then have the ability to grab data from the HTTP headers that is posted back to a server before it is encrypted? My purpose is not create an application that does this, however another co-worker is doing some research on any security issues related to allowing users to have a web interface to change their LAN password. We have found that even through SSL the data isn't encrypted until it is actually transports across the wire per say. If this is possible it could be a major security risk for us. Any input would be great. Thanks in advance.
Nick Parker
|
|
|
|
|
My friend and I are having a somewhat friendly conversation and would like some weigh in on the following. Back to fundamentals.
1. int a;
2. int &ra = a;
is #2 a declaration or define? I should hope there will be concensus in the answer for this question.
dand999
|
|
|
|
|
i would have called it a declaration with assignment ... so i guess a declaration
*crosses fingers*
"... and so i said to him ... if it don't dance (or code) and you can't eat it either f**k it or throw it away" sonork: 100.18128 8028finder.com
|
|
|
|
|
It is a definition.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
|
It's both a declaration and an assignment.
---------------- Shog9 ----------------
------- Drink Coca-Cola -------
---- Use SciTE ----
|
|
|
|
|
Both, declaring a variable doesn't have anything to do with initial value, but more so the memory required for it, etc. Its definition will come with the initial value. So, it's both - a definition inside the declaration.
Jeremy Falcon
Imputek
<nobr>"C# is the answer to a question nobody asked." - Chris Losinger
|
|
|
|
|
I am reading "Introduction to MFC Programming with Visual C++" by Richard M Jones.
I am learning how to handcraft MFC programs (starting with blank Win 32 Application).
When I compile, build and execute one of the examples it causes a Debug Assertion Failure (File wincore.cpp, line 3109) on exiting.
When I unmap the OnDestroy() function the program terminates normally.
Here is the offending message handler.
CMainFrame inherits publicly from CFrameWnd.
void CMainFrame::OnDestroy ( )<br />
{<br />
SetWindowText(mWindowTitle);<br />
UINT resp;<br />
resp = MessageBox ("Do you understand the material in Ch 4","Question",MB_YESNO | MB_ICONQUESTION);<br />
if (resp == IDYES)<br />
MessageBox("Good");<br />
else<br />
MessageBox("I suggest you do all the exercises.");<br />
}
Obviously the book has left out important step.
As a guess I tried ::PostQuitMessage(0); but that did not work.
Anyone know what the book is doing wrong???
|
|
|
|
|
|
I have a dll that multiple .exe's (and multiple instances of .exe's) link to. This dll performs some actions that require a temporary file.
Does anyone know if I call _tempnam from within a function of this dll, can I get back duplicate names? For example:
1. abc.exe calls dll function xxx(), and xxx() calls _tempnam(...).
2. before any file gets created with the name returned in (1), def.exe calls
xxx().
In this situation, could the same name be given by _tempnam in both (1) and (2)?
Thanks,
David
|
|
|
|
|
I guess there can be problems (to make sure, just call xxx twice from a test program).
In order to avoid this reace condition, you can use a global mutex just like this:
HANDLE mutex=CreateMutex(NULL,FALSE,"SOME_WEIRD_STRING_TO_MAKE_SURE_IT_IS_SYSTEM_WIDE_UNIQUE_LIKE_THIS__4FCCB370_D775_11D2_8FC5_0000F5140DA0_");
WaitForSingleObject(mutex,INFINITE);
xxx();
ReleaseMutex(mutex);
CloseHandle(mutex);
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
You know, some people actually read the documentation first? Others even read the CRT source coded that is provided with MSVC.
For the third category, I believe it has to be spelled out:
Yes, at the point you get a filename from _tempnam it's unique for the target directory.
|
|
|
|
|
Wow, aren't you just full of wisdom. Don't bother responding next time.
|
|
|
|
|
Dave_ wrote:
Wow, aren't you just full of wisdom. Don't bother responding next time.
YOU are giving ME sh*t for giving you a technically correct and complete answer?! You are indeed displaying your gratitude in a way suitable to anyone with the manors of a ringworm!
Displaying in public that you haven't read the documentation, and all other sources of information available, before asking the question, displays you are a lazy prick waiting to get stuff served on a silver plate.
You f***ed up! You need to be taught to try to find your own answers before bugging someone else. Either that, or you have proven you are just not suitable for this kind of occupation.
If I have been so kind to use my precious time to give you a technically correct answer, the least I expect is a little bit of gratitude. A plain "thanks" would have been enough. Hell, plain silence would have been enough. But noooo, the Great Kahuna of "Dave_" have to display that not only can't he read documentation and source code, he can also displays what an ungreatful bastard he is.
Good job, you have managed to make your point,
Have a nice day,
go play on the highway.
|
|
|
|
|
I want to add send mail facility in my application. For this purpose i want my application to use Outlook express and whenever it needs to send mail, it immediately use outlook express. Can you tell me how OR tell me about some example application. I would be more glad if the solution will be MFC free
|
|
|
|
|
1- ::ShellExecute("mailto:yourname@isp.com?subject=...&body=...",...)
2- If you need it automated and silent, see what's said about the MAPI32.DLL API in MSDN.
And I swallow a small raisin.
|
|
|
|
|
Simple MAPI is a very simple (as its name suggests) API for e-messaging. This API will use whenever messaging application that is registered as the "predetermined messaging application". If that happens to be the case in your target machines, then go search some Simple MAPI sample on the net (lots of them, for one without MFC dependencies, check Xiangyang Liu's article Sending and receiving e-mails from your program[^]).
To determine (non-programmatically) whether Outlook Express is the default messaging app, open it, go to Tools -> Options and look for a checkbox labeled "Outlook Express as predetemined Simple MAPI client".
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I am attempting to upgrade an application written for Windows 3.1 platform. It was originally developed using Borland C++ 4.5 and TurboPower Software's Data Entry Workshop 2.0. I am unfamilar with programming applications for Win 3.1 as I started learning on Win95. If all of the source code is available, is there a simple process of migrating it over to run on Win95/98/2000? Thanks in advance.
Rich
|
|
|
|
|
I'm afraid you have no other choice but to do it manually. The process ranges from moderately simple to almost impossible, depending on the complexity of the program and the libraries it depends on. In your case, I guess the TurboPower library will pose the most difficulties. MSDN provides very good porting tips in the article Porting 16-Bit Code to 32-Bit Windows[^].
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|