|
Do the function signatures match? Implement a dummy that calls the base class implementation.
...if you're under 8 or younger. Chris Maunder, the Lounge
|
|
|
|
|
It turned out I had forgotten to include the IMPLEMENT_DYNAMIC macro in my implementation file. This was revealed when I tried to follow your suggestion to implement a dummy function. Actually I tried to reimplement the same function to see what happens, and was told that the function was already declared, and on double clicking the error, was taken to the DECALRE_DYNAMIC macro. This was all I needed to have my ears pulled.
Thanks very much.
Regards,
Rohit Sinha
|
|
|
|
|
I am currently working on a graphical interface for an application designed to recreate a physical model of a ventilation system.
I believe that the tree control in Visual C++ might be useful as a means of modelling a ventilation system, in that ventilation elements in the system could be included as items in the tree, with all the appropriate interconnections.
I am very new to Visual C++ and am fairly unfamiliar with the functionality of the tree control. Is it possible to use it to build your own tree in such a way or is it only used for displaying existing file systems etc. Also could each element in the tree be assigned a particular set of parameters via other interface dialogues? Could these parameters then be used to make mathematical calculations, based on the position of the element within the tree, relative to other elements?
Can anyone suggest other non-MS controls which may be useful?
|
|
|
|
|
the tree control is a general purpose control designed for displaying hierarchical data ... you can do whatever you want with it as far as what it shows is concerned ... detecting clicks on items and position within the tree is easy to do and i guess you could use the position to perform calcs
"... and so i said to him ... if it don't dance (or code) and you can't eat it either f**k it or throw it away" biz stuff about me
|
|
|
|
|
thank you, Lauren that's good news.
Do you know a good place to find information on the functions used by the tree control or tutorials on how to use it?
|
|
|
|
|
look in msdn ... search for CTreeCtrl
"... and so i said to him ... if it don't dance (or code) and you can't eat it either f**k it or throw it away" biz stuff about me
|
|
|
|
|
Also, be sure to look here
Shog9
------
If you really what to get shitfacde tell a crowded bar that is is yourt borthday and hife your wallet. you ka will many more friends.
- David Wulff, Brithday selebrations, 9/19/02
|
|
|
|
|
Even if you go this route, you might want to consider people that will be suing the application, and weather or not they will be able to equate the treeview model to the bransvhing out of ducts. The treeview kind of forces everything into a left-justified list model and I could see where that might confuse people that are used to looking at ductwork that flows in a wider range of motion.
Depending upon the intent of your application you might want to go to another type of control, one that is more two-dimensional, or at very least give the user a small line drawn map to indicate where they are in the schematic when they click on part of the treeview.
|
|
|
|
|
Ray Cassick wrote:
people that will be suing
I hope this doesn't happen.
Tree's don't have to be like the MS Tree control. One that isn't which I'm very impressed with is: http://www.teemach.com/products/teetree/tree%20galery.htm[^]
There are many Graph components around, which may be a better route to head down for this application.
Neville Franks, Author of ED for Windows. www.getsoft.com
|
|
|
|
|
Neville Franks wrote:
I hope this doesn't happen.
Darn spelling
That is a great link by the way.. I really did not know that you could do so many things with the tree control...
|
|
|
|
|
Is it possible to embeed a CHtmlView into a dialog so that I can show html pages that I load from disk. If you can't put a CHtmlView into a dialog is there another way to do it?
Thanks in advance.
- monrobot13
|
|
|
|
|
u can :
http://www.microsoft.com/msj/0100/c++/c++0100.asp
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Thanks much for the info!
- monrobot13
|
|
|
|
|
Hi,
I'm trying to use Embedded VC++ 3.0, with the Pocket Pc Emulator, I can generate a typical Hello World application, and it goes fine but...
I want to download a file to the emulator and read it, I have used the "remote file viewer", it seems that the file is copied where I want, but when I'm going to read the file from my application, it gives me one error, like "it doesn't exists", should I write the full path from my computer, or the pocket Pc one ?
Another problem, comes with the S309PictureBox, I need to display a jpg image on my application, but it's impossible to register that OCX... any clue, or alternative way of doing that ?
I have tried to install EVC++ 4.0... but I get no connection with the emulator (((
Thanks in advance for your help, greetings
Braulio
|
|
|
|
|
Hi,
I need to use CoInitializeEx. It's definition is in objbase.h, and wrapped in a preproc directive...
#if (_WIN32_WINNT >= 0x0400 ) || defined(_WIN32_DCOM) // DCOM
I cannot find info in _WIN32_WINNT anywhere in MSDN, or on this site. Am I meant to define this manually myself? Or it it defined elsewhere?
Thanks
Jon
Signature space for rent. Apply by email to....
|
|
|
|
|
You define it yourself to specify which version of winnt you are targeting.
0x0400 = NT4
0x0500 = W2k
0x0501 = XP
PS: I think it defaults to the WINVER setting
...if you're under 8 or younger. Chris Maunder, the Lounge
|
|
|
|
|
This is a macro used to target your app for specific platforms depending on the value. By default, Win NT 3.51 is targeted. If you want to target a version of NT greater than that, you need to define it.
_WIN32_WINNT = 0x0400 => NT 4
_WIN32_WINNT = 0x0500 => Win2k
_WIN32_WINNT = 0x0600 => Win XP (??? not sure here)
You can define the value in StdAfx.h, or at the top of the file which includes the required header file. But then you'll have to remember which files you defined them, and remember to update each of them if your target platform changes, so it's better to do it in StdAfx.h.
Regards,
Rohit Sinha
|
|
|
|
|
hey, is there an easy way to get the text of a CSting into the clipboard? I cant seem to find a way. Or is it more envolved?
thanks
luke.
|
|
|
|
|
Easy only in VB.
Look at MSDN[^] for a C/C++ solution. (see the samples)
...if you're under 8 or younger. Chris Maunder, the Lounge
|
|
|
|
|
CSharedFile sf(GMEM_MOVEABLE | GMEM_SHARE | GMEM_ZEROINIT);
sf.Write(sString, strlen(sString));
if (sf.GetLength() > 0) {
OpenClipboard(AfxGetMainWnd()->GetSafeHwnd());
EmptyClipboard();
#ifdef _UNICODE
SetClipboardData(CF_UNICODETEXT, sf.Detach());
#else
SetClipboardData(CF_TEXT, sf.Detach());
#endif
CloseClipboard();
}
_____________________
"So in the interests of survival, they trained themselves to be agreeing machines instead of thinking machines. All their minds had to do was to discover what other people were thinking, and then they thought that, too."
Breakfast of Champions, Kurt Vonnegut
|
|
|
|
|
thanks heaps
luke.
|
|
|
|
|
What programming tools do you use? MFC makes working with clipboard very easy.
Kuphryn
|
|
|
|
|
I'm using LoadLibrary and GetProcAddress to pull a function from a DLL. This is working okay but when I call the function, I get this from the Debug Library:
"The value of ESP was not properly saved across a function call. This is usually a result of a calling function declared with one calling convention with a function pointer declared with a different calling convention."
Now I know this means that I'm using the wrong definition for my function pointer. Unfortunately, I don't know what the exact definition should be (and the person who can tell me is on holiday!).
I know that it's two strings in and an integer return. I've tried:
typedef int (*FUNCPTR1) (LPSTR Key, LPSTR Licensee);
typedef int (*FUNCPTR1) (LPCSTR Key, LPCSTR Licensee);
neither of which work.
So does anyone have any idea how I can extract the correct definition from the DLL?
Paul
|
|
|
|
|
|
Isn't __cdecl for in the DLL? I know it's being exported with the right name.
Where would I put __cdecl in the calling program?
Paul
|
|
|
|