|
StartDoc / EndDoc - designed to protect multipage documents from interspersed with others. PrintJob is suspended until EndDoc is called.
>How could I do printing like the POS terminal printer?
For remote spoolers - you can not, should not, and will not be allowed to; local - open device e.g. par port/usb and write directly. Even if local with direct write it still likely not work with most modern printers: laser printers, etc ....
Brian
|
|
|
|
|
Hi
I have the following problem:
I have a client where there is defined a network connection (mapping) to another computer. This is active when you double click the drive otherwise you see that red cross in the explorer just below the driveletter.
I have searched the web on how i can automatically restore the connection .. i have come accross the following link:
'http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wnet/wnet/wnetrestoreconnectionw.asp'
This is about the SDK 'WNetRestoreConnectionW'. There are almost no examples of using this SDK + this SDK won't work on Win95, 98 and Me computers.
Any good way of solving this problem?
Best regards
Jens
|
|
|
|
|
Considering all the desing guidelines of safe programming including exception handling, just wondering do we actually write the handler for each and every possible error/excepion in our code? Its certainly a good practice but how practical it is in terms of LOC that we put for handling the errors which may never occur as well.
Just consider this piece of code
LPTSTR l_strResConn = new TCHAR[NAME_LENGTH];
//check over the value
int l_nRet = LoadString(theApp->m_hInstance,....)
For every loadstring, I should check for the value of l_nRet. But practially in my code, I've just ignored it at every place.
|
|
|
|
|
You should start by writing ony a few than as you go along fixing bugs you end up writing all of 'em
Make ur own judgement and use common sense (but as you know common sense is not so common ! )
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
Hi,
I have developed a custom activex control.when i try to register this activex control using the command regsvr32,i get the message "LoadLibrary("mystrings.ocx")failed.The specified module could not be found.
can some one tell me why this message comes and what is the solution for this.This message comes only in few machines.registration is successful in most of the machines.
Thanks in advance
|
|
|
|
|
Does ur OCX have any dependecies that might now be present at some machines ?
if there are you need to copy them as well
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
Use Depends.exe that comes with visual studio to check wheather your module is able to get all the dlls that it depends on. i.e ? against a certain dll means that dll is not accessible and hence the registeration is failing.
My God is more powerfull Than Your God. (the line that divides the world)
|
|
|
|
|
I may be stating the obvious, but did you try regsvr32 "C:\YourFullyQualified\PathToOcx\yourocx.ocx" ?
~Nitron.
ññòòïðïðB A start
|
|
|
|
|
Hi All,
Thanks for your answers.regsvr32 was not able to find one of the dependent modules.I had to copy both to a specific folder and register using absolute path of my ocx file
Thanks once again
Raghu
|
|
|
|
|
Dear all,
In the main application I use CDatabase to connect to SQlServer.After this, I pass the pointer to a variable in a dll using a function.
When I try to use ExecuteSQl or I try to open a CRecordset, the program fail with access violation in release version. If I use the debug version of the main program and the dll everything is fine.
Can you help me please with a solution to this issue?
Thank you very much.
|
|
|
|
|
Are you checking the pointer against NULL before dereferencing it?
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Yes, the pointer is null in release version....
I don't have any ideea why...
|
|
|
|
|
Sorry, the pointer is not NULL...I have tested a diffrent pointer there.
The IsOpen() member of CDatabase work OK.The ExecuteSQL does not work I get an can not read at specified adress...
|
|
|
|
|
In the main program I use CCriticalSection and I submit the pointer to the dll. If I try to ust m_db->ExecuteSQL("SELECT * FROM TABLE1") in the dll I got the message "Connection in use".Why?
|
|
|
|
|
Hi
What service pack does msoutl85.h msoutl9.h and msoutl.h and their libs come in please?
Best Wishes and Happy Holiday's,
ez_way
|
|
|
|
|
I have a problem: I have a single document based MFC application for viewing images. At first I used CScrollView as base class, which worked well with formats supported by IPicture and tiffs. But now I would like to see also PDF -files, which seems to be possible with CHtmlView, it simply opens an Acrobat reader and attaches it into the form with navigate2 -function. But if I use navigate2 -function for bitmaps and tiffs, they don't seem to be attached to the form, but they'll be opened in a window of their own. And if I use the Render function of IPicture to draw images onto the form, they just flash on the screen and then disappear. It seems that the OnDraw() -function of CHtmlView won't be called automatically. Could anybody help me with this? Thank you.
|
|
|
|
|
As i understand it, CHtmlView hosts whatever OLE ("Active") documents necessary to display what is navigated to. So, if a particular machine is not configured with appropriate viewers for a given file type, it will open externally. Think of it as having IE embedded in your app - there's surprisingly little difference.
As for drawing over it - n'uhuh. Don't be trying to do that. First, it won't work. Second, even if it did, it would be quite wasteful. If you are going to be drawing the view yourself, then you don't have any use for CHtmlView anyway - CScrollView will work just fine. There's no reason you can't use whichever view is most appropriate for a given file at runtime.
Zno one puts flowers on a flower's grave
|
|
|
|
|
i need to know if conversion for atof is available in unicode
atoi is _ttoi
atol is _ttol
atof is ?
|
|
|
|
|
hi,
CString strCurrent;
strCurrent = _T("25.5");
//atof(strCurrent);
double dValue = 0;
_stscanf(strCurrent, TOFLOAT, &dValue);
good luck...
dan o
|
|
|
|
|
you can use strtod() instead of atof() . It's TCHAR macro is _tcstod()
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
thanks guys. Appreciate your help
|
|
|
|
|
_tstof
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
i am new to VC.i want complete information with all possible codes so that i can use com port for serial programming.please also tell me how i check that data is written and read from com port when no device is attached to it.
tahir
|
|
|
|
|
it is very easy if you want to use MSCOMM.For test, you can use two com port on your PC, one for sending and the other for receiving.(And you should connect the two com port before you test.)
Thanks
Benben
|
|
|
|
|
You can use CreateFile to open the com port and write to it as you would write to a file
Here is a Link to a wonderfull sample on serial communication with sample code
Hope it helps
Mttty Sample[^]
Data arrival can be handled as an event , so that you know whenever data arrives on com port
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|