Click here to Skip to main content
15,908,842 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Problem about draw text Pin
kcynic7-Sep-07 1:28
kcynic7-Sep-07 1:28 
QuestionParent & owner Pin
nbugalia6-Sep-07 21:14
nbugalia6-Sep-07 21:14 
AnswerRe: Parent & owner Pin
Jason Teagle6-Sep-07 22:18
Jason Teagle6-Sep-07 22:18 
QuestionToolbar in Windows Taskbar Pin
Nishad S6-Sep-07 21:12
Nishad S6-Sep-07 21:12 
AnswerRe: Toolbar in Windows Taskbar Pin
Karismatic6-Sep-07 23:03
Karismatic6-Sep-07 23:03 
AnswerRe: Toolbar in Windows Taskbar Pin
Naveen6-Sep-07 23:10
Naveen6-Sep-07 23:10 
GeneralRe: Toolbar in Windows Taskbar Pin
Nishad S7-Sep-07 0:53
Nishad S7-Sep-07 0:53 
QuestionNew to win32 controls, using the toolbar+buttons Pin
ioctl516-Sep-07 21:05
ioctl516-Sep-07 21:05 
Hello, im pretty new to using win32 common controls, im wondering how to use the toolbar messages correctyl. Im writing an application that can remove icon's from the system-tray toolbar for annoying applications that dosn't allow you to remove their tray icon.

Here is my code, the button is hidden when i send a TB_HIDEBUTTON, but the toolbar is not resized properly at all, it shows cleary that a button is missing. So i need a way to automatically resize it to the correct size for the new number of buttons. I have tried TB_AUTOSIZE but it dosn't seem to have any effect.

Also, a second problem is the TB_GETBUTTONTEXT message, it returns a strLen of the button string correctly, but the "text" var is always just unilitialized garbage, i dont see why. Anyone knows why?

void main()<br />
{<br />
	HWND hwnd = FindWindowEx(0,0,"Shell_TrayWnd",0);<br />
	hwnd = FindWindowEx(hwnd , 0 ,"TrayNotifyWnd",0);<br />
	hwnd = FindWindowEx(hwnd , 0 ,"SysPager",0);<br />
	hwnd = FindWindowEx(hwnd , 0 ,0,"Notification Area");<br />
<br />
	int index = 0;<br />
	int count = (int)::SendMessage(hwnd, TB_BUTTONCOUNT, 0, 0);<br />
	for(int i=0; i<count; i++)<br />
	{		<br />
		char text[1024];<br />
		int strLen = ::SendMessage(hwnd, TB_GETBUTTONTEXT, i, (LPARAM)text);	<br />
	}<br />
<br />
	BOOL b = ::SendMessage(hwnd, TB_HIDEBUTTON, 0, 1);	<br />
	b = ::SendMessage(hwnd, TB_AUTOSIZE, 0, 0);	<br />
}


Thanks in advance
AnswerRe: New to win32 controls, using the toolbar+buttons Pin
Naveen6-Sep-07 22:54
Naveen6-Sep-07 22:54 
QuestionDisabling the Hot Key [modified] Pin
shakumar_226-Sep-07 20:57
shakumar_226-Sep-07 20:57 
AnswerRe: Disabling the Hot Key Pin
Randor 6-Sep-07 23:22
professional Randor 6-Sep-07 23:22 
Questionchange Start Butoon Text Pin
GauranG Shah6-Sep-07 20:56
GauranG Shah6-Sep-07 20:56 
AnswerRe: change Start Butoon Text Pin
nbugalia6-Sep-07 21:12
nbugalia6-Sep-07 21:12 
AnswerRe: change Start Butoon Text Pin
Nishad S6-Sep-07 21:19
Nishad S6-Sep-07 21:19 
GeneralRe: change Start Butoon Text Pin
GauranG Shah6-Sep-07 23:12
GauranG Shah6-Sep-07 23:12 
GeneralRe: change Start Butoon Text Pin
Nishad S7-Sep-07 1:13
Nishad S7-Sep-07 1:13 
GeneralRe: change Start Butoon Text Pin
GauranG Shah7-Sep-07 1:26
GauranG Shah7-Sep-07 1:26 
GeneralRe: change Start Butoon Text Pin
Nishad S7-Sep-07 1:33
Nishad S7-Sep-07 1:33 
AnswerRe: change Start Butoon Text Pin
Hamid_RT6-Sep-07 23:53
Hamid_RT6-Sep-07 23:53 
GeneralRe: change Start Butoon Text Pin
GauranG Shah7-Sep-07 1:21
GauranG Shah7-Sep-07 1:21 
Questionquestion about MAPI C++ and ms office outlook Pin
monsieur_jj6-Sep-07 20:02
monsieur_jj6-Sep-07 20:02 
AnswerRe: question about MAPI C++ and ms office outlook Pin
monsieur_jj6-Sep-07 22:51
monsieur_jj6-Sep-07 22:51 
Questionwhat is the message when Service abruptly stopped Pin
Yashusid6-Sep-07 18:23
Yashusid6-Sep-07 18:23 
Questionbitmaps &amp; regions [modified] Pin
zqueezy6-Sep-07 14:39
zqueezy6-Sep-07 14:39 
AnswerRe: bitmaps & regions Pin
Mark Salsbery6-Sep-07 16:34
Mark Salsbery6-Sep-07 16:34 

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.