Click here to Skip to main content
15,885,032 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRetreive ip address of all pcs connected to LAN Pin
Abinash Mohanty1-Nov-09 18:07
Abinash Mohanty1-Nov-09 18:07 
AnswerRe: Retreive ip address of all pcs connected to LAN Pin
Adam Roderick J1-Nov-09 19:16
Adam Roderick J1-Nov-09 19:16 
QuestionExcel open Pin
MsmVc1-Nov-09 17:49
MsmVc1-Nov-09 17:49 
QuestionTransparentBlt Pin
_T("No name")1-Nov-09 17:45
_T("No name")1-Nov-09 17:45 
AnswerRe: TransparentBlt Pin
Naveen1-Nov-09 18:20
Naveen1-Nov-09 18:20 
GeneralRe: TransparentBlt Pin
_T("No name")1-Nov-09 18:30
_T("No name")1-Nov-09 18:30 
GeneralRe: TransparentBlt Pin
Ramon F. Mendes2-Nov-09 7:23
Ramon F. Mendes2-Nov-09 7:23 
QuestionIs there any mistake for right click menu for List Ctrl. Pin
Le@rner1-Nov-09 17:15
Le@rner1-Nov-09 17:15 
HI all

	DWORD pos = GetMessagePos();
	CPoint point;
	GetCursorPos(&point);

	int 	 nIndex		= m_List.GetNextItem(-1, LVNI_SELECTED);
	CString  strItem	= m_List.GetItemText(nIndex, 0);
	select_no		= m_List.GetSelectionMark();

	HMENU hMenu = ::CreatePopupMenu();
	if (NULL != hMenu)
	{
		// add a few test items
		::AppendMenu(hMenu, MF_STRING,   1, "Update");
		::AppendMenu(hMenu, MF_SEPARATOR,2,	"");
		::AppendMenu(hMenu, MF_STRING,   3, "Delete");
		
				

if(strItem.Trim().IsEmpty())
{
		::EnableMenuItem(hMenu,1,MF_BYCOMMAND|MF_DISABLED|MF_GRAYED);
		::EnableMenuItem(hMenu,3,MF_BYCOMMAND|MF_DISABLED|MF_GRAYED);
}
		

		int sel = ::TrackPopupMenuEx(hMenu,TPM_LEFTALIGN|TPM_RETURNCMD,point.x,point.y,m_hWnd,NULL);

		switch(sel)
		{
		case 1:
			{
				//for Update
			}
			break;

		case 3:
			{
				//for delete
			}
			break;
		
		}

	}


thanks

To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.

AnswerRe: Is there any mistake for right click menu for List Ctrl. Pin
Naveen1-Nov-09 17:30
Naveen1-Nov-09 17:30 
QuestionHow can I implement a schedule reboot prompts using WUAPI? Or some other way? Pin
hanq_389101301-Nov-09 17:06
hanq_389101301-Nov-09 17:06 
AnswerRe: How can I implement a schedule reboot prompts using WUAPI? Or some other way? Pin
Naveen1-Nov-09 17:44
Naveen1-Nov-09 17:44 
GeneralRe: How can I implement a schedule reboot prompts using WUAPI? Or some other way? Pin
hanq_389101301-Nov-09 18:01
hanq_389101301-Nov-09 18:01 
Questionwhy CCriticalSection::Lock doesn't allow to set the timeout Pin
Ramon F. Mendes1-Nov-09 14:52
Ramon F. Mendes1-Nov-09 14:52 
AnswerRe: why CCriticalSection::Lock doesn't allow to set the timeout Pin
«_Superman_»1-Nov-09 16:02
professional«_Superman_»1-Nov-09 16:02 
AnswerRe: why CCriticalSection::Lock doesn't allow to set the timeout Pin
Naveen1-Nov-09 17:48
Naveen1-Nov-09 17:48 
AnswerRe: why CCriticalSection::Lock doesn't allow to set the timeout Pin
cmk1-Nov-09 18:31
cmk1-Nov-09 18:31 
QuestionFailure opening/reading a large file Pin
jocasa1-Nov-09 12:36
jocasa1-Nov-09 12:36 
AnswerRe: Failure opening/reading a large file Pin
CPallini1-Nov-09 20:54
mveCPallini1-Nov-09 20:54 
QuestionRe: Failure opening/reading a large file [modified] Pin
Adam Roderick J1-Nov-09 20:54
Adam Roderick J1-Nov-09 20:54 
AnswerRe: Failure opening/reading a large file Pin
jocasa1-Nov-09 22:23
jocasa1-Nov-09 22:23 
AnswerRe: Failure opening/reading a large file [solved] Pin
jocasa2-Nov-09 2:37
jocasa2-Nov-09 2:37 
QuestionWhy wifstream can not read in numbers? [modified] Pin
transoft1-Nov-09 10:31
transoft1-Nov-09 10:31 
QuestionRe: Why wifstream can not read in numbers? Pin
«_Superman_»1-Nov-09 12:18
professional«_Superman_»1-Nov-09 12:18 
AnswerRe: Why wifstream can not read in numbers? Pin
transoft2-Nov-09 1:35
transoft2-Nov-09 1:35 
GeneralRe: Why wifstream can not read in numbers? Pin
«_Superman_»2-Nov-09 4:06
professional«_Superman_»2-Nov-09 4:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.