|
ExamineJournalFile does this:
{
//some text changing and highlighting in the view
FindItems("Chk", "Checks", 5,15,true, true, false,true);
FindItems("Tbl", "Tables", 5,3, true, false,false,true);
FindItems("CE:", "Employees", 7,69,true, true,1,true);
FindItems("CC:", "Cashiers", 7,80,true, true, false,true);
FindItems("Cancelled", "Cancelled", 16,13,false,true, true,false);
FindItems("Payment", "Payments", 18,11,true, true, true,false);
FindItems("No Sale", "NoSales", 18,11,false,true, true,false);
FindItems("Change Due","Change", 15,14,true, true, true,false);
FindItems("Cash", "Cash", 21,8, true, true, true,false);
}
FindItems goes thru the text of the control using FindTextSimple, takes the returned found position and then places the "index" in a treeview control.
I will look at putting the data into a set on the reading of the data. During the serilizing of the archive? Is the set still going to be faster than on a CString::Find()? I would think that ultimately, thats all the CRichEditView::FindTextSimple() does.
Anyway, thanks for the ideas.
|
|
|
|
|
Wade H. wrote:
Functionally, everything is fine. My issue is with the speed on large files
Don't guess. Use the profiler to check what's worth optimizing. Otherwise you'll spend your time doing irrelevant stuff.
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
Hi there,
When i you open a Access 2000 database ...
Access engine make a temproray(*.LDB) file beside your database file ...
How can i change the temproray file path ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
I'm not sure if you can! The ldb file is used by Access to control multi-user db access, locking etc. so it is vitally important that the file is closely linked to the opened database. You might not have control over the where abouts of this location. Its purpose is not a 'regular' temporary file and as such is not placed in the usual temp location.
If anyone knows otherwise, let me know.
Richard Chin
|
|
|
|
|
You are absolutely correct. MS even published exactly how the ldb works. It MUST reside where the mdb is. No choice.
In code it is possible to open a mdb read-only and exclusive which basically tells it not to use the ldb. This is useful when opening a mdb on a cdrom for static data. This is the only time this kind of thing should be done.
Joel Lucsy (jjlucsy@ameritech.net)
|
|
|
|
|
Hi there,
How can i change the static box background ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
|
Hello Pavel and thanks for sample
Regards
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Hi there,
I played a movie by MCI ...
I want to move back the movie to first and play again and again !!!
How can i repeat the movie ???
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
have you tried sending MCI_SEEK with MCI_SEEK_TO_START?
|
|
|
|
|
"Things that don't work on my system (Win 98) all relate to the date based patches (WFP is my only date based patch).
- When I set the date, the messages indicate that the date based files have been copied into SIMPATCH, but they actually haven't been. Eg. When I set the date the 161001, I assume that all the files in the 13 WFPdate folders from 150801 to 161001 should be copied into DATA/SIMPATCH, but by checking in the SIMPATCH folder I can see that non of these date based files are there.
- The 'date:browse' button still doesn't seem to work. When clicked, nothing happens. Funny because the other browse button (for the .exe) works fine. I have to enter date manually.
- The 'modify campaign' button doesn't seem work for me either. When clicked, the date dialog box just disappears."
What he's talking about has to do with an MFC application, RBPatch, which I have been working on. The issues he's having are related to a CFileDialog object, and some CopyFile + FindXFile operations. People running WinXP or WinME have absolutely no issues, but there have been some people running 98 and 95 OSR2 having the exact same issues.
Any ideas?
TIA,
Jam
http://benchmarksims.com
Your One-Stop Shop for Benchmark PC Simulation News.
|
|
|
|
|
How can I load/get/retrieve the 16x16 pxls icon (Information/Error/Question) that I see in the balloon-tooltip what-so-ever it name is (It shows me my connection speed in the system tray when connected)? Its size is important, must be 16x16.
10x.
--BlackSmith--
/*The roof is on fire, we don't need no water, let the MF burn*/. BHG.
|
|
|
|
|
You can retrieve it manually: When the icon is being shown, press the key "Print Screen". Launch MSPaint, paste into it, cut the icon and paste it into your resources editor.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Man, I wanna have no resources in my class. I worked kinda hard to create the
icons, pixel by pixel in a matrix...(feels stupid, but hey, you know me...). I wanna load what exists. Me wish not invent no wheel...Man.
Any other ideas?!
--BlackSmith--
/*The roof is on fire, we don't need no water, let the MF burn*/. BHG.
|
|
|
|
|
|
The icon size (used CDC::DrawIcon(...) ) is 32x32.
How can I get the 16x16 icon???
m_hIcon = (<font color=blue>HICON</font>)LoadImage(<font color=blue>NULL</font>, MAKEINTRESOURCE(OIC_INFORMATION), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR|LR_SHARED));
CPaintDC dc(...);
dc.DrawIcon(0, 0, m_hIcon); //Draws 32x32 icon!
--BlackSmith--
/*The roof is on fire, we don't need no water, let the MF burn*/. BHG.
|
|
|
|
|
the only solution i've found is to create a 16x16 image list, add the icon to that and then use the imagelist draw functions for the drawing.
somehow, imagelists know how to extract the correct size of icon.
|
|
|
|
|
This is a newbie question but I somehow cannot get this part of my code to work. I have the user input into a character array of unspecified size like this:
char *cArray1 = new char[];<br />
cin >> cArray1;
and then when I try to calculate how many elements is in the array, the sizeof() function always returns 4 for some reason. I'm calculating the number of elements by the following.
size_t iArraySize = sizeof(cArray1)/sizeof(*cArray1);
(I also tried int as the datatype instead of size_t but no luck)
I always get 4 as the return cause sizeof(cArray1) always gives me 4 and 4/1=4.
I think sizeof() cannot be used with dynamically allocated arrays, so is there anyways to do this?
Please give me some advice how so solve this question...
Thanks!
|
|
|
|
|
Use strlen function (don't forget to include <string.h> )!
David Z wrote:
I always get 4 as the return cause sizeof(cArray1) always gives me 4 and 4/1=4
cArray1 is a pointer, not an array. It points at the first element of an array (null-terminated string). It is 4, because in Win32 pointers are 32-bit (4 * 8 bits - that's why you get 4)!
Ñ There is only one MP Ð
|
|
|
|
|
Maciej Pirog wrote:
(don't forget to include )!
Don't forget to include <string.h> of course!
Ñ There is only one MP Ð
|
|
|
|
|
David Z wrote:
sizeof() function always returns 4
because that's the size of a pointer.
-c
For men use, if they have an evil turn, to write it in marble:
and whoso doth us a good turn we write it in dust.
-- Sir Thomas More
|
|
|
|
|
David Z wrote:
I think sizeof() cannot be used with dynamically allocated arrays, so is there anyways to do this?
Use std::vector and its size() member instead.
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
The only reason you get 4 (4 bytes) for sizeof (cArray1) is that sizeof actually measures the size of the cArray1, which is a pointer. And as you probably know.... a size of a pointer is 4 bytes (in your compiler anyway...).
char *cArray1 = new char[]; //very bad idea! No array size specified.
instead, use fixed sized buffer: char cArray1[ARR_SIZE];
This one you can measure:
size_t iArraySize = sizeof (cArray1) /sizeof(*cArray1) ;
--BlackSmith--
/*The roof is on fire, we don't need no water, let the MF burn*/. BHG.
|
|
|
|
|
Ok, I really feel dumb now hehe. I was out of code for a while so I totally overlooked that fact about the operator referring to the pointer. Thanks for the help. I just used strlen and it works fine. Thanks for all the help!
|
|
|
|
|
Well...
Your array is actually a pointer, so the function sizeof() will always return
4 because that's the size of a pointer. Getting the number of elements in an
array is a different thing.
Now, I think you should do this some other way. First of all, why would you want to give the user unlimited input length? Just specify a limit and save
yourself a headache.
Second, maybe it could help to know the length of the array before allocating any memory... but, well, what is it you want to do?
Aritosteles
|
|
|
|
|