|
Look in winuser.h, about 3/4 of the way down.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Thread and process exit codes have no inherent meaning, the code is just a DWORD that can be used for any purpose. As the other poster said, not every app will exit with 0; and if you see a nonzero exit code it doesn't imply an error happened.
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
You cannot truly appreciate Dilbert unless you've read it in the original Klingon.
|
|
|
|
|
OK. Thanks for the info guys. I'll just stop wondering what a nonzero return means, unless I have another reason to suspect a problem.
Thanks Again,
Justin
|
|
|
|
|
Is there a way we can give Windows XP look and feel to applications running under other operating systems beside Windows XP?
|
|
|
|
|
I belive if you have a manifest file and the version of Windows has the newer common controls file you can give it the XP look.
- Aaron
|
|
|
|
|
Only by drawing all the controls and windows yourself.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
I suppose you mean Windows OS's. Take a look at WindowBlinds[^], maybe it fits what you need.
If you want XP look and feel for programs you have the source code, you already are on the right place.
...Plug & Pray...
|
|
|
|
|
You have to write Custom Manifest file for that!
here is link to achieve same
http://www.codeproject.com/cpp/AddXpStyle.asp[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Hello,
I've used code similar to the one written by the author of http://www.codeproject.com/docking/toolbarcombo.asp, I place a combobox at a toolbar, everything works great untill I set the style of the toolbar to flat, and then, when the buttons are set to be 32x32 I see the separator under my combobox. Any suggestions or ideas on how to get rid of that separator?
Thanks in Advance,
D.
|
|
|
|
|
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.
|
|
|
|