|
If you are thinking winmm.dll , you do not directly link DLLs to a project, you link the import library for them with the project. Try adding winmm.lib to your list of Libraries to link with.
Peace!
-=- James (Sonork:100.21837)
[Tip for SUV winter driving survival: "Professional Driver on Closed Course" does not mean "your Dumb Ass on a Public Road"!] [Get Delete FXP Files Now!]
|
|
|
|
|
Good Day,
Everytime i create or open a project, an error occur:
fatal error RC1015: cannot open include file 'afxres.h'.
I searched and found the problem in Microsoft site:
http://support.microsoft.com/default.aspx?scid=kb;ja;326987
but i could not read the file coz i dont have the OS installer
to support the language.
I already reinstall Visual Studio but the same things happen.
Thanks a lot.
spingkoy
|
|
|
|
|
The MSDN article Q156916 gives pretty detailed steps on how to fix it. Did you try compiling the .RC file into a .RES file?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I tried to search the article Q156916, it has been referred to Article - 156916.
The article talks about J++. I tried renaming the .rc to .rct or .res but when i load the
project and go on the resource tab, the same error appear.
spingkoy
|
|
|
|
|
spingkoy wrote:
I tried renaming the .rc to .rct or .res...
It has to be compiled, not renamed.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I've compiled it, but same things happen.
Im having a dual boot so I've tried re-installing
on the other OS and it works. I think its cause is
software conflict. I did know that my friend
installed Visual Studio on the other OS.
Thanks for the support.
Have a nice day and More Power to you.
spingkoy
|
|
|
|
|
Hi !
I'm facing a very strange problem with the code snippet below.
I'm creating a base class (JSBase) which provides two virtual methods. These two methods have the same name.
In a derived class, I reimplement only one of these two methods.
In the main(), I instanciate the derived class and call one of the method of the base class (the one which has not be reimplemented in the derived class).
When I compile, I get this error :
.\TestDerive.cpp(64) : error C2664: 'import' : cannot convert parameter 1 from '
class ClassTest1' to 'class ClassTest2'
No constructor could take the source type, or constructor overload resol
ution was ambiguous
What's wrong ? Can't I reimplement only one of the method in the derived class ?
I would appreciate a lot your help !
Thanks !
Jerome
class ClassTest1 {};
class ClassTest2 {};
class JSBase
{
public:
JSBase() {};
virtual ~JSBase() {};
virtual void import(ClassTest1 Data) {};
virtual void import(ClassTest2 Data) {};
};
class JSDerived : public JSBase
{
public:
JSDerived() : JSBase() {};
~JSDerived() {};
void import(ClassTest2 Data) {};
};
void main(int argc, char* argv[])
{
JSDerived MyDerived;
ClassTest1 MyData;
MyDerived.import(MyData);
}
|
|
|
|
|
you implemented void import(ClassTest2 Data) {};
but calling MyDerived.import(MyData); with MyData of type ClassTest1
See the prob?
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Hi Papa !
Sure, I'm calling the 'import()' method with a parameter of type ClassTest1. The base class has such a method. Why is this method not accessible from the derived class ? This is what is strange for me !
Jerome
|
|
|
|
|
try to create a cast operator...
operator (ClassTest2)
TOXCCT >>> GEII power
|
|
|
|
|
Are you using vs6?
[EDIT]
I thought it was a bug with vc6 but it does the same in vc7 too.
One thing you can do is define void import(ClassTest1 Data) {};
and have it call the base:
void import(ClassTest1 Data) {
JSBase::import(Data);
};
[/EDIT]
John
|
|
|
|
|
Hi John !
Yes, I am....a bug with VS 6 ????
Jerome
|
|
|
|
|
Reread my previous post, I edited it while you were replying..
John
|
|
|
|
|
Hi John !
Thanks for your help !
The workaround you suggest is the one I implemented, but I'm not very satisfied : I'd like to understand why what I wanted to do is not allowed.....
Thanks again !
Jerome
|
|
|
|
|
Jerome Conus wrote:
The workaround you suggest is the one I implemented, but I'm not very satisfied
I thought of that and agree it does not make a lot of sense why that operation is not allowed.
John
|
|
|
|
|
Hi,
You have discovered a slight 'flaw' in C++. This isn't a VS6 thing. When overloading virtual functions in base classes, the member function in the derived class 'hides' the overloaded base class function. You will need to explicitly call the baseclass function:
MyDerived.JCBase::import(MyData);
to do what you want done. As a general rule, don't overload virtual functions, for the reason you found out.
-Mike
|
|
|
|
|
Hi
I have a question here. Let's say i have a program running as service, which is shown in the taskbar. If i dubbelclick the item in the taskbar, i get the screen of my application. If i quit the program, the item in the taskbar is gone (I handled message 'OnDestroy' of my application & deleted the item in taskbar).
If i stop the service in the service section of Computer Management. The item in the taskbar isn't deleted. Isn't message 'WM_DESTROY' send to my application .. i don't think so actually .. but which message is it, so i can delete the icon in the taskbar myself when needed. Same goes for Reboot service !
Greetings,
Jens
|
|
|
|
|
JensB wrote:
Isn't message 'WM_DESTROY' send to my application
WM_DESTROY is a window message not a service message, so it wount be posted when the service is stoped.
I guess you need to post the message where you are handing the service stop message.
regards.
|
|
|
|
|
[Well, since there is no Shell Extension forum...]
I have a Shell Context Menu Extension. But I want to have more control over where the Menu Item (actually a Popup Menu Item) is inserted at. For example, WinZIP adds its item after the "standard" commands, but before the seperator and "Send To" item.
I want to do the same thing; I want to insert a leading seperator (if possible), my Popup Menu Item, and a trailing seperator (if possible).
I am having trouble trying to customize the insert location in this fashion. I do not beleive it is safe to adjust the "insertion point" that the Shell passes to me when it initializes the extension, but what other way could it be done?
Open to suggestions...
Peace!
-=- James (Sonork:100.21837)
[Tip for SUV winter driving survival: "Professional Driver on Closed Course" does not mean "your Dumb Ass on a Public Road"!] [Get Delete FXP Files Now!]
|
|
|
|
|
Programming in W98 I use _inp() and _outp() in my code to read and write the single bit on parallel port (0x0378-0x037f).
Now in W2000 (or NT system) this code create an error.
How I can move the single bit, or read it, in W2000.
Is it necessary to make a driver?
Now I'm using driver same GiveIO or UserPort but Is this the only solution?
What is the simplest way?
Thanke you, Andrea.
|
|
|
|
|
use CreateFile to create a filehandle to LPT1 and use
WriteFile to write to the port.
|
|
|
|
|
I try to do it, but my question is: how I can write/read the 8 bit of the "status register 0x379" or "control register 0x037a".
In W98 I use _inp(0x378,xx) or _outp(0xo37a,yy) and I can move the single bit of the registers... but now with CreateFile, WriteFile and ReadFile how I can to direct singles resgisters?
Ciao, Andrea.
|
|
|
|
|
Hi, can anyone tell me how to set the path to open a file when do Archive->Open?
Thanks
|
|
|
|
|
First you must tell us what "Archive->Open" is. I've not seen it before so I don't know if it's a third-party program, or something related to your project.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Sorry, I want to say File->Open.
|
|
|
|