|
The column has probably been added, but its width is too small. Change the call to this to verify:
m_List.InsertColumn(0, "Hello", LVCFMT_LEFT, 100);
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
lol yeah i figured it out i accidently had the code after a return how stupid is that rofl thanks for helping out tho
|
|
|
|
|
Hi,
I'd like to browse a large text file (more than 100 Mbytes) to extract some information.
With standard File access method, my hard drive is overloaded by access request so that my treatment is very long.
What is the correct method to do that?
Thanks,
Regards
|
|
|
|
|
vflouriot wrote:
With standard File access method
What do you mean? fgets() ?
One way would be to use fread() with a "decent" buffer size of say, 32768 bytes. However, you would have to parse this buffer in order to read the data "line by line" i.e. detecting CRLF's.
Bikram Singh
|
|
|
|
|
If you are doing a one pass search, just read in chunks in, say, 32k increments [larger won't buy you anything].
If you are doing a multi-pass search, use memory mapped files.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Tanks for all the reply
I actually use std::getline with the default buffer size.
Could you please explain why reading in chunk will provide better result than mapped files for single pass threatments ?
By memory mapped files, you mean overlapped I/Os ?
Thanks,
VF
|
|
|
|
|
Memory mapped files just leverage the demand paging mechanism built into Win32. Demand paging does take some CPU time. Since all the pages would be paged in, you'll get a slight performance increase if you read the data in in chunks.
If, on the other hand, your data has some organization to it such that you won't need to read all the pages in, a memory mapped file may give you increased performance.
Memory mapped files are different than overlapped I/O which is innappropriate in this situation.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Ok,
I tryed to use the memory mapping service this morning, at it works fine.
Do you know what function should I used to extract each lines of the text file ?
I mean, Do you know a usefull built-in function to parse a text file line by line when you just have a pointer on the beginning of the file
Thanks again,
Vince
|
|
|
|
|
Just brute force parsing.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
How to change the backgound color of a dialog?
The function SetDialogBkColor() is obsolete, so it cannot be used.
|
|
|
|
|
hey:i can give you some little help
HBRUSH CMyTest::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{if (nCtlColor = CTLCOLOR_STATIC ) {
pDC->SetBkColor(RGB(255,0,0));
pDC->SetBkMode(TRANSPARENT);
HBRUSH B = CreateSolidBrush(RGB(255,255,0));
return (HBRUSH) B;} }
running ok
|
|
|
|
|
I suppose that this code changes the bkg color of controls. However, I need to change the bkg color of a dialog window.
|
|
|
|
|
Thanx, I tried the code and it works. When I first looked at it I thought it was for controls, but when I tried it worked.
|
|
|
|
|
hi
how can i open serial & parallel ports in win NT\XP
where _inp & _outp functions works only in win me
thanks
|
|
|
|
|
|
I have already gone through those messages to no avail, i have even tried passing keyboard values direct to the OnChar method of the CDateTime Control but when i pass them from the button presses, eg press one and send the appropriate stuff via OnChar it will not update, however via a normal keypress it does update. I am beginning to wonder if the CDateTimeCtrl is a bit of a 'funny' class unless you use it exactly in the way microsoft want you to!
|
|
|
|
|
Just like LoadLibrary.
Help me plz...
|
|
|
|
|
What do you want to do exactly?
What function do you need?
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I need LoadLibrary from memory, not from file.
Just like:
BOOL MyLoadLibrary(PBYTE LibCode);
|
|
|
|
|
I know an assembly way, if interested send me a mail
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Wow..... It's realy?!
Send it to me: winddriver@msn.com
Thank u very much~~~~~~~~~~~
|
|
|
|
|
yes,the above mr say right,what file or function do you indeed want ?which
dll the function is in?
for example,i want to use GradientFill function in msinmg32.dll to draw gradient rectange
i can do this way:
hinst_msimg32 = LoadLibrary( "msimg32.dll" );
m_bCanDoGradientFill = FALSE;
if(hinst_msimg32)
{m_bCanDoGradientFill = TRUE;
dllfunc_GradientFill = ((LPFNDLLFUNC1) GetProcAddress( hinst_msimg32, "GradientFill" ));
}}
|
|
|
|
|
DLLs automatically use shared memory for READ-ONLY areas.
Due Regards
Mahendra
|
|
|
|
|
We are getting a link error (2001) only in release mode however everything is fine when I run rebuild in Debug. Obviously this isn't a lot of info, I am researching on MSDN right now, any suggestions? I have already read the VC++ FAQ.
- Nick Parker My Blog | My Articles
|
|
|
|
|
Check in the Project Settings dialog box, the "Link" tab.
Make sure the libraries in the "Libraries" editbox are the same as in the debug configuration's "Libraries" editbox.
Bikram Singh
|
|
|
|