|
As far as I know, there should be a driver associated with this device. Maybe you should ask them more information about that.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
Hi Cedric,
As you said, We will ask the client more information about the device, its drivers and required files for PC support.
Thanks a lot for spending your time for me.
Sarvan AL
|
|
|
|
|
Hi
I have a dilog based application, what I want is to print the contents of edit box of dialog.
I know that CPrintDialog pops the print dialog of windows , but not sure how to move further, ( How to print Edit Zox Context.)
So please help me.
Thanks
|
|
|
|
|
|
Hi
Thanks for your reply,
Infact I dont a dialog and want to print Edit Box content without saving it to a file.
Please reply.
Thanks
|
|
|
|
|
<br />
you can use like this(my suggestion)<br />
<br />
PRINTDLG printdlg;<br />
DOCINFO docinfo;<br />
...<br />
...<br />
PrintDlg(&printdlg);<br />
<br />
printdlg.cbSize = sizeof(DOCINFO);<br />
printdlg.lpszDocName = "Job";<br />
printdlg.lpszOutput = NULL;<br />
<br />
StartDoc (printdlg.hDC, &docinfo);<br />
StartPage (printdlg.hDC);<br />
TextOut (printdlg.hDC,10,10,"This is a sample",16);<br />
EndPage (printdlg.hDC);<br />
EndDoc (printdlg.hDC);<br />
<br />
whitesky
|
|
|
|
|
HI googled and studied about printing and now able to print a string buffer.
the code is as follows:
<br />
<br />
void CPrint_DialogDlg::OnPrintReport() <br />
{<br />
char pbuf[100] = "Hello World.";<br />
HDC hdcPrn ;<br />
<br />
CPrintDialog *printDlg =<br />
new CPrintDialog(FALSE, PD_ALLPAGES | PD_RETURNDC, NULL);<br />
<br />
printDlg->m_pd.nMinPage = printDlg->m_pd.nMaxPage = 1;<br />
printDlg->m_pd.nFromPage = printDlg->m_pd.nToPage = 1;<br />
<br />
printDlg->DoModal();<br />
<br />
hdcPrn = printDlg->GetPrinterDC();<br />
if (hdcPrn != NULL)<br />
{<br />
CDC *pDC = new CDC;<br />
pDC->Attach (hdcPrn);
<br />
pDC->StartDoc("test");
<br />
pDC->StartPage();
SetPrintAlign(pDC, hdcPrn);
pDC->TextOut(10, 10, pbuf);
pDC->EndPage();
<br />
pDC->EndDoc();
<br />
pDC->Detach();
delete pDC;<br />
}<br />
<br />
delete printDlg;<br />
}<br />
<br />
<br />
void CPrint_DialogDlg::SetPrintAlign(CDC *pDC, HDC hdcPrn)<br />
{<br />
short cxPage, cyPage;<br />
<br />
cxPage = ::GetDeviceCaps (hdcPrn, HORZRES) ;<br />
cyPage = ::GetDeviceCaps (hdcPrn, VERTRES) ;<br />
pDC->SetMapMode (MM_ISOTROPIC) ;<br />
pDC->SetWindowExt ( 1000, 1000) ;<br />
pDC->SetViewportExt (cxPage / 2, -cyPage / 2) ;<br />
pDC->SetViewportOrg (cxPage / 2, cyPage / 2) ;<br />
pDC->SetTextAlign (TA_BASELINE | TA_CENTER) ;<br />
}<br />
<br />
Now here What I want to ask is that :
How can I handle if buffer content is of more than one page.
Better if provide some code snippet.
Thanks in advance.
|
|
|
|
|
you need to one StartDoc and EndDoc
and use StartPage EndPage for another pages
<br />
StartDoc (pd.hDC, &di);<br />
StartPage (pd.hDC);<br />
TextOut(pd.hDC,10,10,"This is a sample",16);<br />
EndPage (pd.hDC);<br />
StartPage (pd.hDC);<br />
TextOut(pd.hDC,10,10,"This is a sample",16);<br />
EndPage (pd.hDC);<br />
<br />
EndDoc (pd.hDC);<br />
whitesky
|
|
|
|
|
Thanks WhiteSky for your replies.
Now problem that I am facing is:
in TextOut() method if I have to pass a buffer which consists of some new line (\n) and tab ( \t) characters then this prints ||| for these characters.
So please tell me that how can I handle this problem i.e. when I want to print something in new line.
Thanks
|
|
|
|
|
<br />
it worked for me<br />
<br />
CString str="Is this a Test \n 123 \n yes it is \n 456";<br />
StartDoc (pd.hDC, &di);<br />
StartPage (pd.hDC);<br />
DrawText(pd.hDC,str,str.GetLength(),CRect(0,0,1500,350),DT_EXTERNALLEADING);<br />
EndPage (pd.hDC);<br />
EndDoc (pd.hDC);<br />
<br />
whitesky
|
|
|
|
|
I'm using VC6 and I changed my code into unicode, but when I try to debug some function, I find that I can't see the CString any more, it always shows the first character.
So, how can I see the unicode CString when debugging?
|
|
|
|
|
take
tools->option->
in the debug tab u can find a check box Labeled "Display unicode strings"
Check it.
nave
|
|
|
|
|
Hi,
I want to develop application for internet (client /server) which will send file and data to each other on internet.
What are the Programatic problem that can occur while transfer data on internet ?
(means the difference between the application build for local network transfer and one build for Internet data transfer)
What are the steps to be consider to make it efficient and reliable for Internet ?
Thanks
Regards.
|
|
|
|
|
See:
CInternetSession , HINTERNET, InternetOpenURL,InternetReadFile
Cheers
"Peace of mind through Technology"
|
|
|
|
|
You can also use CSocket and CAsyncSocket for connections
Knock out 'T' from CAN'T ,
You 'CAN' if you think you 'CAN'
-- modified at 2:57 Thursday 18th May, 2006
|
|
|
|
|
zahid_ash wrote: What are the steps to be consider to make it efficient and reliable for Internet ?
remember sliding window protocol!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Could you please refere to any sample application that is using sliding window protocol
Thanks
Regards.
|
|
|
|
|
which tool can create 16 and 32 bits bitmap?
I tried windows-paint, coreldwraw and photoshop, they can not create 16 or 32 bits bitmap.
thx
|
|
|
|
|
Is your question in vc? or applications
if vc see BITMAPINFO bminfo;
switch(bminfo.bmiHeader.biBitCount)->24,16,32
and ...
whitesky
|
|
|
|
|
Hi,
I have used the function DeviceIoControl in my application. One of its parameter is IOCTL_STORAGE_EJECTION_CONTROL, but when i compile the class, error shows : 'IOCTL_STORAGE_EJECTION_CONTROL' : undeclared identifier.
Please respond , which includes or libs , i have to add.
Velayudhan
|
|
|
|
|
Hi raj,
Include the following file
ntddstor.h
Knock out 'T' from CAN'T ,
You 'CAN' if you think you 'CAN'
|
|
|
|
|
|
Did you include Winioctl.h and ntddstor.h
whitesky
|
|
|
|
|
thanks for ur reply,
I have included WinioCtl.h
but do u know where ntddstor.h is found ?
|
|
|
|
|