|
Mav,
It's a lot simpler than you think especially sounding the notes.
The majority of the work will be building a representation of the keyboard that responds to the mouse clicks, what do you mean by edit the notes??
You can use the MIDI API see http://www.borg.com/~jglatt/tech/lowmidi.htm. The sound API has functions that can sound midi output at a given pitch.
Its definitely the easiest way to get the notes sounding, the app itself will need to be threaded in order to sound multiple notes at once...
You will need to link you project to 'winnm.dll' to be able to call midiOutShortMsg() the simplest operation to sound a note. See the section on 'Outputting MIDI data (except System Exclusive)'
have a look at the article and get back to me regarding questions,
Ross W
|
|
|
|
|
Mav,
It's a lot simpler than you think especially sounding the notes.
The majority of the work will be building a representation of the keyboard that responds to the mouse clicks, what do you mean by edit the notes??
You can use the MIDI API see http://www.borg.com/~jglatt/tech/lowmidi.htm. The sound API has functions that can sound midi output at a given pitch.
Its definitely the easiest way to get the notes sounding, the app itself will need to be threaded in order to sound multiple notes at once...
You will need to link you project to 'winnm.dll' to be able to call midiOutShortMsg() the simplest operation to sound a note. See the section on 'Outputting MIDI data (except System Exclusive)'
have a look at the article and get back to me regarding questions,
Ross W
|
|
|
|
|
Ross,
How would you go about attaching 'winnm.dll' to a project? I am at a complete block at the moment which isn't good, I am just unable to get my head around linking the dll files then accessing them. Do i need to create a header file? Which things will i then need to include in the file?
Cheers
Mav
|
|
|
|
|
I was wondering whether anyone could help me…
I would like to produce a ‘Visio’ style GUI in MFC. I have made some very basic programs using MFC but not too sure how to go about this. I need to produce a network diagram based on some code that I have already written. Ideally I should be able to move the ‘objects’ (switches, hosts, etc) within the window. Should I inherit the CRichEditView as the base class and insert OLE objects. If anyone has any opinions/helpful comments/links to help me it would be appreciated.
Even if you know of a different/easier way of doing this please point me in the right direction.
Thanks very much
Simon
|
|
|
|
|
Just buy the rogue wave components that do this - www.roguewave.com (used to be stingray).
|
|
|
|
|
thanks roel but I was hoping to implement a basic version myself - I would use something like you have surgested but it is not going to be a comercial product so would not warrent me spending that much money on it.
But sill the website you gave me is good for research - thanks again.
|
|
|
|
|
Ok in that case I'd write a custom control myself, either using win32 sdk, mfc or wtl, what you're most comfortable with. That would mean handling all the hit-testing, dragging, selections etc manually. I have once written something similar to what you want to do, using different windows for the 'items' in the view but that wasn't the right way to do it. I started redoing it by drawing directly on the custom control but I never finished that (we bought the roguewave thing).
|
|
|
|
|
Hi,
I'm trying to write a .NET-dll with Visual C++. Always I want to use fopen I get this error:
file error LNK2001: Nichtaufgelöstes externes Symbol "struct _iobuf * __cdecl _wfopen(unsigned short const *,unsigned short const *)" (?_wfopen@@$$J0YAPAU_iobuf@@PBG0@Z)
Does anyone know a solution? I must use fopen, because I need a FILE* for an input in an imported C-dll.
|
|
|
|
|
is _wfopen similar to fopen ???
TOXCCT alias Nicolas C.
|
|
|
|
|
_wfopen and fopen are the same. Only the input parameters are different.
FILE *fopen(
const char *filename,
const char *mode
);
FILE *_wfopen(
const wchar_t *filename,
const wchar_t *mode
);
I can use fopen or _wfopen. Always the compiler error occures.
Any solutions?
|
|
|
|
|
no, not at all...
(you certainly included the correct header file, didn't you?)
TOXCCT alias Nicolas C.
|
|
|
|
|
I think I have. Here my .cpp file:
#include "stdafx.h"
#include <stdio.h>
#using <mscorlib.dll>
#include "file.h"
using namespace System;
using namespace System::Runtime::InteropServices;
int file::Class1::createfile()
{
FILE* f = _wfopen(L"C:\\test.test", L"w+");
return 0;
}
And my header-file is:
#pragma once
using namespace System;
namespace file
{
public __gc class Class1
{
public :
int createfile();
};
}
|
|
|
|
|
Does this help?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Just check in the MSDN what .lib files need to be added for its linking.
I have lost more blood shaving than on the battlefield - Adolf Hitler
|
|
|
|
|
Thanks for reply, but I can't extract the related information I need from MSDN. If I try to make a .NET-application using Visual C++, fopen works great. Only if I want to use that in a .NET-dll it doesn't work. Can anyone correct this code, so it will runnning as a .NET-dll, please?
My header-file:
// file.h
#pragma once
using namespace System;
namespace file
{
public __gc class Class1
{
public :
int createfile();
};
}
My implementation-file:
// file.cpp.
#include "stdafx.h"
#include <stdio.h>
#using <mscorlib.dll>
#include "file.h"
using namespace System;
int file::Class1::createfile()
{
FILE* f = fopen("C:\\test.test", "w+");
fclose(f);
return 0;
}
I'm trying and trying and get no solution. Please, it's important for me.
|
|
|
|
|
Hi,
i need to implement simple database function in a VC++ application,
but i cannot include any database product like Access etc.
So i need to use file-based database, are there any efficient
(fast, robust and reliable) programming technique for implementing
a simple file-based database function?
Thanks
|
|
|
|
|
If it is a really a simple db you can use an array of your db sets as ojects. If it is more maybe you can use the ODBC interface.
Try this @ home. (B&B)
|
|
|
|
|
Have a look at sqlite - http://www.hwaci.com/sw/sqlite/
|
|
|
|
|
You can use access db's without installing the Access product. All you need to install is the JET drivers (included in MDAC, which is FREE).
Alternatively, you could use your own classes and serialize them via MFC or memory-mapped files or even write a simple DBF file implementation.
onwards and upwards...
|
|
|
|
|
This is my quest: I open a wave in a read/write mode,I create a new file, I modify the stored data by means of special interpolation, but when I finish I'd like to have a new wave file, but how to get it in the format Wave? I mean the header (44bits)...etc
Zizoo
|
|
|
|
|
I don't really understand the question I think, but have a look at the format for wav files: http://www.technology.niagarac.on.ca/courses/comp630/WavFileFormat.html. Google is your friend.
|
|
|
|
|
Is there any SDK that we can use to integrate antivirus capabilities within our applications?
|
|
|
|
|
SAVI (Sophos Anti-Virus Interface) SDK
visit : http://www.cdg-group.com/go.exe?prodid=201
|
|
|
|
|
hi
i build a setup programe for my vc++ application useing Inno programe and vcredist.exe after i extracted and also add MFC42D.DLL file from C:\\WINDOWS\system32 (XP)
when i install the program in my computer (Win XP) at home no VS installed their it work but when i tried to installed
at the computer in my company (Win 2000,Network)
it give me an error message that MFC42D.DLL cannout be found their!!!!!!!!
so why that happend ?
and how i can fixe it?
|
|
|
|
|
At home you must have installed Visual Studio, so the necessary files had come along with the VS and your application.
Incase of office installation that machine had no VS installed hence could not find the necessary files.
You should build ur app in Release mode to solve the problem.
If you had build the app in release mode and still the problem persisted, check while building you got a warning as ... use /NODEFAULTLIB:libname
if yes add the following line in the link tab of the project setting
/NODEFAULTLIB:mfc42d.lib in project setting at the bottom.
add for all the lib that is giveing conflict warning.
This should solve your problem,
Still Alive!!!
Thank you God.
|
|
|
|