|
Roger Allen wrote:
You should be creating the print job in exactly the same way as you would for a normal printer, but pass a filename through in the DOCINFO object so its written to a file instead.
Hmmm...I thought I was already doing what you said here:
DOC_INFO_1 doc_info = {0};
doc_info.pDocName = "Test Document";
doc_info.pOutputFile = DeviceName;
//doc_info.pDatatype = (LPTSTR) NULL;
doc_info.pDatatype = "raw";
DWORD jobid = StartDocPrinter( hPrinter, 1, (LPBYTE)&doc_info );
where DeviceName = "D:\\Temp\\test.pdf"
|
|
|
|
|
Roger,
Never mind my previous question to you, now I know what you
mean. Use a CDC, output the data to a print driver using that,
set DOCINFO as you described. You are correct, I tried this
and it works.
Thanks very much for your reply and all the sample code.
// Richard
|
|
|
|
|
In my program I'm using #import INPClnt.ocx"
and then using SMART pointers to create the object
i.e., INPCLNTLib::_DINPClntPtr inpc(__uuidof(_DINPClnt));
I have registered the OCX using regsvr32.
It is throwing exception saying "Class not Registered".
Could anyone help me out?
|
|
|
|
|
I am creating a CDHtmlDialog that is not going to be the size of the rendered HTML in all cases (i.e. it could be much larger than the HTML I am dynamically placing in it). I want to resize the dialog to be approximately the size of the rendered HTML.
I do have a control at the bottom of the dialog, and my thought is: if I could get the control's window position, I could resize the dialog accordingly. Unfortunately, I haven't the foggiest of how to do this.
Any ideas?
|
|
|
|
|
I want to have a recordset with bi-directional scrolling,
but when I connected to my database like following:
>CString strConnection=_T("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=module.mdb");
>if(m_db.Open(strConnection))
>{
> m_rec=CADORecordset(&m_db);
> if(m_rec.Open(_T("main"), CADORecordset::openTable))
> MessageBox("Table 'main' is opened ");
>}
following operation:
>m_rec.MoveFirst();
has no effect(does not works).
But using class CRecordset it works:
>m_rec.Open("SELECT * FROM main", CRecordset::dynaset);
What a mistake I made using CADORecordset?
Thanks in advance,
bilas.
mailto:: keeper_@km.ru
|
|
|
|
|
bilas wrote:
What a mistake I made using CADORecordset?
Do you mean CDaoRecordSet?
Debbie
Debbie
|
|
|
|
|
NO, I mean exactly CADORecordset. This class I've found on this site.
|
|
|
|
|
OK, sorry, it's not a class I'm familiar with then.
Debbie
|
|
|
|
|
Hello
I've been having a problem (using vs6 on xp).
I use winsock (both 2.2 and 1.1 the same problem).
When i send from a client to a server a message it is printed ok.
However ,when i reply from the server to the client i get some kind of
unclear gibrish.
Any ideas ?
Thanks
|
|
|
|
|
Yep you are right! But I don't have an answer.
I send a DELE command to a sntp server and it sends back junk.
I have notified the Apache Foundation about it and they have a open issue.
Please let me know if you find a answer.
Best Wishes and Happy Holiday's,
ez_way
|
|
|
|
|
I am not using apache and the commands are send() and recv() but thanks anyway
|
|
|
|
|
I have the same problem.
I have an idea but I am trying to implement it.
create an array of pointers to clientsocket in the serversocket.
when a client connects in OnAccept create a clientsocket dynamically and add its pointer to array.
now when serversocket.clients[i].Send(...);
oops it is not working
i have a question here
do we have to make client listen to server also.
if u get it right please, send as attachment to my email
vsrinu26f@yahoo.com
|
|
|
|
|
can anybody please give me the list of
STATPROPSTG.propid
for example, PIDSI_SUBJECT, PIDSI_KEYWORDS, PIDSI_TITLE and so on..
I only know some of them but not all.
and is there any different
thanks you
|
|
|
|
|
Try these:
{"Title", PIDSI_TITLE}, // VT_LPSTR
{"Subject", PIDSI_SUBJECT}, // ...
{"Author", PIDSI_AUTHOR},
{"Keywords", PIDSI_KEYWORDS},
{"Comments", PIDSI_COMMENTS},
{"Template", PIDSI_TEMPLATE},
{"LastAuthor", PIDSI_LASTAUTHOR},
{"Revision Number", PIDSI_REVNUMBER},
{"Edit Time", PIDSI_EDITTIME}, // VT_FILENAME (UTC)
{"Last printed", PIDSI_LASTPRINTED}, // ...
{"Last Saved", PIDSI_LASTSAVE_DTM},
{"Page Count", PIDSI_PAGECOUNT}, // VT_I4
{"Word Count", PIDSI_WORDCOUNT}, // ...
{"Char Count", PIDSI_CHARCOUNT},
{"Thumpnail", PIDSI_THUMBNAIL}, // VT_CF
{"AppName", PIDSI_APPNAME}, // VT_LPSTR
{"Doc Security", PIDSI_DOC_SECURITY}, // VT_I4
Art
|
|
|
|
|
Hi,
I'm writing a utility application which needs to send and receive messages to/from a plugin I've written for another application, but I'm not sure where to start looking...
The plugin is developed using an architecture derived from COM (apparently) and I've got this up and running and talking to its host app just fine. My own utility application is also up and running and working fine. Now I need to send messages back and forth between the two.
I don't think I can use custom Window messages as the plugin doesn't have a window it just runs inside the host app. I'm investigating network related stuff but I'm guessing this is overcomplicating things.
Any advice would be greatly appreciated.
Cheers,
Simon
|
|
|
|
|
If they are on the same machine, look up WM_COPYDATA in MSDN.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
srev wrote:
I don't think I can use custom Window messages as the plugin doesn't have a window it just runs inside the host app.
You can also post messages to a thread[^].
But if you're using COM, shouldn't you be using events?
"Sucks less" isn't progress - Kent Beck [^]
Awasu 1.1.4 [^]: A free RSS reader with support for Code Project.
|
|
|
|
|
You need to implement the connnection point in your com.
The World is getting smaller and so are the people.
|
|
|
|
|
screw COM, it's for VB programmers
There are multiple options you have. You could try the following...
- Use sockets. CSocket kicks butt for simple communication and free of charge you also them communcating on different machines.
- Create a dummy window and try using a registered windows message (RegisterWindowMessage in MSDN).
- Use pipes. Never done this myself but its another form of process communcation.
- If you really want to pass a lot of data and want it to be very speedy but at the same time a bit of a management nightmare try creating some shared memory between the applications.
|
|
|
|
|
Guys,
Thanks to all of you for going to the trouble of answering my plea. CodeProject rules!
I plan to start investigating CSocket first as the next stage of development is a multi-machine version of the app anyway - GeMe you just saved me from another embarrassing post!
Thanks for all your great feedback though.
Simon
|
|
|
|
|
Does anyone know how to make a cube with a circular hole (Cylinder) across it?
Thanks
|
|
|
|
|
You can build "faces" with holes by using tesellators...
The code looks something like this:
GLUtesselator* pTess1 = gluNewTess();
glNewList(m_nIdDisplayList, GL_COMPILE);
gluTessCallback(pTess1, GLU_TESS_BEGIN, (void (CALLBACK *)()) glBegin);
gluTessCallback(pTess1, GLU_TESS_END, (void (CALLBACK *)()) glEnd);
gluTessCallback(pTess1, GLU_TESS_VERTEX, (void (CALLBACK *)()) glu_vertex);
gluTessCallback(pTess1, GLU_TESS_ERROR, (void (CALLBACK *)())tess_error_callback );
glNormal3f(0.f, 0.f, -1.f);
gluTessBeginPolygon(pTess1, NULL);
// Outer loop
gluTessBeginContour(pTess1);
gluTessVertex(pTess1,...);
gluTessEndContour(pTess1);
// Inner loops
gluTessBeginContour(pTess1);
gluTessVertex(pTess1, ...);
gluTessEndContour(pTess1);
...
gluTessEndPolygon(pTess1);
|
|
|
|
|
Thank you, but it doesn't work to me.
If you could put the hole code you will made me a grat favour. Thanks
|
|
|
|
|
Yep.
Download Getic Editor http://marius.homeunix.org:8000
Make a 'Solid' 'Box', Then Make a 'Cut' 'Solid' Cylinder with
20 faces (Horizontal Slides) and place it on top of the box.
Press 'Size' Toobar Bitton and maekit a bit smaller in diameter,
and a bit higher. Press Enter. Bingo. You have It.
|
|
|
|
|
I found some errors in Win95, in conjunction with MFC. One of them is that SetBkMode is not working properly.
1. How can I determine thename of component responsible for the function?
2. Can I transfer (and distribute) the working component from Win98 or XP to Win95?
|
|
|
|