|
the question has already been asked on the suggestion forum... we're waiting for chris maunder's response...
TOXCCT >>> GEII power
|
|
|
|
|
And when are we expecting to get response from Chris Maunder?
|
|
|
|
|
|
I think that you misunderstood something, I've provided a URL for the toolbar that I'm talking about, and I think that it doesent deal with Chris Maunder at all.
Greetz,
D.
|
|
|
|
|
from the code of original author :
if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
!m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
know toolbar has been set to the style of flat,
in addition, m_wndToolBar.SetButtonInfo(nIndex, ID_COMBO, TBBS_SEPARATOR, 255);
know the combox control's syle is separator,in fact ,when you set that button in toolbar :below 32*32,also exist separator,only not obviously,
because the style is set such that,if you dont want that you can chage the style
|
|
|
|
|
Thanks for the reply!
Well, my point is that I don't want to change the style (I've to keep the TBSTYLE_FLAT) and still to get rid of that separator in 32x32 TB Buttons.
Is this possible or not?
Thanks!
|
|
|
|
|
Does anybody know how to enable the windowless activation in VC6 CDialogs?
The problem: My activex control uses windowless activation to draw bitmaps with transparency. Now I've placed two of these activex controls in the activex test container app so that they are overlapping. The result is as wanted: The first control is visible through the transparency of the second control. Inside a MFC app, the overlapping region is just clipping.
I've read, that VC6 isn't supporting windowless activation. Is that right and how can I fix this?
Please help me out...
|
|
|
|
|
Hi guys I've found that a child window send a WM_PARENTSNOTIFY when a Right click is received only if the control is not defined WS_EX_NOPARENTNOTIFY but by default all the controls are defined WS_EX_NOPARENTNOTIFY.
DO you have an example how to define a control not WS_EX_NOPARENTNOTIFY ?
Best Regards
Doc
|
|
|
|
|
This requires basic knowledge of binary operations, AND, OR, XOR and one's complement.
To remove the WS_EX_NOPARENTNOTIFY style, you must specify a DWORD containing all the extended styles you want for your child control, then passing the DWORD as the first parameter of CreateEx() call. For a list of extended styles, either read them from the 'winuser.h' file in the Platform SDK, or visit MSDN in this link.
Alternatively, you can create the control, then request for it's extended styles through GetWindowLong( hwnd, GWL_EXSTYLE ) (Win32) or CWnd::GetExStyle (MFC). Both will return the DWORD of the extended style bit field. You can then use any operations in the following list to change the styles:
To toggle a flag (if enabled -> disable, if disabled -> enable), use exclusive-OR as in dwExStyle ^= WS_EX_NOPARENTNOTIFY .
To always disable a style flag, use AND and one's complement as in dwExStyle &= ~WS_EX_NOPARENTNOTIFY .
To always enable a style flag, use inclusive-OR as in dwExStyle |= WS_EX_NOPARENTNOTIFY .
Probably the 'AND and one's complement' requires a bit more clarification ?
Well, first, one's complement is an operation that inverts a bit sequence. Consider a sequence called '00010000'. Using one's complement on this would result '11101111'. Basically, all 1's become 0's and vice versa. Now, the WS_EX_NOPARENTNOTIFY is precisely a sequence like this: lots of zeros, and a single 1 somewhere. Using one's complement on it will result an inverse bit sequence (lots of 1's and a single zero somewhere).
If you AND this with the original style flag, the original bit field (style flag) will dictate the result for every other flag EXCEPT for the WS_EX_NOPARENTNOTIFY. As the second operand (one's complement of WS_EX_NOPARENTNOTIFY) of the AND operation has a 0 there, the result will always be 0 for that flag, no matter what the original bit field's value was. All other flags in the field are left as they were. If they were 0, they remain 0, if they were 1, they remain 1. This happens because the second operand has all other bits as 1's.
Hope this will help.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
Thanks guy
Then I can change the style on run time?
To get I use GetExStyle and to set?
Best Regards
Doc
|
|
|
|
|
It seems that MFC lacks the appropriate function. Here is a function you can use to quickly change the style flag. It assumes that you implement it as a part of a class derived from CWnd (any control or window)
void CMyWndClass::SetExStyle(DWORD dwExStyle)
{
::SetWindowLong( this->m_hWnd, GWL_EXSTYLE, (long)dwExStyle );<DIV>
this->SetWindowPos(NULL, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE );
} Remember to implement this function as a member in your CWnd-derived class. Otherwise you need to modify the parameters so that the function receives a HWND parameter or a CWnd class pointer. Also, the 'this' pointer must be modified in such a case.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
Why is every time waveInPrepareHeader is invoked a handle got created?
Will this generate memory leak?
How can I close the created handle?
I have a audio recording program that records multiple sound cards in the system and is expected to stay up very long period of time. But my memory and handle usages keep on going up which may eventually crash my application.
|
|
|
|
|
To check out the real reason which handles are being created/used etc., use the following utility from microsoft:
http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/oh-o.asp
HTH
Bikram
|
|
|
|
|
Follow up question:
If I reuse the same buffer, do I need to call waveInPrepareHeader every time before I call waveInAddBuffer?
If I can skip calling waveInPrepareHeader before I reuse the same buffer, I think the handle and memory usage can stay constant.
|
|
|
|
|
You call waveInPrepareHeader once for each buffer, then call waveInAddBuffer initially and then every time you received a buffer back and need to submit it again.
When done, you call waveInUnprepareHeader for each buffer then waveInClose when all done. (Note that you have to get the buffer back to call waveInUnprepareHeader . It's been a long time since I've worked on wave code, but i believe you call waveInReset() to force the buffers to be returned to you.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Thanks Joe and Bikram.
Yes, the key is re-submit the same buffer. I didn't know how to submit received buffer again.
Now with output from oh as suggested by Bikram and the hint from Jeo, I think I found a solution:
As Joe mentioned, I invoke waveInPrepareHeader only when a buffer first created.
Then, every time when I received a buffer back from OS, I set dwFlags to WHDR_PREPARED before calling waveInAddBuffer. It looks it is working. My memory and handle usages are stay constant while it is running and I am getting audio input.
|
|
|
|
|
Hi guys
I've got a dialog and a control on it.
When I leftclick on the control an OnCommand is generated on the dialog.All is right to me.
But when I do a rightclick on the control the OnCommand is not generated.
It is possible to do something easily to have the same behavior than when I do a leftclick?
Best Regards
Doc
|
|
|
|
|
you overload the WM_RBTDOWN (or something like that), and you call the function you wrote for the left click into that new one.
TOXCCT >>> GEII power
|
|
|
|
|
Thanks for the answer but the problem is that my dialog is not receiving WM_RBTDOWN or WM_COMMAND.
The WW_RBTDOWN is received by the control not by the dialog and I need that an ON_COMMAND in the dialog be generated.
Doc
|
|
|
|
|
i'm not sure i understand. if the condtrol can catch it, so, there is no pb ?!
you add a function in your dialog class, you get sure that the WM_RBTDOWM is correcty inserted into AFX code lines, and that's ok for you... no ?
TOXCCT >>> GEII power
|
|
|
|
|
When you right click in a control on a Dialog, the dialog is not receiving the OnRButtonDown, is the control that is receiving it, and I need that the dialog receive the Rbuttondown.
Doc
|
|
|
|
|
Lose the OnCommand() handler. You did not mention what the control is, so I tried it with both a list control and an edit control. For the list control, I handled the NM_CLICK and the NM_RCLICK messages. Both of these produced a ON_NOTIFY() handler in the dialog's message map. For the edit control, I added ON_WM_LBUTTONDOWN() and ON_WM_RBUTTONDOWN() to the message map of the edit control's class.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Sorry David it's a Picture Control with a class derived from CStatic.
Best Regards
Doc
|
|
|
|
|
No matter. Derive a class from CStatic . Provide handlers for both the WM_LBUTTONDOWN and WM_RBUTTONDOWN messages. Make sure the control has the SS_NOTIFY style.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Sorry David
Maybe it's my fault and I haven't explained correctly.
I've got a dialog with a picture control.
I've already got a Class derived from CStatic with WM_RBUTTONDOWN and WM_LBUTTONDOWN messages.Here all is clear.
But what I need is when I Right click on the Picture control, to generate an OnCommand message in my dialog.
When I left click on the picture control an Oncommand is generated in my dialog, but when I right click no.
Any suggestion?
Best Regards
Doc
|
|
|
|