|
Manmohan29 wrote: ...all the computers which are switched ON during class' time...
Are they connecting to a WAP that you have control over? If so, can you disable the WAP during class hours?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Manmohan29 wrote: I have included all header files but still this error remains
Thats because some header files [^] may not contain any source code. If you would have read the documentation for the IcmpCreateFile Function[^] you might have noticed it mentioning a Iphlpapi.lib file. One way of fixing this linker error is adding:
#pragma comment(lib,"Iphlpapi.lib")
You could also add the library to the Additional Dependencies section of your project.
Best Wishes,
-David Delaune
|
|
|
|
|
thanks.
Future Lies in Present.
Manmohan Bishnoi
|
|
|
|
|
in the name of god
hello anyone who is reading
i have a problem please help me:
in the code below is there any way which the class DerivedContainer in every where treat with DrivedMember as m_instance without static_cast?
as i have no well access to net if it is possible please send me the answer to sajadsadeghy@gmail.com or if not also thanks.
#include "stdafx.h"
class BaseMember
{
public:
int testBase;
BaseMember()
{
}
};
class DerivedMemer:public BaseMember
{
public:
DerivedMemer()
{
}
void SomeFunction()
{
}
int testDerived;
};
class BaseContainer
{
public:
BaseMember* m_instance;
BaseContainer()
{
m_instance=new BaseMember();
}
};
class DerivedContainer:public BaseContainer
{
public:
DerivedContainer()
{
m_instance=new DerivedMemer();
}
void TestFunction()
{
DerivedMemer* pIs=static_cast(this->m_instance);
pIs->testDerived=100;
}
};
int _tmain(int argc, _TCHAR* argv[])
{
DerivedContainer der;
der.TestFunction();
return 0;
}
thanks in advance .
valhamdolelah
|
|
|
|
|
khomeyni wrote: DerivedMemer* pIs=static_cast(this->m_instance);
This does not compile. Try:
DerivedMemer *pIs = static_cast<DerivedMemer *>(this->m_instance); You could also use:
DerivedMemer *pIs = (DerivedMemer *) this->m_instance;
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
in the name of god
hello and thanks for your guide
but my question is that every time we need the m_instance of class DrivedContainer we must use TestFunction as in the main belowthat it is not good way to do this in every initializing;
is there any way to avoid writing TestFunction and casting the m_instance to DrivedMember class object?
void TestFunction()
{
DerivedMemer *pIs = static_cast<derivedmemer *="">(this->m_instance);
pIs->testDerived=100;
}
int main(int argc, _TCHAR* argv[])
{
DerivedContainer der;
der.TestFunction();
return 0;
}
thanks
valhamdolelah
|
|
|
|
|
khomeyni wrote: ...every time we need the m_instance of class DrivedContainer...
From where? It can be accessed from another method in DerivedContainer , and in main() .
How are you wanting to get access to m_instance ?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
in main i used :
DerivedContainer der;
der.TestFunction();
i mean that every time i create a new object of DrivedContainer i must cast m_instance of class DrivedContainer which has been inherited from BaseContainer to DrivedContainer.
class BaseContainer
{
public:
BaseMember* m_instance;
BaseContainer()
{
m_instance=new BaseMember();
}
};
int main(int argc, _TCHAR* argv[])
{
DerivedContainer der;
der.TestFunction();
}
you said there is another way for this. please say what i must to do?
valhamdolelah
|
|
|
|
|
khomeyni wrote: you said there is another way for this. please say what i must to do?
I've not sure if it is the correct way, but one option would be:
class BaseContainer
{
public:
BaseMember *m_instance;
BaseContainer()
{
m_instance = new BaseMember();
}
BaseContainer( DerivedMemer *d )
{
m_instance = d;
}
};
class DerivedContainer : public BaseContainer
{
public:
DerivedContainer() : BaseContainer( new DerivedMemer )
{
}
};
void main( void )
{
DerivedContainer der;
BaseContainer bas;
} This is a part of C++ that I've never had to bother/worry about.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
in the name of god
hello and thanks for your guide
but suppose that i want to create a function in DerivedContainer and use m_instance there then it is false for it and yet we must cast for each object.
example:
class DerivedContainer : public BaseContainer
{
public:
DerivedContainer() : BaseContainer( new DerivedMemer )
{
}
mynew_fun(){//here we need type_cast yet.
DerivedMember *nD=static_cast<derivedmember *=""> (this->m_instance);
}
};
|
|
|
|
|
Hi. Sry to bother. I am creating some buttons in a UI-thread. And they creats just fine. Unique thing that bothers me, is that they don't draw itselfs. So i can use them, but i can't see them. I am using gdiplus to draw the buttons. I start it at the application thread. (i don't know if i should start it at my own thread too? and if i do it, sometimes the application doesn't starts, but doesn't matter the problem persists) So what could i do to make visible my buttons? (they have visible style and showwindow sw_show etc) (when i do this without thread it all looks fine) And other problem that i noticed, when the application is closed it calls the destructor of buttons created by my thread, so it raise exception. So.. can you help me? =) Tnx for any help.
|
|
|
|
|
Why not create the buttons in the primary thread?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Well.. It's complicated. It's not a simple button... That's why i tryed to do it in a thread, but i followed your idea and made instead of CreateButton(...) PostMessage(...) and it works. But i have certain troubles with it. For example i create one button, later other that have to works with previously created button. So how can i check that the message stack is empty?
|
|
|
|
|
Hi all........
This is Eswar
I want help for any one, In my project convert from tiff image to pdf document. this project developed in vc++6.0, :
so please help me........
thanks in advance
|
|
|
|
|
May I politely google that for you [^]?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
eswar pothula wrote: so please help me........
Consider yourself helped:
http://www.lmgtfy.com/?q=how+convert+tiff+to+pdf[^]
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
|
|
Hi all,
I want to display a special font using UNICODE, in my MFC application.
I have used '_UNICODE' in preprocessor.
This is my syntax
TCHAR **strUnicode;
//...
wcscpy(strUnicode[0],L"U+0985"); //Bengali unicode of a single charecter
After that, i want to display bengali character by print value of 'strUnicode'. But it display 'U+0985'.
Can any one told me how to construct 'strUnicode' and to display charecter.
Thanks to all
|
|
|
|
|
Try using something like that:
std::wstring str = L"Special letters: \u0985";
MessageBox(NULL,str.c_str(),L"Caption",MB_OK);
Life is a stage and we are all actors!
|
|
|
|
|
Almost
std::wstring str = L"Special letters: \x0985";
MessageBox(NULL,str.c_str(),L"Caption",MB_OK);
|
|
|
|
|
Is there any difference between \x20AC and \u20AC for example ?
Characters size or code page issues or other?
I've thought they display exactly the same and wcscmp confirmed that produced strings are identical.
Life is a stage and we are all actors!
|
|
|
|
|
Hristo Bojilov wrote: Is there any difference between \x20AC and \u20AC for example ?
The former is a character escape for a hex number - the later is not a valid C/C++ escape character[^].
[EDIT] But MS VC++ happily compiled it - apparently, a MS-specific extension [^]: "If a backslash precedes a character that does not appear in the table, the compiler handles the undefined character as the character itself. For example, \c is treated as an c."
Funny
[/EDIT]
modified on Monday, October 26, 2009 11:34 AM
|
|
|
|
|
Nemanja Trifunovic wrote: But MS VC++ happily compiled it...
I got C4129 from VS6.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
DavidCrow wrote: I got C4129 from VS6
So we found a case where VC6 is more standard-compliant than VC10 Beta 2
|
|
|
|