|
Surely the answer to this is to convert your code to Unicode !!
This support Multi-Languages, All you need to do then is to use different resource for each Language.
|
|
|
|
|
I want to but a bmp on the background
|
|
|
|
|
ListView_SetBkImage
--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
|
|
|
|
|
Hello,
I am new to database programming (actually, I am not started yet).
I am recording some data in real-time (voice). Now I need to allow the user for searching for some data given a specific time.
I was told that I should consider using SQL, or DAO or ODBC.
I have no clue what the best thing to use is. So I am looking for some information.
Any suggestion will be largely appreciated.
Thanks a lot.
Where there is a WISH, there is a WILL.
|
|
|
|
|
This isn't a complete solution, but should help you get started.
1. First you need establish the database requirements. e.g. exactly what do you need to store, search, retrieve from your DB. How big are the images, how many, etc.
2. With that in hand, select a database engine. There are many, each has its own strengths, weaknesses and costs. Oracle and SQL server are enterprise databases. They are beefy and very capabley (expensive). Access is good for smaller or simpliler applications. May others also exist.
3. Create the actual database schema (you don't need to populate it, just define it).
4. Finally ready to start designing/coding the app. At this point you can select accessing technologies. The main ones available are ODBC, DAO, ADO. ADO is the current favorite.
If this is a significant application, you may want to consult a DB expert to help you design your database and select a db engine.
Hope this helps,
Bill
|
|
|
|
|
>This isn't a complete solution, but should help you get started.
Ok. Let's see ...
>1. First you need establish the database requirements. e.g. exactly what do you need to store, search, retrieve from your DB. How big are the images, how many, etc.
I need to store sound files (wav, ...) with a date and time associated to every piece of data that represent 1 seconde of sound.
The user can then search for a sound that have been recorded at a specific time.
The program records continuously ... so I have a very large quantity of informations.
>2. With that in hand, select a database engine. There are many, each has its own strengths, weaknesses and costs. Oracle and SQL server are enterprise databases. They are beefy and very capabley (expensive). Access is good for smaller or simpliler applications. May others also exist.
I'm thinking about SQL servers. It sounds that it is more portable and robust. And once you know how it works, you have no problem
switching to another one.
QUESTION: Are these free? or do I have to by something?
>3. Create the actual database schema (you don't need to populate it, just define it).
Ok.
>4. Finally ready to start designing/coding the app. At this point you can select accessing technologies. The main ones available are ODBC, DAO, ADO. ADO is the current favorite.
I read a little about these technologies. I am more thinking about using ODBC. It sounds that I is faster than DAO (if I don't use Access database).
Also, my database will be on a remote computer. I read that ODBC is more efficient in this case.
>If this is a significant application, you may want to consult a DB expert to help you design your database and select a db engine.
This really is a significant application. I am used to get things done by reading, asking questions, prototyping, ...
Do you think that these are things we can't learn on the fly ?
>Hope this helps,
>Bill
This helped a lot.
Thank you very much.
Where there is a WISH, there is a WILL.
|
|
|
|
|
"QUESTION: Are these free? or do I have to by something?"
No not free.
"This really is a significant application. I am used to get things done by reading, asking questions, prototyping, ...
Do you think that these are things we can't learn on the fly ?"
No, they aren't. You can, with considerable effort, become a novice DB developer. To go beyond that requires education/experience. If this application is commercial or even IT production, you will be doing yourself a favor to get a professional involved. If it turns out to not be very complicated, it won't cost much.
Hope this helps,
Bill
|
|
|
|
|
Ok. You helped me a lot. That's just too bad you don't accept credit cards
I thank you again.
Actually, I am a software engineer with 5 years experience in programming realtime systems.
I also used to be an analyst-programmer (Dbase IV) for 2 years. But things changed since then.
Just to say that I have some notions in programming.
After reading your suggestions, I think that I'll implement my own database (binary file with my own format).
I only have one thread writing informations to the database while another thread have a read-only access to
this database.
Take care.
Where there is a WISH, there is a WILL.
|
|
|
|
|
Djibril wrote:
I need to store sound files (wav, ...) with a date and time associated to every piece of data that represent 1 seconde of sound.
The user can then search for a sound that have been recorded at a specific time.
The program records continuously ... so I have a very large quantity of informations.
Wait, I think the selection of a database is the least of your worries!
Do you really want to store 1 second clips ??
In order to play a 10 second piece, you have to retrieve 10 1-sec clips using SQL SELECT, squish them together (how?), then play the 10 sec clip. It is quite a challenge in compressed formats like MP3. It may be simple in WAV but note that WAV is an uncompressed format. It will eat up your storage in no time.
I dont know the background of your project, but it sounds like (no pun intended ) a streaming input with a non-streaming output system.
I suggest you store incoming stream in 1-2 hr chunks of compressed format, such as MP3. Then use a player such as Winamp to skip to a location.
|
|
|
|
|
I am having a problem with this class. I've noticed there are a couple, so here is the comment at the top so that we know which one i'm using (edited for space):
Now, my problem.
I have a program which has its own skin format. I was having some flicker problems when updating some text on top of the skin, and tried various fixes. When I found this class, I thought my problems where solved.
Lately, I've been having crashes on screen resolution changes. Specifically an access violation (0x...05). I figured it was my code and have been diffing and whatnot for the past few days.
Turns out, its this class! If I use normal drawing calls, the problem goes away completely.
Has anyone had similar problems with this class? If so, how did you fix it? Or is there a better version out there?
|
|
|
|
|
I use this class extensively with no problems.
Does your CMemDC object exist for the lifetime of the display window ? If so that is not how it is typically used. Usually it exists only while the WM_PAINT message is being handled which is in OnDraw for MFC apps. The demo program that comes with it illustrates this.
|
|
|
|
|
I've managed to manifest my problem without CMemDC so it is my code thats causing it.
It seems it's related to my drawing code.
Thanks for your help anyway.
|
|
|
|
|
this thing:
::SendMessage(::GetDlgItem(m_hWnd, IDC_LIST), LB_ADDSTRING, 0, (LONG) achKey);
adds a string to a listbox. Is it possible to add it into a control list as a subitem or just add it?
==============
www.design.kg
|
|
|
|
|
First of all, you need to seperate this, so you verify that the GetDlgItem call does not return NULL. Then you can use LB_INSERTSTRING, as I recall.
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
|
|
|
|
|
Like this?
::SendMessage(::GetDlgItem(m_hWnd, IDC_LIST_ACCOUNTS), LB_INSERTSTRING, 0, (LONG) achKey);
its add nothing and I'm sure that GetDlgItem call does not return NULL.
==============
www.design.kg
|
|
|
|
|
Karavaev Denis wrote:
I'm sure that GetDlgItem call does not return NULL.
I'm sure too, but that does not make your code safe.
I'm not sure exactly what you want to do here - add a string to a substring ? Or do you want LB_SETITEMDATA ( associate a value with an entry )
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
|
|
|
|
|
My app read key names from registry.
I have a sample that add this names to a list box I wana do the same, but to a Control list.
Is it possible?
==============
www.design.kg
|
|
|
|
|
Hi everyone,
The piece of code below uses MSHTML to modify the DOM of a page i have loaded into a CHTMLView. The code works correctly and the page is modified.
My problem is that when the user clicks on another name i need to load the original page template again and modify it again. I thought that by adding the LoadFromResource(IDR_DETAIL_HTML) line the original page would be reloaded and everything would be fine but when i execute it the modification stops taking place. It seems as if the LoadFromResource is being delayed or something and overwriting the modifications.
Does anyone know a way around this problem?
void CDetailView::DisplayDetails(CMessage *msg)
{
// LoadFromResource(IDR_DETAIL_HTML); <-- this is causing the problem.
IDispatch* pDisp = GetHtmlDocument();
if (pDisp != NULL )
{
IHTMLDocument2* pHTMLDocument2;
HRESULT hr;
hr = pDisp->QueryInterface( IID_IHTMLDocument2, (void**)&pHTMLDocument2 );
if (hr == S_OK)
{
IHTMLElement *pBody;
BSTR bodyText=0;
hr = pHTMLDocument2->get_body(&pBody);
ASSERT(SUCCEEDED(hr));
ASSERT(pBody);
pBody->get_innerHTML(&bodyText);
CString bodyStr(bodyText);
::SysFreeString(bodyText);
TranslateText(&bodyStr, msg);
// Check this
pBody->put_innerHTML(CComBSTR(bodyStr));
pBody->Release();
pHTMLDocument2->Release();
}
pDisp->Release();
}
}
|
|
|
|
|
Hi,
I have an internet client application which reads the binary data sent by webserver. I want to display a progress control at the client-end when downloading a file. At the server-end, I am using TrasmitFile to send a file and sending content-length along with it. The problem is that, when I start reading the contents after I do Queryinfo for content-length, I even read content-length header into the buffer, which I don't want to.
How do I avoid headers and read only the binary content sent by server.
Do I have to override something at the server end when I am forming the headers?
Please can anyone answer my question.
Thanks in advance,
Cheers,
mythili
|
|
|
|
|
Hi,
I have a custom control that I would like to convert to an OCX activex object.
Is it possible? and if so any hints on were I can start. Any info or source code that can help would be appreciated.
thanks
Yaniv
|
|
|
|
|
Dear all:
I'm wondering why MFC makes all of its class's ctor protected? Why not public?
|
|
|
|
|
This simply isn't true. If all MFC classes had protected constructors, you'd be unable to construct them. If any DO have protected constructors, it's so you can't construct them unless your class is a friend of the class in question.
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
|
|
|
|
|
One example is CView and its derivatives. Its constructor is protected which means that it can only be created by one of its numerous friend classes such as CDocument, CDocTemplate, CFrameWnd, CMDIChildWnd, and CMDIFrameWnd.
|
|
|
|
|
Hi Christian:
See you again
Here is the code MFC generate for my class.
I know why the DECLARE_DYNCREATE(EventLog) is protected, but I don't know why EventLog is protected, although the comment said "dynamic creation" will do this.
thank you.
/////////////////////////////////////////////////////////////////////////////
// EventLog view
class EventLog : public CObject
{
protected:
EventLog(); // protected constructor used by dynamic creation
DECLARE_DYNCREATE(EventLog)
// Attributes
public:
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(EventLog)
protected:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
//}}AFX_VIRTUAL
// Implementation
protected:
virtual ~EventLog();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
// Generated message map functions
protected:
//{{AFX_MSG(EventLog)
// NOTE - the ClassWizard will add and remove member functions here.
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
|
|
|
|
|
Alex Dong wrote:
know why the DECLARE_DYNCREATE(EventLog) is protected, but I don't know why EventLog is protected, although the comment said "dynamic creation" will do this.
..so that you can not create the class using standard C++ ways, such as creating them on the stack or on the heap using new operator. MFC wants you to create these classes using its own specific way, such as the one used by CObject's ::CreateObject() method. Creating this way would allow you to save extra runtime information. If you dig into MFC source code related to document-view classes, you will find more on how these objects are created.
Hope this helps.
// Fazlul
Get RadVC today! Play RAD in VC++
http://www.capitolsoft.com
|
|
|
|
|