|
By flat file I meant a file containing records having no structured inter-relationship. Means you can't query them using SQL-like syntax. You'd need to read the records sequentially or using an index.
The advantage with an XML file is that you can use XML parsers like Expat or MSXML parser.
The advantage with a csv file is the ability to convert it into excel. I think MS has ODBC drivers for CSV files.
Regards
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
Nish is a BIG fan of Goran Ivanisevic
|
|
|
|
|
Thanks Nish,By your help, I have solved the problem.
|
|
|
|
|
Hi, I have a question
Ive seen programs where a user has a program open like MSN which has edit controls. Another program that isnt made by the same people as MSN is open and it can be used to fill in edit controls like the text field and send messages etc....
How would I do this?
Thanks
Ashman
|
|
|
|
|
I am not sure I understand you correctly. But if you want to send data across applications you can use WM_COPYDATA
Regards
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
Nish is a BIG fan of Goran Ivanisevic
|
|
|
|
|
In my project I've got a RichEdit box, with a mapped member variable t_Display. I've created a thread that waits for some input (in this case from a socket) and then tries to add this data to the RichEdit box. I am getting an assert error and I have no idea why. Could anyone help me? The code I'm using is thus:
char msg[MAXMSGLEN];
while (fConnected) {
sock.Recv(msg, MAXMSGLEN);
UpdateData(true);
t_Display.Format("%s%s\r\n", (LPCSTR)t_Display, msg);
UpdateData(false);
}
- X
'Reality is the only obstacle to happiness'
|
|
|
|
|
I assume the UpdateData() call is asserting. You can't pass or access CWnd objects between threads. You'll need to use API-level code to update the edit control from your secondary thread.
--Mike--
http://home.inreach.com/mdunn/
While I can't be correct on all matters, I can make the reassuring claim that where I am inaccurate, I am at least definitively inaccurate.
your with and
Sonork - 100.10414 AcidHelm
|
|
|
|
|
How can i open a dialog for browsing a directory
( not a file) ???
|
|
|
|
|
Use SHBrowseForFolder() . This article goes into more details.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I have a checkbox, and i want to change it's backgorund color. How do i do that?
|
|
|
|
|
This question appears so frequently that IMHO should be included in the FAQ.
Check Yuri Goltsam's article Colored/Blinking Controls and Dialogs with any Font for a particularly elegant solution.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi !
I'm developping a small SDI app with a CRicheditCtrlView.
a few questions :
1. How can I know that the embedded CRichEditCtrl is scrolling ?
I can handle clicks on scroll bars with VK_VSCROLL, handle page up /page down keys ....
Is there a way to detect scrolling without coding a method for each message ?
2. How can I calculate the number of text lines being deisplayed ?
Is there an equivalent for GetFirstVisibleLine() to find the last visible line ? If not, does someone know a method to achieve this ?
Thx
|
|
|
|
|
"1. I can handle clicks on scroll bars with VK_VSCROLL, handle page up /page down keys ....
Is there a way to detect scrolling without coding a method for each message ?"
Override OnHScroll and OnVScroll, these methods are called whenever horizontal or vertical scrolling happens.
"2. How can I calculate the number of text lines being deisplayed ?
Is there an equivalent for GetFirstVisibleLine() to find the last visible line ? If not, does someone know a method to achieve this ?"
I think you have to use GetFirstVisibleLine and then start adding line heights until you get to the window size and declare that your "last visisble line"
Hope this helps,
Bill
|
|
|
|
|
A while back I had been working on a mp3 player/organizer that used the XAudio engine for playback. I haven't touched it in a while and just recently I wanted to pick it back up, but the xaudio web site has been saying that they are down updating their site. I have been watching it for over a month and either they are very slow at updating or it may not be available for good. Does anyone know where I can download the XAudio SDK(I hope) or does anyone recommend a different solution.
Joshua
Sonork ID: 100.9944
ICQ: 519642
Hotmail: JoshuaJGuy@hotmail.com
|
|
|
|
|
If you look up skinnable app, all the code to play an mp3 via DirectSound is on this site.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Hey!
What API functions should I use to set basic local network settings for Win95 / Win98? I want to be able to set the network settings to either DHCP or a specific IP, mask and gateway - in a similar way to the way you set it in the Control Panel.
Thanks!
Oz
|
|
|
|
|
Hi, all. Below is a program i wrote for test. it contains a class named CBase.
#include <stdio.h>
class CBase{
public:
virtual void VFunction()
{
printf("Hello, VFunction.\n");
}
int _a;
};
int main()
{
CBase obj;
int** ppv;
ppv = (int**)&obj;
void (*pFunc)();
// Now i want pFunc to be assigned to the value of **ppv,
// but it can't be like pFunc = **ppv, right?
return 0;
}
so, what can i do for that? Thanks.
|
|
|
|
|
What are you trying to test? The code doesn't make any sense. Once you do ppv = (int**)&obj; , nothing involving ppv will work right because &obj is not of type int** . The cast forces the assignment to compile, but trying to dereference ppv will cause all sorts of havoc.
--Mike--
http://home.inreach.com/mdunn/
While I can't be correct on all matters, I can make the reassuring claim that where I am inaccurate, I am at least definitively inaccurate.
your with and
Sonork - 100.10414 AcidHelm
|
|
|
|
|
since ppv=(int**)&obj;, ppv point to the begin of obj object, cos' the obj contains a virtual function, it contains a virtual ptr(__vptr), and i'm using vc6, the microsoft complier set the vptr at the begin of the object, so ppv is pointed to the vptr when finishing the assignment.
The memory just like below:
----------
| vptr |
----------
|int _a |
----------
CBase obj;
(each column is 4 bytes)
|
|
|
|
|
I still don't understand what you're trying to test.
--Mike--
http://home.inreach.com/mdunn/
While I can't be correct on all matters, I can make the reassuring claim that where I am inaccurate, I am at least definitively inaccurate.
your with and
Sonork - 100.10414 AcidHelm
|
|
|
|
|
Michael Dunn wrote:
I still don't understand what you're trying to test.
You are not the only one Michael, you are not the only one.
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
Nish is a BIG fan of Goran Ivanisevic
|
|
|
|
|
the main purpose of my program is to call the virtual function by using the ppv pointer. the ppv is the virtual pointer points to the virtual table, and the virtual table contains the address(es) of the virtual function(s) in the class, so the *ppv is pointed to the virtual table, and the **ppv[0] points to the first virtual function address, **ppv[1] points to the second virtual function address.
|
|
|
|
|
That's not how you call virtual functions. You use a pointer to a C++ object, and call methods thru that pointer.
class CBase
{
public:
virtual void VFunction()
{
printf("Hello, VFunction.\n");
}
int _a;
};
int main()
{
CBase obj, *pobj = &obj;
pobj->VFunction();
} However none of this makes a difference because without a hierarchy of derived classes, you're not using polymorphism, which is what virtual functions are for.
--Mike--
http://home.inreach.com/mdunn/
While I can't be correct on all matters, I can make the reassuring claim that where I am inaccurate, I am at least definitively inaccurate.
your with and
Sonork - 100.10414 AcidHelm
|
|
|
|
|
Thank you very much. i knew this way of calling the virtual function. but now i want to implement that by another way. and i know it really works. i just don't know how to do the last step -- if you got the function address, how to assign it to a function pointer, just like:
void* address; // or int* address;
void (*pFunc)();
...
pFunc = address; // address contains a function address. but pFunc cannot be assign like this expression.
|
|
|
|
|
Oh, OK, you just want a pointer to point at a member function.
class CBase
{
public:
void func()
{
printf("Hello, VFunction.\n");
}
};
int main()
{
CBase obj, *pobj = &obj;
void (CBase::*pBaseMethod)() = CBase::func;
obj.*pBaseMethod();
pobj->*pBaseMethod();
} The .* or ->* operator dereferences the function pointer.
--Mike--
http://home.inreach.com/mdunn/
While I can't be correct on all matters, I can make the reassuring claim that where I am inaccurate, I am at least definitively inaccurate.
your with and
Sonork - 100.10414 AcidHelm
|
|
|
|
|
Haaaa... thank you again. but what i really want to know is how the virtual pointer and the virtual function table work inside the class.(actually, virtual pointer is inside the class, virtual function table is not)
|
|
|
|