Click here to Skip to main content
16,012,352 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Time trial? Pin
Christian Graus31-Mar-02 12:35
protectorChristian Graus31-Mar-02 12:35 
AnswerRe: Time trial? Pin
Nish Nishant31-Mar-02 14:13
sitebuilderNish Nishant31-Mar-02 14:13 
GeneralRe: Time trial? Pin
Christian Graus31-Mar-02 14:45
protectorChristian Graus31-Mar-02 14:45 
GeneralRe: Time trial? Pin
Nish Nishant31-Mar-02 15:07
sitebuilderNish Nishant31-Mar-02 15:07 
GeneralRe: Time trial? Pin
Christian Graus31-Mar-02 15:19
protectorChristian Graus31-Mar-02 15:19 
GeneralRe: Time trial? Pin
Edilson Vasconcelos de Melo Junior1-Apr-02 2:52
Edilson Vasconcelos de Melo Junior1-Apr-02 2:52 
GeneralRe: Time trial? Pin
Nish Nishant1-Apr-02 16:11
sitebuilderNish Nishant1-Apr-02 16:11 
GeneralEdit box balloon tips in WinXP Pin
sultan_of_6string31-Mar-02 8:08
sultan_of_6string31-Mar-02 8:08 

This is pissing me off big time. I have an edit box in a dialog and want to show a balloon tip as soon as the dialog is open:


BOOL Welcome_OnInitDialog(HWND hDlg, HWND hWndFocus, LPARAM lParam)
{
	// Display the music folder (as saved in the registry)
	SetDlgItemText(hDlg, IDC_MUSIC_FOLDER, g_musicFolder);
	
	WCHAR szTitle[] = L"Music Folder";
	WCHAR szText[] = L"Enter the path to your music folder here, or click browse..";
	EDITBALLOONTIP ebt;
	ebt.cbStruct = sizeof(ebt);
	ebt.pszTitle = szTitle;
	ebt.pszText = szText;
	ebt.ttiIcon = TTI_INFO;
	Edit_ShowBalloonTip(GetDlgItem(hDlg, IDC_MUSIC_FOLDER), &ebt);

	return TRUE;
}

It is not working. Yet, when the user clicks the OK button. My WM_COMMAND hander has no problem displaying balloon tip:


void Welcome_OnCommand(HWND hDlg, int nId, HWND hWndCtrl, UINT uCodeNotify)
{
	HWND hMusicFolder = GetDlgItem(hDlg, IDC_MUSIC_FOLDER);

	if (nId == IDOK)
	{
		g_musicFolder.GetFromHWnd(hMusicFolder);
		DWORD dwFileAttributes = GetFileAttributes(g_musicFolder);
		if (dwFileAttributes == 0xffffffff || dwFileAttributes &
			FILE_ATTRIBUTE_DIRECTORY != FILE_ATTRIBUTE_DIRECTORY)
		{
			// Select the text in the text box.
			SendMessage(hMusicFolder, EM_SETSEL, 0, -1);
			// Display a balloon tip.
			WCHAR szTitle[] = L"Invalid folder name";
			WCHAR szText[] = L"Please confirm that this is the path to your music folder.";
			EDITBALLOONTIP ebt;
			ebt.cbStruct = sizeof(ebt);
			ebt.pszTitle = szTitle;
			ebt.pszText = szText;
			ebt.ttiIcon = TTI_WARNING;
			Edit_ShowBalloonTip(hMusicFolder, &ebt);
			
			return;
		}
.
.
.
}

What's going on? Any fixes?


Thanks


GeneralRe: Edit box balloon tips in WinXP Pin
Ravi Bhavnani31-Mar-02 9:11
professionalRavi Bhavnani31-Mar-02 9:11 
GeneralTest Pin
31-Mar-02 3:18
suss31-Mar-02 3:18 
GeneralRe: Test Pin
Jon Newman31-Mar-02 3:52
Jon Newman31-Mar-02 3:52 
GeneralRe: Test Pin
Nish Nishant31-Mar-02 5:13
sitebuilderNish Nishant31-Mar-02 5:13 
GeneralRe: Test Pin
Michael P Butler31-Mar-02 23:12
Michael P Butler31-Mar-02 23:12 
QuestionHow to get the cut point of the line and the rect Pin
Feng Qin31-Mar-02 3:03
Feng Qin31-Mar-02 3:03 
AnswerRe: How to get the cut point of the line and the rect Pin
Nish Nishant31-Mar-02 5:11
sitebuilderNish Nishant31-Mar-02 5:11 
GeneralRe: How to get the cut point of the line and the rect Pin
Feng Qin31-Mar-02 14:50
Feng Qin31-Mar-02 14:50 
GeneralRe: How to get the cut point of the line and the rect Pin
Nish Nishant31-Mar-02 16:10
sitebuilderNish Nishant31-Mar-02 16:10 
AnswerRe: How to get the cut point of the line and the rect Pin
PJ Arends31-Mar-02 15:08
professionalPJ Arends31-Mar-02 15:08 
GeneralRe: How to get the cut point of the line and the rect Pin
Feng Qin31-Mar-02 16:02
Feng Qin31-Mar-02 16:02 
GeneralRe: How to get the cut point of the line and the rect Pin
Christian Graus31-Mar-02 16:17
protectorChristian Graus31-Mar-02 16:17 
GeneralRe: How to get the cut point of the line and the rect Pin
Feng Qin31-Mar-02 17:13
Feng Qin31-Mar-02 17:13 
GeneralRe: How to get the cut point of the line and the rect Pin
Christian Graus31-Mar-02 18:48
protectorChristian Graus31-Mar-02 18:48 
GeneralRe: How to get the cut point of the line and the rect Pin
Feng Qin31-Mar-02 20:33
Feng Qin31-Mar-02 20:33 
AnswerRe: How to get the cut point of the line and the rect Pin
Michael A. Barnhart31-Mar-02 15:42
Michael A. Barnhart31-Mar-02 15:42 
GeneralRe: How to get the cut point of the line and the rect Pin
PJ Arends1-Apr-02 5:37
professionalPJ Arends1-Apr-02 5:37 

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.