|
|
thanks, I forgot about that page
Later, JoeSox www.humanaiproject.org
"Dream as if you'll live forever; live as if you'll die tomorrow."
- James Dean(ISTP)
|
|
|
|
|
1) Goto project->settings.
2) Under Settings For: Select the file or files that generate the error.
3) Select the C++ tab.
4) Select Catagory: Precompiled headers.
5) Check "Not using precompiled headers".
INTP
|
|
|
|
|
thanks, that worked
John R. Shaw wrote:
INTP
Later, JoeSox www.humanaiproject.org
"Dream as if you'll live forever; live as if you'll die tomorrow."
- James Dean(ISTP)
|
|
|
|
|
I'm relatively new to Visual C++, C++ altogether even. I know enough and have been going through some tutorials on code project. At the minute I'm working through an introduction to using dialogs and forms. Followed the instructions and made a pretty simple app, but every time I try to run it I get and error:
The ordinal 5076 could not be located in the dynamic link library MFC42D.DLL
I'm using the MFCAppWizard in Visual C++ 6.No matter what kind of program I try to run that uses a form or dialog, I keep getting an ordinal error. CAn anyone tell me what this is. I'm running VC++ on XP Pro.
The more we think we know, the less we understand
|
|
|
|
|
I just looked at ordinal 5076 and in MFC42.DLL it refers at CView::OnUpdate, while in MFC42D.DLL it refers at CWnd::WindowProc (ordinals in these two files are not supposed to match anyways). I really don't know why this is happening but what happens if you try to build and run the release version? I couldn't find CWnd::WindowProc in MFC42.DLL that's why I am asking.
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
It's there, it's just at ordinal 6374 in the release build (look at MFC42.DEF in C:\Program Files\Microsoft Visual Studio\VC98\MFC\SRC\Intel [typically]).
Since the linking is done by ordinal, if you somehow had the wrong version under the wrong name, you'd get erroneous behaviour by the app, not an error like this.
MFC42.DLL is supposed to be compatible from version 4.2 of MFC right up to version 6.0 (i.e. new functions were added at the end, semantics are meant to be identical, and structure and class sizes remain the same).
I think you may have a corrupted copy of MFC42D.DLL, or possibly one from an older version of MFC (although the ordinal numbers should be the same). Try reinstalling it from the Visual Studio CDs, or reinstalling the service pack - you did apply Service Pack 5[^], didn't you?
My version of MFC42D.DLL (from SP5) is version 6.00.8665.0, dated 2000-07-15, size 929,844 bytes.
Sidenote: MFC uses ordinals rather than names because nearly 7000 decorated names, averaging about 40 characters long, would take up 280Kb (guesstimated) in the final DLL. Quite a hit for a DLL that's already nearly 1Mb in size. It would take the loader a bit longer to fix up the import table, too.
--
Mike Dimmick
|
|
|
|
|
Mike Dimmick wrote:
It's there, it's just at ordinal 6374 in the release build
You are right. I don't know why my search didn't return 6374.
Your reply makes perfect sense though.
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
Thanx Mike, found the problem. Didn't have Service Pack 5 lol. Everything's working fine now, plain sailing.
Later
The more knowledge we gain, the less we understand
|
|
|
|
|
It sounds like your app is not using the DLL you link with. What the version of the MFC42D.DLL your app is using?
We do not inherit the Earth from our ancestors, we borrow it from our children - Antoine de Saint-Exupéry (1900-1944)
|
|
|
|
|
I was thinking the same thing and I came back to ask that question but you beat me.
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
For some reason you don't have up to date dlls in your system directory. Download and install service pack 5 and all should be well.
John
|
|
|
|
|
MFC42D.DLL是安装VC++时的可选安装,所以你将光盘放入,重新安装它即可!
|
|
|
|
|
I have a program that utilizes SAPI 5.0 to handle voice recognition to
execute a set list of commands. The grammar is currently being handled by a
static XML grammar file but I would like the user to be able to specify the
terminology to execute each command.
This is the current XML file
--------------------------------------------------------------
<GRAMMAR LANGID="409">
<DEFINE>
<ID NAME="VID_LDblClk" VAL="14"/>
<ID NAME="VID_LDrag" VAL="15"/>
<ID NAME="VID_LSglClk" VAL="16"/>
<ID NAME="VID_RDblClk" VAL="17"/>
<ID NAME="VID_RDrag" VAL="18"/>
<ID NAME="VID_RSglClk" VAL="19"/>
<ID NAME="VID_ReleaseDrag" VAL="20"/>
<ID NAME="VID_CmdType" VAL="255"/>
<ID NAME="VID_Commands" VAL="257"/>
</DEFINE>
<RULE ID="VID_Commands" TOPLEVEL="ACTIVE">
<O>Please</O>
<RULEREF REFID="VID_CmdType" />
</RULE>
<RULE ID="VID_CmdType" >
<L PROPID="VID_CmdType">
<P VAL="VID_LDblClk">left double <O>click</O></P>
<P VAL="VID_LSglClk">left <O>single</O> click</P>
<P VAL="VID_LDrag">left drag</P>
<P VAL="VID_RDblClk">right double <O>click</O></P>
<P VAL="VID_RSglClk">right single <O>click</O></P>
<P VAL="VID_RDrag">right drag</P>
<P VAL="VID_ReleaseDrag">release drag</P>
</L>
</RULE>
</GRAMMAR>
--------------------------------------------------------------
Right now to execute a left double click the user must say "left double
click" but they might want to say "double left click" or anything else, so I
want to give them the ability to change the grammar while using the program.
Is this possible?
Thanks in advance,
~Logan
|
|
|
|
|
Has anyone attempted to develop a VST host? I'm keen to have ago for a granualar synthesis program i writing, but everyone I know has run in fear of attempting it.
If there's any brave soles out there who have given it a go with little or no success would you mind sharing your source with me? I guess if folks succeeded they probabley wouldn't want to share!
If I succeed (and that a big if) I'll do tutorial on here to "share the knowledge".
Ta.
Email:
boutatrain@yahoo.co.uk
|
|
|
|
|
Hi all...
First off, I'd like to thank all whom contribute to this board - it has been an extremely valuable resource for me - a non-programming expert.
I'm a mechanical engineer by trade but have written Visual C++ apps for quite some time; sometimes for fun, sometimes for timesaving. Right now, I'm developing an application that performs some extensive linkage analysis on motorcycle suspensions. As such, I'm using primarily "double" variables.
In the past, when I needed to display these values in my window, I could convert them to a string and write them to a text box and control their format. This time, however, I have simply set the on screen edit box variables as doubles and have direct relationships between my screen variables and my calculation variables to make screen updates and retrieving data from the screen easier/quicker.
However, now when I display the values on the screen, they're written out to some god-awful number of decimal places. Is there an easy way of limiting an edit box's number of decimal places when you do an UpdateData ?
Sorry that this is probably a very lame question, but your assistance is much appreciated.
-Chris
http://www.slideruleracing.com
|
|
|
|
|
In DoDataExchange() , look for the call to DDX_Text() which has the ID of the edit box you're entering. Replace with something like the following:
if ( pDX->m_bSaveAndValidate )
{
DDX_Text( pDX, IDC_EDIT1, m_flData )
<font color="green">
}
else
{
CString sRep;
<font color="green">
sRep.Format( _T( "%.3f" ), m_flData );
SetDlgItemText( IDC_EDIT1, sRep );
} Obviously it's not as tidy as simply calling DDX_Text .
You could add your own overload of DDX_Text if you're going to be doing this a lot. Look at the implementation in the MFC source code in DlgFloat.cpp for an example.
--
Mike Dimmick
|
|
|
|
|
I'd eliminate the use of UpdateData(). For each edit control, assign a CString member variable. When it comes time to update a control, do something like:
CString strSuspension;<br />
strSuspension.Format("%.3f", m_dSuspension1);<br />
m_edit.SetWindowText(strSuspension);
If you need to get the value from a control, use:
m_edit.GetWindowText(strSuspension);<br />
m_dSuspension1 = atof(strSuspension);
There are many ways to tackle this problem.
|
|
|
|
|
OK so I customized the CColorDialog and added a HEX edit box. What I want to know is how can I update this when the user changes a color in the color dialog box? Is there some function or way to tell me when I should change the hex edit box to reflect the current color selected by the user?
|
|
|
|
|
Router
|
|-- 192.168.0.2 <----> 192.168.0.1 (Client1 on LAN1)
|-- 172.16.0.2 <----> 172.16.0.1 (Client1 on LAN2)
|-- 10.10.0.2 <----> 10.10.0.1 (Client1 on LAN3)
Machines Specifications
Router
Windows XP Professional with Service Pack 1
Windows 2000 Server (Dual Boot)
Microsoft Visual Studio 6.0
AMD K6-II 500 MHZ, 256MB RAM
3Com Etherlink III ISAPNP Ethernet Adapter 10Mbps
HP Ethernet with LAN remote power Adapter 10/100 Mbps (PCI)
Intel 21143-Based PCI Fast Ethernet Adapter 10/100 Mbps
Client 1 on LAN 1
Windows 2000 Professional with SP3
Microsoft Visual Studio 6.0
Pentium II 450 MHZ, 256 MB RAM
Realtek RTL8029(AS) PCI Ethernet Adapter 10Mbps
Client 1 on LAN 2
Windows 2000 Professional with SP3
Microsoft Visual Studio 6.0
Pentium III 600 MHz, 128 MB Ram
3Com EtherLink XL 10/100 PCI For Complete PC Management NIC (3C905C-TX)
Client 1 on LAN 3
Windows 2000 Professional with SP3
Microsoft Visual Studio 6.0
Pentium II 266 MHz, 128 MB Ram
Linksys LNE 100 TX Fast Ethernet Adapter (PCI)
This is my network topology. A machine acting as a router is connected to three other machines acting as three different LANs. The problem is with the behaviour of Microsoft’s API Function GetAdaptersInfo(). This function gives complete information about any NIC in a PC such as MAC Address, IP Address, Subnet Mask, Default Gateway etc.
This function works fine when all the PCs are up and network is running. But fails when any one PC from any network is off. GetAdaptersInfo() gives 0.0.0.0 as IP Address, subnet mask etc. of the NIC whose associated network is down. There is nothing documented about this behaviour in MSDN.
One more strange thing is that this function has different behaviour on above four PCs. It works fine regardless of network is up or down on Client1 on LAN1 and on Client1 on LAN2 but fails (means give 0.0.0.0) on Router machine and Client3 on LAN3.
I am unable to understand who is causing this problem.
Whether it is operating system?
Whether it is NIC driver?
or simply it is a bug of GetAdaptersInfo()?
Anybody help please!!!!!!!!!!!1
Thanks
|
|
|
|
|
Hi All,
I am using VC++ 6.0 on a client running Win98.
I need to access a datasource on a webserver running NT 4.0.
The remote database is Access97.
The remote datasource is already set up as a System DSN via ODBC.
The remote datasource is not accessible via a LAN - it must be accessed by domain name or IP address.
I have searced the CDAO documentation but can't determine how to connect to a remote datasource via tcp/ip
Can anyone help with this?
My goal is to populate a combo box with a query from this remote datasource.
I tried ActiveX controls, but the intricacies of creating wrapper classes is beyond me at this time.
It would be faster for me to rewrite the entire project in Visual Basic just so I can use an ActiveX control but I really want to do this in C++.
Does anyone know of perhaps a pre-built class I can drop into my project?
My workaround at this time involves calling a Cold Fusion page on the server and parsing the returned text into the combobox. Very ugly.
Thanks!!!
EDIT
====
Thanks anyways! I cut the Gordian knot and just ported the Access DB over to a MySQL DB and I can connect with a standard ODBC string
|
|
|
|
|
I am trying t create a switch statment that sitches on names in an array
but I can only come up with a the loop below.
Is there a function that will return the numeric value of a char?
char Names[50]<br />
<br />
for(int i=0; i<50; i++){<br />
int temp = (int)Names[i];<br />
if(temp = the number value of 'pla')<br />
then do some stuff<br />
<br />
if(temp = the number value of 'oct'0)<br />
then do some more stuff<br />
}<br />
Steven
|
|
|
|
|
johnstonsk wrote:
the number value of 'pla'
You can not turn a string into a single int and then compair the ints...
[EDIT]
Well if your string is exactly 4 characters you can use a cast like you did in your code sample but this is the only case that it would reliably work...
[/EDIT]
John
|
|
|
|
|
some of the valuse in the char array vary
pla
oct
frozen
stopped
etc.....
steven
any ideas on how to do this?
steven
|
|
|
|
|
If there are more than 4 characters it won't work with just a cast because an int is 4 characters of data. Since there are only 26 letters and less than 4 billion possible english words ( I assume all are spelled correctly and there are no proper names...) you could come up with an algorithm to convert the words to 4 byte numbers.
John
|
|
|
|