|
please keep such replies in the thread of your question (i.e. reply directly to the helpful answer, do not create a new thread for this). Thank you.
we are here to help each other get through this thing, whatever it is Vonnegut jr.
sighist || Agile Programming | doxygen
|
|
|
|
|
TO: Johan Rosengren
Thank you for your answer.
Eng. Menahem Menasheroff
|
|
|
|
|
Hi.
I am trying, unsuccessing, to operate the outp command in C++ (Visual Studio
Ver 6.0) through the address of the printer.
I have an OS windows XP.
I wrote: "outp(0x378,0x24);" trying to operate the LPT1 address, and nothing
happened.
Please, show me how to do it rigth.
Thank you.
Eng. Menahem Menasheroff
|
|
|
|
|
|
|
Hi all,
I would like to open a dialog box from a console application. Basically, I have an app that looks for new processes and if certain processes appear I want to pop up a dialog box.
Any pointers to tutorials, articles, sample code would be appreciated.
-bacon
|
|
|
|
|
You may want to instead consider building a standard Windows app that runs in the system tray a la anti-virus, firewall and similar daemon apps.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
|
Check my article about the Simple fireawall that's monitoring processes.
gabby
|
|
|
|
|
Hi,
Look for the article below.
Enumerating processes : A practical approach
http://www.codeproject.com/threads/processes.asp
It can list all the running processes. From the list search for the process you are looking for.
Regards
|
|
|
|
|
Hi,
I'd like to use a XML parsing library (http://www.codeproject.com/soap/markupclass.asp) that uses CString (I guess that's the only MFC thing it uses). I'd like to use it in a pure WinAPI app, is there a way to add CString there ? (which files/libs to link, never worked with MFC really). An alternate solution would be another XML library.
Thanks for your answers
|
|
|
|
|
CString w/o MFC? No!
I Thought I saw CString equivalent here at CP some where, or you could write your own.
INTP
|
|
|
|
|
Thanks... I found it at http://www.codeproject.com/string/stdstring.asp... seems nice, unfortunately it also uses CArray (I'm currently looking if I might replace it somehow myself). Still if you new a way to add MFCs CArray (and CString eventauly) to a non-mfc project (I guess I'll have to link to the MFC dll anyway... All I need it to do is to be a WinAPI app that makes use of MFC... sounds weird, doesn't it... )
|
|
|
|
|
John R. Shaw wrote:
CString w/o MFC? No!
IIRC, CString is nowadays (also) under the CPL - MS made it part of the WTL library which they made free software.
|
|
|
|
|
In VC7.x CString is a shared class that is shared between MFC and ATL. AFAIK all you have to do is #include <atlstr.h> and you can use CString in non MFC apps. If you are using VC6 you are SOL.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|
|
|
Could you also, please please please, tell me if it has this CArray? Before I download and install it... Thanks
|
|
|
|
|
|
I know I'm being annoying, but does it have the same interface as teh MFC's CArray. Can I use it as a drop-in replacement (after a typedef of course)
PS: I'm really sorry to be such a pain, but I really don't do MFC/ATL/WTL stuff at all (yes, I've looked up MSDN... lists less member functions that CArray, but it's only the ATL CSimpleArray - just really not sure about it all)
thanks
|
|
|
|
|
|
a) VC7 : makes the CStringT template available for both ATL and MFC projects
b) WTL (clickety[^]) : provides a 1:1 CString clone for ATL/WTL projects under VC6. The ATL/WTL framework emphasizes "link on demand", so you could basically create a raw Win32 application/library with CString
c) On Codeguru you'll find a macro that extracts the CString sources from your MFC library, so oyu can add them to any other project
d) there are some CString clones[^]. However, with the availability of WTL, there's rarely a need, unless you need to be portable
e) finally, you can "rip out" the WTL CString class. All that CString needs from the framework is the Ressource HINSTANCE for implementing LoadString and similar functions. (IIRC there are some more system-dependent elements, which can be easily replaced)
we are here to help each other get through this thing, whatever it is Vonnegut jr.
sighist || Agile Programming | doxygen
|
|
|
|
|
ofcourse it is possible. to the best of my knowledge everything is possible.
click the "Project" menu
then choose Settings.
In the "General" tab you will see that you project isn't currrently using MFC. You can choose to use MFC in a static LIBRARY or in a DLL. I f you choose to have it in a library you'll have to include these files in stdafx.h
:
#include // MFC core and standard components
#include // MFC extensions
#include // MFC Automation classes
#include // MFC support for Internet Explorer 4 #include #include // MFC support for Windows Common
I haven't used MFC in a dll and I don't know if you have to include them there but i know that you won't have to carry all those DLL's if you want to check your app on a computer without VC++ installed
gabby
|
|
|
|
|
Here's the code...
<br />
void CProgramView::OnGotoButton(CString Param) <br />
{<br />
int ndex;<br />
CString Str, Url;<br />
<br />
if (Param.IsEmpty())<br />
{<br />
ndex = m_ListBox.GetCurSel();<br />
if (ndex == LB_ERR)<br />
{<br />
MessageBox("No Selection", "Program", MB_OK|MB_ICONERROR);<br />
return;<br />
}<br />
m_ListBox.GetText(ndex, Str);<br />
Url = ProgramUrl + Str.Left(10);<br />
}<br />
else<br />
Url = Param;<br />
<br />
ShellExecute(NULL, "open", Url, NULL, NULL, SW_SHOW);<br />
}<br />
And here is the assertion error...
Debug Assertion Failed
Program: ...\Program.exe
File: dbgheap.c
Line: 1044
Expression: _CrtIsValidHeapPointer(pUserData)
For information on how your program can cause an assertion... blah, blah, blah.
ShellExecute works... the assertion happens after IE is opened. I have no idea what's causing this.
Thanks!
Daniel
|
|
|
|
|
Copied from dbgheap.c starting at line 1039:
_ASSERTE(_CrtIsValidHeapPointer(pUserData));
Are you trying to delete a pointer that was never assigned with new , or trying to delete it twice? or maybe the pointer was assigned in a DLL and you are trying to delete it in you app?
Try to do a stack trace and see where in your code the error occured. (Alt-F7 in VC6, Ctrl-Alt-C in VC7)
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|
|
i want to make a printer driver that captures the printed data in a tiff and stores it in a specific location. - something like print to file
anybody can give me some hints on how to get this on the road ?
|
|
|
|