Click here to Skip to main content
16,016,067 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Are function calls that costly? Need help optimizing Pin
liquid_12-Jun-05 7:35
liquid_12-Jun-05 7:35 
GeneralRe: Are function calls that costly? Need help optimizing Pin
Budric B.12-Jun-05 7:52
Budric B.12-Jun-05 7:52 
GeneralRe: Are function calls that costly? Need help optimizing Pin
squidev12-Jun-05 7:44
squidev12-Jun-05 7:44 
GeneralRe: Are function calls that costly? Need help optimizing Pin
Tom Archer12-Jun-05 13:50
Tom Archer12-Jun-05 13:50 
GeneralRe: Are function calls that costly? Need help optimizing Pin
PJ Arends12-Jun-05 17:35
professionalPJ Arends12-Jun-05 17:35 
GeneralRe: Are function calls that costly? Need help optimizing Pin
Budric B.13-Jun-05 4:09
Budric B.13-Jun-05 4:09 
GeneralCapturing Sound Pin
Identity Undisclosed12-Jun-05 6:18
Identity Undisclosed12-Jun-05 6:18 
QuestionHow to remove the close button correctly in a rebar control? Pin
Dani10000112-Jun-05 5:08
Dani10000112-Jun-05 5:08 
Hi,this has been bugging me along time now and I haven´t been able to solve it yet.

I want to be able to remove a close button from an application so i can move another band to the space that was previously taken up by the close button.

I have done this successfully with a commandbar using this code:



HWND hwndCB;  // Handle to the commandbar window<br />
TBBUTTON tbbutton;<br />
<br />
for(int i=0;i<10;i++){<br />
	    SendMessage(hwndCB, TB_GETBUTTON, (WPARAM)i, (LPARAM)&tbbutton);<br />
	    if(tbbutton.idCommand==WM_CLOSE)<br />
			break;<br />
}<br />
<br />
SendMessage(hwndCB,TB_DELETEBUTTON, (WPARAM)i, (LPARAM)0 ); 


But unfortunately this didn´t work with the rebar control, it only removed the close button, and did not freed any space that the close button took up.

You add a close button to a rebar control using addadornments:

CommandBands_AddAdornments (hwndCB, hInst, 0, NULL);

But how in the heck do you do if you wan´t to remove it then?

There are no RemoveAdornments function and no info on this issue....

If i had the code I would have to recreate the rebar and not add any addornments to get rid of the close button.

But as i said before I don´t have the code.....

Does anyone have any idea how to solve this?

Please help, I´m going crazy...

Thanks for helping me out, Dani
QuestionWin32: IsDialog(HWND)? Pin
peterchen11-Jun-05 23:33
peterchen11-Jun-05 23:33 
AnswerRe: Win32: IsDialog(HWND)? Pin
Jack Puppy12-Jun-05 0:16
Jack Puppy12-Jun-05 0:16 
GeneralRe: Win32: IsDialog(HWND)? Pin
Jörgen Sigvardsson12-Jun-05 2:57
Jörgen Sigvardsson12-Jun-05 2:57 
GeneralRe: Win32: IsDialog(HWND)? Pin
peterchen12-Jun-05 3:49
peterchen12-Jun-05 3:49 
GeneralRe: Win32: IsDialog(HWND)? Pin
Jörgen Sigvardsson12-Jun-05 5:21
Jörgen Sigvardsson12-Jun-05 5:21 
GeneralRe: Win32: IsDialog(HWND)? Pin
Jack Puppy12-Jun-05 4:22
Jack Puppy12-Jun-05 4:22 
GeneralRe: Win32: IsDialog(HWND)? Pin
Jörgen Sigvardsson12-Jun-05 5:23
Jörgen Sigvardsson12-Jun-05 5:23 
GeneralRe: Win32: IsDialog(HWND)? Pin
Jack Puppy12-Jun-05 14:45
Jack Puppy12-Jun-05 14:45 
Generalfunction pointer on classfunctions Pin
tbrake11-Jun-05 22:45
tbrake11-Jun-05 22:45 
GeneralRe: function pointer on classfunctions Pin
toxcct11-Jun-05 22:57
toxcct11-Jun-05 22:57 
GeneralRe: function pointer on classfunctions Pin
tbrake11-Jun-05 23:18
tbrake11-Jun-05 23:18 
GeneralRe: function pointer on classfunctions Pin
toxcct11-Jun-05 23:24
toxcct11-Jun-05 23:24 
GeneralRe: function pointer on classfunctions Pin
Behzad Ebrahimi12-Jun-05 4:09
Behzad Ebrahimi12-Jun-05 4:09 
GeneralI am stuck please help me Pin
Aqueel11-Jun-05 20:57
Aqueel11-Jun-05 20:57 
GeneralRe: I am stuck please help me Pin
toxcct11-Jun-05 23:00
toxcct11-Jun-05 23:00 
GeneralRe: I am stuck please help me Pin
eli1502197911-Jun-05 23:35
eli1502197911-Jun-05 23:35 
GeneralRe: I am stuck please help me Pin
toxcct12-Jun-05 0:11
toxcct12-Jun-05 0:11 

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.