|
Tyrus182 wrote:
how can i find out why a file doesnt open when im using fopen
By looking at errno .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hello,
I have 6000000 Records in my Bank and,
I want to Add theme in a DataGrid no by
a Repeat statement by setting the Recordset to
it. Like set Datagrid.Datasource="" in VB.
Best Wishes,
Thanks.
|
|
|
|
|
hi bosss .. it is not a good idea to go for datagrid and loading all these data into it thru datasource. Ofcourse, ur UI will be stucked for for more than 5 minutes.
Its better u use a flexgrid instad of datagrid and display a minimum of 10 or 20 rfecords at a time. On "next" / "previous" button click load the records accordingly by DB a query.
rgds..mil10
|
|
|
|
|
It seemed simple at first: support DBCS.
OK!
All the DBCS lower 128 characters are ANSI/ASCII; exception of '\' which is the Yen Sign in Japanese Shift-JIS.
BUT!
All the DBCS sets also provide a second set of characters representing: a-z, A-Z and 0-9. In addition some DBCS sets provide a second set of characters representing some other characters that must be recognised.
NOW!
First I made an invalid assumption that the _tcsXXX and ect... could be used to solve this problem, and second that any character represented in ANSI/ASCII set would be in the SBCS character set.
Quesions?
1) Should I provide a mapping a function that reconizes the same chacreter in ANSI and DBCS, and use that for all testing ( a.k.a. if( IsChar(*pChar, _T('-')) ) ).
2) Should I force useres to only use non-language specific characters, if they are aready defined in the ANSI/ASCII set.
Examples:
1) (LOCALE: Japanese Shift-JIS)
"0" and "\x82\x4F" both represent character '0', but _ttoi() does not recognise both of these as character '0'.
2) (LOCALE: Korean)
"+" and "\xA3\xAB" both represent character '+', but both _tcsncmp( pStr, _T("+") ) and *pStr == _T('+') does not recogize both of these as the character '+'.
Conclusion!
This is a pain in the 'BLANK'!
Ultimate Quesions!
1) Is this realy worth the effort?
OR
2) Is this just a ridiculously large amount of overhead to add proper support for DBCS character sets?
Note:
Requirements: support for ASCII, DBCS, UNICODE.
INTP
|
|
|
|
|
Hello i am trying to do something as soon as the program is fully initilized but as it starts up
where would i call a function that would do this
basicly im trying to open a file from arguments but when i call it in init dialog its just not able to open the file specified can someone tell me where a good place to call this function from would be? basicly is there something that gets called once the program is finished fully loaded?
|
|
|
|
|
How about near the end of InitInstance() in your application class?
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
It does't matter where you try to open a file, if you are having a problem opening, then you should make sure it actually exists, or have access rights to it. Try using the function _access().
It shouldn't have anything to do with your dialog initialization.
If there's one thing I've learned, it's that life is one crushing defeat after another until you just wish Flanders was dead. - Homer Simpson
|
|
|
|
|
Hi all,
I would like to call a CDAODatabase class from my Regular MFC DLL, I have followed the instruction of Microsoft MSDN. But the following code run incorrect.
Can you help me on it ?
Thanks a lot for your reply.
Tuan
PS : This is my code
extern "C" BOOL PASCAL EXPORT VehicleChange()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
CDaoDatabase* connData;
try{
connData = new CDaoDatabase ;
if(connData->IsOpen()) {
AfxMessageBox("The connection has been openned");
}else{
CString strConnect= "ODBC;DSN=FieldTrip;UID=;PWD=;";
connData->Open(_T(""), TRUE,FALSE, strConnect);
}
strSql = "update VehicleInformation set cAacity=11";
connData->Execute(strSql,dbSQLPassThrough);
} catch(CException *e){
connData->Close();
delete connData;
AfxDaoTerm();
return false;
}
AfxMessageBox("success");
connData->Close();
delete connData;
AfxDaoTerm();
return true;
}
|
|
|
|
|
hello,
i could'nt find a clear solution from google.
most of the result are in MFC or C#,.NET, etc
how can we communicate to serveral clients simultaneously ?
i am not concerned on establishing communication between cliets with the help of the server. all i
want is for the server to manage more that one client at the same time. and using multi-threading.
i tried, but could'nt succeed....
here is what i did,
1) a seperate thread which accepts connection
from clients. (acceptThread)
2) from acceptThread, whenever a client get connected, create a new thread (mainThread).
i am passing the client socket to the mainThread.
the main thread receives data and sends it back.
(an echo server)
is the method a correct one.....
my doubt :
whenever a client is connected, a thread (mainThread)is created. suppose when a client is half way through the thread, a new client connected with the server. i create a the mainThread once again, but with a different parameter. will this work.. should i create seperate theards, i.e., mainThread1,mainThread2.
in that case, if i wish to connect with 10 clients, i have to implement 10 threads. (ie 10 different threads, with different names).
another doubt:
can we use asynchronous sockets here.
suppose i am connecting to 15 clients, in the FD_READ, can i find from which client send me this
data. ie, i need the get the socket identifier.
please help...
|
|
|
|
|
deep_george Z wrote:
is the method a correct one.....
Yes, but...
deep_george Z wrote:
whenever a client is connected, a thread (mainThread)is created. suppose when a client is half way through the thread, a new client connected with the server. i create a the mainThread once again, but with a different parameter. will this work.. should i create seperate theards, i.e., mainThread1,mainThread2.
in that case, if i wish to connect with 10 clients, i have to implement 10 threads. (ie 10 different threads, with different names).
You need to read more on threads before you try to use them. This paragraphs suggests that this is the first time you have tried to use threads. Find a good tutorial somewhere on CP, or use Google to look up threading tutorials.
Basically, when you create a thread, it executes independently of other threads. Threads are multitasked by Windows in the same way that processes are. You can create multiple threads with the same thread function. Just be very careful about data synchronisation.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hi all,
does anyone know if there is a parser for VS 6.0 projects (and VS7 while we're at it) to list all the header files that have been #included?
I need to know what I header files I need to package up to go along with libs.
Thanx
Jubjub
If there's one thing I've learned, it's that life is one crushing defeat after another until you just wish Flanders was dead. - Homer Simpson
|
|
|
|
|
How about this article, on this very same website!
http://www.codeproject.com/useritems/includefinder.asp
|
|
|
|
|
Thanx Blake,
I did ever combination of search I could think of on CP. That page didn't turn up. Glad you helped me out. Really appreciate it.
Thanx
Jubjub
If there's one thing I've learned, it's that life is one crushing defeat after another until you just wish Flanders was dead. - Homer Simpson
|
|
|
|
|
Hi i wrote a program using the mschart control but when i send the program to other people the charts arent display is there some sort of dll or something that i need to include with that for them to be able to see the control
|
|
|
|
|
Looks like the MSChart Active-X control isn't registered on the target machine. You should regsvr32 it as part of your installation.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
i have a copy button and i need to copy data from 2 combo box's and 2 edit box's and cant find any good info on how to do it.
|
|
|
|
|
What do you mean by 'good' info ? MSDN is bursting with this stuff. From memory, GetWindowText is the function to get the text from an edit box, although there's a lot of cobwebs in that part of my brain.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Hi all,
I am workin on changing the format of any given image into bmp format..for that i'm having all the header details of the original image file. But I don't know how to program it using the header file information given...
here is an example of the header file information given....
IFFCL_GRAY { <br />
bits: 12 <br />
byte: @0=0x00 <br />
byte: @1=0x00 <br />
byte: @2=0x00 <br />
byte: @3=0x00 <br />
width: (@6=ishort)/2 <br />
height: @4=ishort <br />
start_offset:128 <br />
line_offset:width*2 <br />
datatype: lsb_msb <br />
} <br />
any form of help is appreciated...
thanks in advance,
Pavan.
|
|
|
|
|
I recommend CxImage (@codeproject), searching www.sourceforge, or trying a comercial library.
Any image format they do not recogise you'll have to convert you self.
Good Luck!
INTP
|
|
|
|
|
I hope CxImage won't revognize this format and anyway i will try it again, but i don't think it can do it...
If I've to code it myself...how can I start doing it....
|
|
|
|
|
I am sure CxImage will not recognise that particular format, I don't even know what language thats in.
I searched for "datatype: lsb_msb" and found 1 reply, refering to Princeton Instruments ".SPE" Image file format, in the "Image-Pro User's Group Mailing List Archive".
The general idea expressed was:
Given a program that can open the image file (for display/edit), you can then export it via the clipboard as a .bmp.
I beleive the software he was refering to was "Princeton Instruments WinView ... for digital imaging"
INTP
|
|
|
|
|
Hi John,
I've tried opening the files in Princeton's Winview software, but it is opening it and is giving an error as 'unknown file format'. I just want to know whether we can open an image file in C++, if we know the image header information.
Anyway these people are also developing their programs in c++ like languages....then how r they able to process these new file formats. Lemme know if you know anything about this and I appreciate your help
Pavan.
|
|
|
|
|
You can open up any file, but C++, like any other language, knows nothing about file headers. If you have the file fomat documentation then you should have no problem reading it and converting it to a bitmap; accept for all that code writing. Well maybe some trouble, depending on the type of data stored in the file.
Good Luck!
INTP
|
|
|
|
|
If you know, can you help me by giving me an outline on this, like how to proceed in programming, for reading the file and if its header information is useful in anyway in programming and how to save a file in a known format.
Till now I dealt only with text files for most of my programming stuff.
Thanks,
Pavan.
|
|
|
|
|
Help me about the above Topic.
Suman Kumar M V
|
|
|
|