Click here to Skip to main content
15,907,905 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: HELP VC++ my program is stuck. Pin
Wes Aday5-Jul-05 7:51
professionalWes Aday5-Jul-05 7:51 
GeneralRe: HELP VC++ my program is stuck. Pin
Anonymous5-Jul-05 8:44
Anonymous5-Jul-05 8:44 
QuestionHow to execute a file in memory being of type CMemFile Pin
Anonymous5-Jul-05 7:15
Anonymous5-Jul-05 7:15 
AnswerRe: How to execute a file in memory being of type CMemFile Pin
David Spain5-Jul-05 17:56
David Spain5-Jul-05 17:56 
GeneralRe: How to execute a file in memory being of type CMemFile Pin
Jose Lamas Rios5-Jul-05 18:25
Jose Lamas Rios5-Jul-05 18:25 
GeneralRe: How to execute a file in memory being of type CMemFile Pin
David Spain5-Jul-05 19:10
David Spain5-Jul-05 19:10 
GeneralProxy authentication Pin
Geert van Horrik5-Jul-05 6:04
Geert van Horrik5-Jul-05 6:04 
GeneralRebar controls Pin
__makaveli__5-Jul-05 5:36
__makaveli__5-Jul-05 5:36 
I am trying to get a rebar added to an existing MDI window, I am using the following code:

<br />
INITCOMMONCONTROLSEX icex;<br />
<br />
icex.dwSize = sizeof(INITCOMMONCONTROLSEX);<br />
icex.dwICC   = ICC_COOL_CLASSES|ICC_BAR_CLASSES;<br />
InitCommonControlsEx(&icex);<br />
<br />
HINSTANCE hInst = (HINSTANCE)GetWindowLong(hParentHandle, GWL_HINSTANCE);<br />
hToolbar = CreateWindowEx(WS_EX_TOOLWINDOW,REBARCLASSNAME,NULL,WS_VISIBLE | WS_BORDER | WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | RBS_VARHEIGHT | RBS_BANDBORDERS | CCS_NODIVIDER | CCS_NOPARENTALIGN,0,0,0,0,hParentHandle,NULL,hInst,NULL);<br />
if( !hToolbar ) {<br />
	MessageBox(0, "Could not create toolbar control", "Error", MB_OK | MB_ICONHAND);<br />
	return;<br />
}<br />
<br />
SetWindowLong(hWndBar, GWL_STYLE, WS_VISIBLE | WS_CHILD | TBSTYLE_TOOLTIPS | CCS_NOPARENTALIGN | CCS_NORESIZE);<br />
SetWindowPos(hWndBar, 0, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED);<br />
<br />
RECT rect;<br />
GetWindowRect (hWndBar, &rect);<br />
<br />
REBARINFO rbi;<br />
rbi.cbSize = sizeof(REBARINFO);<br />
rbi.fMask = NULL;<br />
SendMessage(hToolbar, RB_SETBARINFO, 0, (LPARAM)&rbi);<br />
<br />
REBARBANDINFO rbb;<br />
rbb.cbSize = sizeof(REBARBANDINFO);<br />
rbb.fMask = RBBIM_SIZE | RBBIM_CHILD | RBBIM_CHILDSIZE | RBBIM_ID | RBBIM_STYLE | RBBIM_TEXT | 0;<br />
rbb.hwndChild = hWndBar;<br />
rbb.cxMinChild = rect.right - rect.left + 2;<br />
rbb.cyMinChild = rect.bottom - rect.top + 2;<br />
rbb.cx = 250;<br />
rbb.fStyle = RBBS_BREAK | RBBS_GRIPPERALWAYS;<br />
rbb.wID = 100085;<br />
rbb.lpText = TEXT("Toolbar");<br />
<br />
// Add the band that has the combo box.<br />
SendMessage(hToolbar, RB_SETPARENT, (WPARAM) (HWND) data->hParentHandle, (LPARAM)0);<br />
SendMessage(hToolbar, RB_INSERTBAND, (WPARAM)-1, (LPARAM)&rbb);<br />
SendMessage(hToolbar, RB_SHOWBAND, (WPARAM)(UINT)0, (LPARAM)(BOOL)TRUE);<br />
SetWindowPos(hToolbar, 0, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED);<br />


Now using that code, the bar appears to flash on the screen but doesn't stay there, what am I missing?
Questionhow to protect dll from replacement. Pin
Abdul Munaf Chhatra5-Jul-05 3:26
Abdul Munaf Chhatra5-Jul-05 3:26 
AnswerRe: how to protect dll from replacement. Pin
David Crow5-Jul-05 3:43
David Crow5-Jul-05 3:43 
AnswerRe: how to protect dll from replacement. Pin
«_Superman_»5-Jul-05 4:01
professional«_Superman_»5-Jul-05 4:01 
QuestionMS Word View-&gt;Print-Layout code? Pin
Maverick5-Jul-05 3:10
Maverick5-Jul-05 3:10 
AnswerRe: MS Word View-&gt;Print-Layout code? Pin
Chris Meech5-Jul-05 6:33
Chris Meech5-Jul-05 6:33 
GeneralRe: MS Word View-&gt;Print-Layout code? Pin
Maverick5-Jul-05 16:05
Maverick5-Jul-05 16:05 
GeneralRe: MS Word View-&gt;Print-Layout code? Pin
Jose Lamas Rios5-Jul-05 17:45
Jose Lamas Rios5-Jul-05 17:45 
GeneralCDialogBar and CMDIFrameWnd Pin
__makaveli__5-Jul-05 2:16
__makaveli__5-Jul-05 2:16 
GeneralQuestion about class CSplitterWnd Pin
PRJ15rf5-Jul-05 2:03
sussPRJ15rf5-Jul-05 2:03 
GeneralRe: Question about class CSplitterWnd Pin
PJ Arends5-Jul-05 11:00
professionalPJ Arends5-Jul-05 11:00 
GeneralToolbar Pin
Anonymous5-Jul-05 1:25
Anonymous5-Jul-05 1:25 
GeneralRe: Toolbar Pin
«_Superman_»5-Jul-05 1:57
professional«_Superman_»5-Jul-05 1:57 
GeneralRe: Toolbar Pin
Anonymous5-Jul-05 17:50
Anonymous5-Jul-05 17:50 
GeneralHelp ! Reading a file from the web Pin
nirishere5-Jul-05 0:03
nirishere5-Jul-05 0:03 
GeneralRe: Help ! Reading a file from the web Pin
2249175-Jul-05 0:20
2249175-Jul-05 0:20 
GeneralAbout OMA Device Management client Pin
Maer7274-Jul-05 23:44
Maer7274-Jul-05 23:44 
GeneralAccessing resources in a Thread Pin
Juergen Kordes4-Jul-05 23:22
Juergen Kordes4-Jul-05 23:22 

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.