|
Place a MessageBox before Rebooting, based on user selection, you can implement rebooting logic like :-
if(MessageBox("Do You want restart the computer","",MB_YESNO)== IDYES))
else
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/xml>
|
|
|
|
|
Thanks for your suggestion Alok,
I will apply this now.
|
|
|
|
|
my pleasure buddy!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/xml>
|
|
|
|
|
Hi all,
I am using VC-2008 for coding and i wanted to get my hard disk name and all the information related to it.....
Can anybody please tell me which api to use....
Thanks in advance
|
|
|
|
|
You can use WMI.
Here is sample link for using WMI
WMI C++ Example[^]
And here is WMI class that you may be looking for with all the hdd information
Win32_PhysicalMedia[^]
I hope it helps..
Regards,
Sandip.
|
|
|
|
|
|
Try Win32_DiskDrive Class. It returns all the details of your Hard drive.
|
|
|
|
|
Hi,
I have a child dialog over a parent dialog on which i am using three Group Boxes.
What I want to achieve is to change the Background colour of all three group boxes with different colours. I am using MFC.
kindly help me.
Thanks & Regards.
Dhiraj
|
|
|
|
|
|
Just as a query, you would be returning a different color brush from WM_CTLCOLOR in case the control is a group box. But this would only paint the area behind the caption of the group box. The OP wants to fill the background of the group box, if my understanding is correct.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
yes i want to fill the background colour that to of three different group boxes with three different colours.
Please tell me how to do it.
|
|
|
|
|
|
The articles are good but not good enough to solve my problem.
Is there any way else i can do it.
Thanks
|
|
|
|
|
Dhiraj kumar Saini wrote: The articles are good but not good enough to solve my problem.
Why? don't they fit to your need. You can extract the code for painting the group box background? or do you need some code that you can directly use...
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
The problem here is that the static labels which i am having as a part of the GroupBox is either appearing without their background color changed.
In some cases the static labels are hidden as the group box is being repainted.
Thanks
Dhiraj kumar Saini
|
|
|
|
|
Hi all,
i have a date in dd/mm/yyyy format .
i want to find weekday name with help of this.
please tell me how can i do this.
thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
COleDateTime dt("9/24/2008");
CString dayNameLong = dt.Format("%A");
CString dayNameShort = dt.Format("%a");
- S
50 cups of coffee and you know it's on!
A post a day, keeps the white coats away!
|
|
|
|
|
thanks.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
|
One of best article on DATE and TIME understanding, i must say that!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/xml>
|
|
|
|
|
i am getting a compile error while using an conversion operator which returns an list iterator. i am using visual studio 2005
code sample:
template<class t="">
class MyClass
{
public:
MyClass();
operator list<class t="">::iterator ()
{
return m_it;
}
list<class t="">::iterator m_it;
};
i am getting an error for following (when i assign the object to the iterator):
MyClass<int> myObj;
list<int>:: iterator it = myObj;
plz tell if there is any mistake in the above code.
thanks
|
|
|
|
|
the template syntax didnt appear properly in the code sample. trying to put again
|
|
|
|
|
template < class T >
class MyClass
{
public:
MyClass();
operator list <class T>::iterator ()
{
return m_it;
}
list<class T>::iterator m_it;
};
i am getting an error for following (when i assign the object to the iterator):
MyClass <int > myObj;
list <int >:: iterator it = myObj;
|
|
|
|
|
I think the operator list <class T>::iterator() should be actually define like
operator list <T>::iterator()
Also the member variable list<class T>::iterator m_it should be
list<T>::iterator m_it;
|
|
|
|
|
actually this is the first thing i had tried : it gives other compile errors.
|
|
|
|