|
IceBerG71 wrote:
is there a better way of storing file database. the accessing will be quite intensive and i need reliablity, stability and fast access.
Have you considered an Access database? It satisfies all of your requirements much better than your current considerations.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Sorry, i did not furish with more details. the target device is on an embedded device with customize Window CE and using embedded Visual C++ 3.0. So i dun think Access is a good choice since memory consideration is critical.
i have been using Access on my PC application and it had given me quite a few problems.
|
|
|
|
|
I'm new to programming so I don't know much. How do I get a pointer to an in-memory device context if I want to move that area to another place, I don't mean bitblt and bitbltting to another dc but a portion of memory which I can operate on? Thanks
|
|
|
|
|
you will have to get the dc from which you can get a bitmap and from the bitmap the LPBYTES ,if you want to do sme fancy work do it with these bytes then convert them in to bitmap and use them
|
|
|
|
|
Can you provide a sample code?
|
|
|
|
|
When I make any changes in a cell, it only saves the change when I push enter otherwise, change doesn't apply to mdb. What I want to do is to save this change whenever user input a value. how can i acheve this?
Regards,
Shin
|
|
|
|
|
Simply, use the method of your class (recordset) like SetRecordsetValue or other(depends on the class you use).
The most important mistake - you use class DataGrid to set changes, but it is incorrect. You must use directly class Recordset-based.
|
|
|
|
|
Yes,
I just want to get the event where I can save the record.
Sorry to make you confused.
Regards,
Shin
|
|
|
|
|
I have an SDI with a listview.
Is there any way to add another window to the mainframe, besides use of controlbars? I want another window next to the listview.
using: [VISUAL STUDIO 6.0 sp5] [WIN98/2]
|
|
|
|
|
you will probably have to use Splitter windows
or use formview and place mulitple controls
|
|
|
|
|
I have an MFC Win32 client application that needs to generate PDF
files. The easiest way to do it is to have our customers purchase and
install Adobe Acrobat, and then our program will use the "Adobe PDF" printer
driver to output our text to PDF files.
From any application like Notepad, Word, Excel, using the Adobe PDF writer
works fine when I do File\Print, click "Print to File", uncheck the printer
property of downloading fonts to printer--my PDF file is created fine.
I need to do this from C++. The user is not going to use File\Print in our
app, we need to convert files as we go.
Something is not working in my code which I've pasted below. I'm using OpenPrinter
to open the "Adobe PDF" printer (return code is good), I call StartDocPrinter setting
my output file name to "D:\temp\test.pdf" and set the datatype either to RAW or NULL,
same result occurs: a test.pdf file is created, but it is pure text "this is a test"
instead of PDF content.
Anyone see what I am doing wrong? It appears to me that I need another code for
pDatatype. Or should I not be using these OS calls for a printer driver?
#include <winspool.h>
...
BOOL PrintStringDirect( LPCSTR Str, LPTSTR PrinterName, LPSTR DeviceName )
{
BOOL bRet = FALSE;
HANDLE hPrinter;
if ( OpenPrinter( PrinterName, &hPrinter, NULL ) )
{
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 );
if ( jobid != 0 )
{
DWORD written;
DWORD dwNumBytes = lstrlen( Str );
WritePrinter( hPrinter, (void*) Str,
dwNumBytes, &written );
if ( written == dwNumBytes )
bRet = TRUE;
}
EndDocPrinter(hPrinter);
ClosePrinter(hPrinter);
}
return bRet;
}
PrintStringDirect("This is a test", "Adobe PDF", "D:\\temp\\test.pdf");
|
|
|
|
|
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.
If your doing this in MFC, this article of mine should be of help.
Setting default printer in MFC[^]
Roger Allen - Sonork 100.10016
If your dead and reading this, then you have no life!
|
|
|
|
|
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
|
|
|
|