|
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.
|
|
|
|
|
hey "Mr.Prakash",
Are you a looser ???
if you want to be well seen on that discuss chan, you'd better stop to vote as an anonymous person for your own articles...
thx in advance
TOXCCT alias Nicolas C.
|
|
|
|
|
toxcct wrote:
Are you a looser
May be may be not, but surely I know that you dont know what u are talking about.;P
toxcct wrote:
you'd better stop to vote as an anonymous person for your own articles...
I did not vote myself as anonymous, i dont go that great extend to get vote 5 message which personnaly does not affect me.
And plus for your kind information you cant vote as anonymous;P
Just give a thought to it.
I have lost more blood shaving than on the battlefield - Adolf Hitler
|
|
|
|
|
i installed on second computer at home where no vs files their and about the relese mode i rebuild my project(batch build) in release mode and include the relese folder files to the project
i added the missing files manually then it works
Note: no of errors and warning is 0
|
|
|
|