|
Aby Skaria wrote: Is there any way to inform my program when the network goes down.
Yes. Check out ISensNetwork .
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
Hai brother I used isNetworkAlive() but it is always returns TRUE even the network cable is unpluged. Is there any other api calls or functions
|
|
|
|
|
Aby Skaria wrote: but it is always returns TRUE even the network cable is unpluged. Is there any other api calls or functions
HE Means Disinterface ISensNetwork
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Aby Skaria wrote: I used isNetworkAlive() but it is always returns TRUE even the network cable is unpluged.
Maybe it knows something you don't! I've never tested that function in a real-world scenario so I can't even guess as to why it does what it does.
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
Hi,
I have some classes/general functions used by different program in some extern files (continually modified).
I don't want to add that cpp/h file to the project directly.
It is possible to add they using the linker or compiler options? How/where?
Other solutions?
Thanks
Have a nice code day
|
|
|
|
|
|
Yes,
it is my temporary solution:
I'm including with the macro #include all the .cpp in a file into the project.
But this file is going to be too big: about 10000 lines, and the compiler every time take more and more time.
I'm open to a new solution (faster!)
Do you know if I can use the project properties?
Have a nice code day
|
|
|
|
|
|
|
well, you understood it, it's bad practice.
here is what i suggest instead:
use any versionning system (CVS, SVN, whatever...) and insert the files of the other project into yours, source controling them. this way, you can easily update them (commonly, with the context menu on the windows explorer) without going keeping then where they're written, and so, your project is always up to date...
better, isn't it ?
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]
|
|
|
|
|
Thanks
Have a nice code day
|
|
|
|
|
You make those shared classes into a third project, that compiles to a .lib and link both projects to that lib, then you won't need to recompile them until the classes themselves change (and VS will handle the recompiling itself using project dependencies)
--
Help me! I'm turning into a grapefruit!
Buzzwords!
|
|
|
|
|
OK,
That is a NEW idea,
thank you.
Have a nice code day
|
|
|
|
|
Another option is to let the cpp and h files in your 'shared' folder. Then, add the cpp file in your project (you don't need to copy it in your source directory), and add in the project properties the path to the 'include' directory (where the .h files are).
Why don't you want to add these file in your project directly by the way ?
|
|
|
|
|
I'll try your way first!
Cedric Moonen wrote: Why don't you want to add these file in your project directly by the way ?
Because I want to use that files as addictional library, that are the same for different project. So I have to be very carefull everytime that I modify that code.
I know that this is only a pseudo solution for stupid errors, but for now it works.
Thank you.
Have a nice code day
|
|
|
|
|
Adding files in your project doesn't require them to be copied in your project folder . You can simply add them in your project and let them where they are.
|
|
|
|
|
Hi,
I posted a message on the above subject on Sunday (Feb 5), received a couple of replies, and posted my own reply yesterday, but haven't received an answer yet. I'm guessing this is because no one saw my reply, becuse it's now burried on the 20th page or something like that...
Anyway, my message is in this link: http://www.codeproject.com/script/comments/forums.asp?msg=1360442&forumid=1647#xx1360442xx.
If anyone could please help me, I would appreciate it..
Thanks
|
|
|
|
|
Plenty of examples here, and here.
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
Is there an easy way to get flat button style for standard buttons (OK, cancel...) in a CPropertySheet (in C++ V6)?
Thank you in advance,
Pierre Couderc
Pierre Couderc
www.tol.fr
|
|
|
|
|
Try here[^]. A excellent comprehensive button suite.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Thank you very much : you are right that Davide Calbabro CButtonST class is excellent and I use it from years, but I do not see the relation with my problem.
My question is how to get an access to OK, cancel button in a CPropertySheet to be able to work on them and pass them in flat mode?
Pierre Couderc
www.tol.fr
|
|
|
|
|
Oops. I missed the word "standard" in your post sorry!
As for those buttons, the only way I can think of is to subclass the buttons with one of the CButtonST buttons. I'm not sure exactly how the class works (I've never used it myself), but I'm fairly sure it would do the job.
Try something like this:
CButtonST button;
button.SubclassDlgItem(IDOK, this); in your property sheet - in the WM_CREATE message handler or something similar. You might have to use EnumChildWindows() to search for the button with the "OK" text if it doesn't have the ID IDOK . Similarly for the cancel button.
Hope this helps,
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Thank you for your ideas.
I have tried to override OnInitDialog() but it does not work :
BOOL CMyPropertySheet::OnInitDialog()<br />
{<br />
BOOL Stat= CPropertySheet::OnInitDialog();<br />
CButton* pButton = (CButton*) this->GetDlgItem(IDCANCEL);<br />
if(pButton) { pButton->SetButtonStyle(pButton->GetButtonStyle() | BS_FLAT); pButton->Invalidate(); }<br />
pButton = (CButton*) this->GetDlgItem(IDOK);<br />
if(pButton) { pButton->SetButtonStyle(pButton->GetButtonStyle() | BS_FLAT); pButton->Invalidate(); }<br />
pButton = (CButton*) this->GetDlgItem(IDCLOSE);<br />
if(pButton) { pButton->SetButtonStyle(pButton->GetButtonStyle() | BS_FLAT); pButton->Invalidate(); }<br />
pButton = (CButton*) this->GetDlgItem(ID_APPLY_NOW);<br />
if(pButton) { pButton->SetButtonStyle(pButton->GetButtonStyle() | BS_FLAT); pButton->Invalidate(); }<br />
return Stat;<br />
}<br />
Pierre Couderc
www.tol.fr
|
|
|
|
|
The buttons may not have those IDs. You might have to use EnumWindows() or FindWindow to search for the window with the right text.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Thank you Ryan,
- the buttons DO HAVE these IDs : it is harcoded in CPropertySheet.
- The good solution is
<br />
CButton* pButton = (CButton*) this->GetDlgItem(IDCANCEL);<br />
if(pButton) { pButton->ModifyStyle(0,BS_FLAT);}<br />
- see thread microsoft.public.vc.mfc "Desperately trying to get flat buttons in a CPropertySheet"
dated 07/02/2006 16:32
Thank you again
pierre
Pierre Couderc
www.tol.fr
|
|
|
|