|
for speed use raw odbc and pass direct queries thru
"there is no spoon" biz stuff about me
|
|
|
|
|
Dear All,
Pls help me as am a novice to programming especially in VC and don’t know how to mask a voice using FFT. Is there any other way throurh which I can change or mask the voice. Or anyother code through which i be able to mask or change the voice. (.wav file) Or any function which can change the pitch of the wav file.
Pls I need ur help badlly as am running out of time for my final project.
Kind regards
Jenny
|
|
|
|
|
Maybe this url helps: http://digitalfilter.com/vcclass.html.
|
|
|
|
|
Hi!
Can I use a RecordView in a dialogbased app? How do I show the form in the dialog?
I have tried to add database support to a dialog but I can't seem to get it to work! The reason for using a dialog-app, is that I want to skin the dialog!
Any ideas on how to go about it?
Thanks in advance!
|
|
|
|
|
All you need to do is derive a class from CRecordset . Then in your dialog's OnInitDialog() method, put something like:
CDatabase db;
CMySet set(&db);
TRY
{
set.Open();
if (! set.IsBOF())
{
set.MoveFirst();
while (! set.IsEOF())
{
set.MoveNext();
}
}
}
CATCH(CDBException, pDBException)
{
AfxMessageBox(pDBException->m_strError);
}
END_CATCH
set.Close();
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
You wouldn't happen to have some ready-to-go source codes/project for me to have a look at?
I've been trying to find a sample project all over the place, but can't seem to find any...
I gotta be honest, I've just beginning to use the database classes, so I don't really know where to start!
|
|
|
|
|
Calder wrote:
I gotta be honest, I've just beginning to use the database classes, so I don't really know where to start!
If you are already familar with MFC, the code snippet, along with the comment, I provided should get you well on your way. Is there any particular item that is overly confusing?
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
DavidCrow wrote:
If you are already familar with MFC, the code snippet, along with the comment, I provided should get you well on your way. Is there any particular item that is overly confusing?
Actually... How do I populate my controls with the data from the database?
Thanks for the help! (Highly appriciated )
|
|
|
|
|
Using ClassWizard, create a control variable for each control on the dialog. For example, of you have an edit control with a variable called m_ebName , you can set its value with:
m_ebName.SetWindowText("This is some text");
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
DavidCrow wrote:
m_ebName.SetWindowText("This is some text");
I don't think that would set any text recieved from the database/recordset... Or?
|
|
|
|
|
Obviously not, nor was it intended to. It was merely an example of how to use the SetWindowText() method.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Ok... Makes sense... However, I have no idea how to get the data collected to the recordset.
Let's take an example, in the recordset class I have a variable called m_FAX (Type CString). How can I put that inte an edit box called m_Fax? Is there a way to use Foreign Class in the ClassWiz? If so, I need to set a Foreign Variable - should that be a pointer to the recordset or?
Thanks for having patience with me!
|
|
|
|
|
Calder wrote:
Let's take an example, in the recordset class I have a variable called m_FAX (Type CString). How can I put that inte an edit box called m_Fax?
Is m_Fax a control variable of type CEdit ? If so, then
m_Fax.SetWindowText(set.m_FAX); will work.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Thanks! That works! However, I get a strange problem - when I started the app the first time, it all worked great.
However, when I closed the app it didn't dissapear from the Processes view in the taskmanager. If I stop the process it won't run again... I tried restarting the computer, but that doesn't help either.
Does anybody have a clue? I don't...
BTW, when I double click to start the program (or CTRL+F5 in VisualC++) it appears in the Processes view, and in MySQL Admin as an open thread. But the dialog never shows on the screen!
|
|
|
|
|
What does the OnInitDialog() method look like?
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
II need to write code that will read a bitmap from a Url that is using a pluggable protocol (i.e. XXX://path to file) and not http. This all needs to be done from within code. The user has no input as to were the file is located. I am new at trying to read files in this manner. Thanks in advance for any help given.
chuckie
|
|
|
|
|
Post more information about the plugin. For example, does it access the data via socket or COM?
Kuphryn
|
|
|
|
|
I am trying to create a mfc app that can access bitmaps to be placed in the tool from a url that is associated with a pluggable protocol. I have no idea where the machine is that the data is coming from. All I know is that I need to read the file given the url “xxx://images/test.bmp.” where xxx is the protocol. Hope this is clearer. Thanks for the response.
chuckie
|
|
|
|
|
ummmmm
a big switch statement for each protocol and the reqd internetopen command?
"there is no spoon" biz stuff about me
|
|
|
|
|
In debug mode this code works fine, however when i switch to release i get:
Application Error: The Instruction at 0x77fc9865 referenced memory at: 0x7c45732 The memory could not be read.
I have looked and found this is probably to do with array bounds, but i can't see anything wrong with the code below.
Help would be appreciated
If i just return s then everything works fine, however this would be returning a local variable and the compiler will flag the warning.
char * get_font_string(HFONT hFont, HWND hwnd)
{
char s[1000];
TEXTMETRIC tm;
char face_name[200];
HDC hdc = GetDC(hwnd);
SelectObject(hdc,hFont);
GetTextMetrics(hdc,&tm);
GetTextFace(hdc,200,face_name);
if (!stricmp(face_name,"FixedSys"))
strcpy(face_name,"System");
if (!strcmp(face_name,"System"))
{
strcpy(face_name,"FixedSys");
tm.tmWeight = FW_NORMAL;
}
sprintf(s,"%d %d %d %d %d %u %u %u %u %u %u %u %u %s",
tm.tmHeight,tm.tmAveCharWidth,0, 0, tm.tmWeight,
tm.tmItalic, tm.tmUnderlined, tm.tmStruckOut, tm.tmCharSet,
0,0,DEFAULT_QUALITY, tm.tmPitchAndFamily,
face_name);
ReleaseDC(hwnd,hdc);
pReturnVal = (char*) calloc(strlen(s)+1,sizeof(char));
strcpy(pReturnVal,s);
//return s
return pReturnVal;
}
later in code:
strcpy(font_string,get_font_string(f.hFont,f.hwnd));
free(pReturnVal);
|
|
|
|
|
crandall wrote:
sprintf(s, etc..
Should be using snprintf, really. What's in the etc bit?
crandall wrote:
strcpy(str,someFunc());
Ditto, but with strncpy.
It would be easier to diagnose if you posted the code fully - that is to say that you post the minimum code (make a test app) that reproduces your problem.
--
Ian Darling
"The different versions of the UN*X brand operating system are numbered in a logical sequence: 5, 6, 7, 2, 2.9, 3, 4.0, III, 4.1, V, 4.2, V.2, and 4.3" - Alan Filipski
|
|
|
|
|
Hey everyone,
I have a weird error. I was compiling some code last night and everything was fine. I then shut my computer down and then tried to compile the code this morning and I got these error messages.
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
Debug/Stations.exe : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.
They go away if I start a new project and then copy and paste this code into the new project...I am really confused can anyone help me??
|
|
|
|
|
hi
i think this is because invalid source ID. that means u may have deleted some Resource(Dialog Controls) and Forget to remove those ID from ur source files(resource.h,ur project source file)
Cheers
JP
|
|
|
|
|
oops! Sounds like something I would do. Thanks for the help.
|
|
|
|
|