|
|
Hi again,
Simple question: will the function ExitWindowsEx() restart Windows Server 2003, Windows 2000 Server without user actions.
i.e.
<code>
ExitWindowsEx(EWX_REBOOT,NULL);
</code>
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
It depend on how applications running on it respond to WM_QUERYENDSESSION and WM_ENDSESSION messages.
You can forcible restart by combining EWX_FORCE or EWX_FORCEIFHUNG as first parameter.
|
|
|
|
|
Thanx again Prasad.
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
i've created a software tht is used for video conferencing in side a lan network by using the corresponding ip address. it has been created in visual c++.and converted to .exe file.
now i have to implement the same videochat concept in an internet explorer window.. wat can i do for that... some saying that i can use a active x controls if so say me the procedure pls... i'm new to vc++.
jegadesh balan
isakuratechnologies
chennai
mobile:9940304533
|
|
|
|
|
This[^] section with this[^] article should help.
Elaine
|
|
|
|
|
Hi,
I am working on clipboard in VC++ 2003. I want to copy a GDI Bitmap Class image to clipboard. Does anyone know how can I do this?
Thanks in advance,
Priyank
|
|
|
|
|
priyank_ldce wrote: I am working on clipboard in VC++ 2003. I want to copy a GDI Bitmap Class image to clipboard. Does anyone know how can I do this?
Take a look at CF_BITMAP in MSDN for more information.
Owner drawn
Jesus Loves
|
|
|
|
|
|
Hi all,
I would like to know if someone could give me some advise about monitoring a computers memory i.e. if the computer runs out of resources I want to restart the computer, (but only if the memory resource are insuffient).
Would it be a good idea to use the function QueryMemoryResourceNotification() , or is there another function I not aware of.
Thanx in advance
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Nevermind got what I was looking for: GlobalMemoryStatus() ....
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
A activex control was created that gets called through a php page with ms word 2003 embeded in a dialog box, in the activex control.
a tool bar is also created in the derivation of MyDialog::OnInitDialog() with some buttons in the dialog box like this:
if (!m_ToolBar.Create(this, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_TOOLTIPS | CBRS_FLYBY) || !m_ToolBar.LoadToolBar(IDR_MAINFRAME))
{
TRACE0("Failed to create toolbar\n");
return -1; // fail to create
}
// Move the toolbar so it is VISIBLE on the screen.
CRect rc;
GetClientRect(&rc);
rc.bottom = rc.top + 34;
rc.bottom = rc.left + 30;
m_ToolBar.MoveWindow(&rc);
m_ToolBar.ShowWindow(SW_SHOW);
RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0);
EnableToolTips(true); //enable tool tips
//////////////////in its message map i'm calling OnToolTipNotify////////
BEGIN_MESSAGE_MAP(CDlgDocument, CDialog)
ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTW, 0, 0xFFFF, OnToolTipNotify)
ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTA, 0, 0xFFFF, OnToolTipNotify)
END_MESSAGE_MAP()
///////declaration of OnToolTipNotify in the 'void MyDialog:public CDialog'///
afx_msg BOOL OnToolTipNotify(UINT id, NMHDR *pNMHDR,LRESULT *pResult);
///////////and definitition of OnToolTipNotify is://////
BOOL CDlgDocument::OnToolTipNotify(UINT id, NMHDR *pNMHDR,LRESULT *pResult)
{
// need to handle both ANSI and UNICODE versions of the message
TOOLTIPTEXTA* pTTTA = (TOOLTIPTEXTA*)pNMHDR;
TOOLTIPTEXTW* pTTTW = (TOOLTIPTEXTW*)pNMHDR;
TCHAR szFullText[256];
CString strTipText;
UINT nID = pNMHDR->idFrom;
if (pNMHDR->code == TTN_NEEDTEXTA && (pTTTA->uFlags & TTF_IDISHWND) ||
pNMHDR->code == TTN_NEEDTEXTW && (pTTTW->uFlags & TTF_IDISHWND))
{
// idFrom is actually the HWND of the tool
nID = ::GetDlgCtrlID((HWND)nID);
}
if (nID != 0) // will be zero on a separator
{
// don't handle the message if no string resource found
if (AfxLoadString(nID, szFullText) == 0)
return FALSE;
// this is the command id, not the button index
AfxExtractSubString(strTipText, szFullText, 1, '\n');
}
#ifndef _UNICODE
if (pNMHDR->code == TTN_NEEDTEXTA)
lstrcpyn(pTTTA->szText, strTipText, _countof(pTTTA->szText));
else
_mbstowcsz(pTTTW->szText, strTipText, _countof(pTTTW->szText));
#else
if (pNMHDR->code == TTN_NEEDTEXTA)
_wcstombsz(pTTTA->szText, strTipText, _countof(pTTTA->szText));
else
lstrcpyn(pTTTW->szText, strTipText, _countof(pTTTW->szText));
#endif
*pResult = 0;
return TRUE; // message was handled
}
i've tried most of the ideas on the net but couldn't view the tool tip.
kindly help me out how tool tips can be displayed for the tool bar
buttons?
note: the activex control is executing in the internet explorer 6.0.
praveen k. sethiya
|
|
|
|
|
minkowski wrote: how I can get the default text highlighted in the text box
CEdit has SetSel() method. Use this method to select the text. To select the entire content in use SetSel as,
SetSel(0, -1)
Do your Duty and Don't expect the Result
|
|
|
|
|
Ok thank you. I will try that.
|
|
|
|
|
|
Sir,
this is off topic, but could you please add the closing tag in your signature, so that you don't break the site's styles... (see here[^])
thanks.
|
|
|
|
|
Hi Toxcct,
I'm using the Signature and Display Name for quite some time..
But i found that i didn't close the tag in display name and not in my signature.. and if you still feel any thing bad, no problem please notify me..
and finally one request no Sir business.. you can call me Parthi ,
Hope you don't mind by calling u Toxcct ..;)
Do your Duty and Don't expect the Result
|
|
|
|
|
Parthi_Appu wrote: and if you still feel any thing bad, no problem please notify me..
it looks to be alright now...
see you Parthi
|
|
|
|
|
Hi,
I wish to the set focus in an edit box by calling another function. Currently I am using SetFocus() but I find that the default text is not highlighted, instead the cursor is at the beginning of the text box. I was wondering how I can get the default text highlighted in the text box when I use my function.
Thank you for any suggestions .
|
|
|
|
|
m_EditBox.SetSel(0, -1);
m_EditBox.SetFocus();
|
|
|
|
|
Hello all,
I am facing a very peculiar problem.I am not able to add new functions/event handlers into a particular class of my project.when i try to add an event handler it gives error saying that "the code element CResult is read only and add remove operation is impossible" while i am still able to add event handlers in to the other classes of the project. can anybody please tell me what the problem could be???
|
|
|
|
|
Did you check if the file was not read-only ?
|
|
|
|
|
Is this problem same as refered here[^]?
|
|
|
|
|
It seems your file is read only.
|
|
|
|
|
Hi,
I want to browse the list of port name to find the port com number of my serial gadget.
I found examples in DDK, but i want simple code to be integrated in my Visual C++ application.
Regards.
|
|
|
|