|
Derive your class from CDialogBar and override OnBarStyleChange virtual function. Check a bar's new style and if it became floating call GetParent()->SetWindowText or m_pDockBar->SetWindowText (the afxpriv.h should be included to use m_pDockBar).
GetParent()->SetWindowText definetly works when the bar is floating. I didn't test if OnBarStyleChanged is the right place to put this call, it's just a suggestion.
|
|
|
|
|
Please help me get out of it. I have created voice chatting program using directplay voice in client/server mode. The problem is when I have 3 or more than 3 clients(not include mixing server), the client will hear unconfortable voice echo twice or more than twice. I have tried all the ways I can make including using the flag of DVCLIENTCONFIG_ECHOSUPPRESSION in DVCLIENTCONFIG,
it did work, but I lost mixing function at the same time. I also tried to mute local computer mic and speak playback to keep the mixing function. but it doesn't make any sense. anyone can give me some sugestion or any comment on that. I appreciate it.
|
|
|
|
|
I think the subject line says it all...
I need to be able to programmatically tell what version of DirectX is currently installed, if any. The only restriction is that I can't link with any LIB as this has to be able to run on anything from the original NT4/95 OSes all the way to the latest ones.
How do I go about this?
|
|
|
|
|
1) You could have a look in the registry. Key:
HKLM\SOFTWARE\Microsoft\DirectX\Version
2) You could get the version information of a DirectX DLL, for example DInput.dll or DSound.dll.
Hope this helps
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
That's what I was afraid of.
I've been building a few VMware virtual machines with various versions of DirectX, to compare, and while the HKLM\...\Version entry seems to exist if DX is installed, it looks like the actual value will need to go through quite a bit of massaging for an end user to decode it. For example, DirectX 8.0a comes back as "4.08.00.0400", while DirectX 8.1b comes back as "4.08.01.0901". Both of these are from 98SE. On the one XP machine I've tried so far, I'm getting "4.08.01.0810". So which 8.1 is this?
I've been looking for DirectX archives, or at least lookup tables somewhere on the net to map specific version numbers with actual human-readable version strings...any idea?
To top it off, the big black hole that is Microsoft causes all information about versions older than "current - 1" or, at the most, "current - 2", to disappear...
|
|
|
|
|
Hello,
My problem is working with DLL. A App.exe load a DLL with LoadLibrary function, and call another function from DLL. Then, the App.exe loses somes features like tooltip and shortcut key. These features appear again when the DLL end the function.
Any idea ??
Thanks,
Cris.
|
|
|
|
|
It looks like the invoked DLL's function runs its own message loop and its doesn't call TranslateMessage function inside.
You hardly can do anything to solve this problem. If my asumption is right, the only one thing you can do is to try to solve the situation with message filter hooks approach. But it is too complicated.
Another idea is to run the discussed function from another thread.
|
|
|
|
|
(using MFC)
Good day,
I have a bad case of flickering when repainting controls (CEdit).
I have a complex component that includes a couple of CEdit and some CButton, enclosed in a CWnd that paint itself when it gets the focus.
anyway, when the main CWnd gets the focus, I need to change the colors of the CEdit and CButton to indicate the focus state; this works but I get some flickering.
I'm not sure exactly how the WM_ERASEBKGND works, in MSDN, says that it will (or should) erase the background; I've been using the OnEraseBkgnd to paint the background of the control, but how is it different than using the WM_PAINT message ?
I still need to be paint some stuff in the control, so I need the WM_PAINT. can I not use the WM_ERASEBKGND and only use the WM_PAINT ?
I also tried the LockWindowUpdate and UnlockWindowUpdate but that resulted in something less than good.
Thanks.
Max.
Maximilien Lincourt
For success one must aquire one's self
|
|
|
|
|
Windows sends WM_ERASEBKGND inside the call to BeginPaint function. How the window process this message depends on window procedure. The default WindowProc uses the default brush, specified for the class of the window. Because you are speaking about button and edit control, the expected behavior is different from the default window proc.
If you want to do all the job inside WM_PAINT, handle WM_ERASEBKGND and do nothing inside. Assure that DefWindowProc won't be called for WM_ERASEBKGND.
However, I am not sure that you'll succeed to handle properly coloring of edit and button controls.
Good luck
|
|
|
|
|
One step to avoid a lot of flivcker in the OnEraseBkgrnd() is as follows:
int dont_erase_indexes[] =
{
IDC_DPAS_LAMP,
IDC_INSTRUMENT_TYPE,
IDC_LABEL1,
IDC_LABEL2,
IDC_DESTINATION,
IDC_CURRENT_STATUS,
IDC_LOG,
IDC_GRAPH,
IDC_DOWNLOAD_STATUS,
IDC_DOWNLOAD_PROGRESS,
ID_AUTO_LOAD,
IDC_UPLOAD_ASSAYS,
IDC_AUTO_UPLOAD,
IDC_BROWSE_FOR_FOLDER
};
BOOL CYourControl::OnEraseBkgnd(CDC* pDC)
{
CRect clip;
pDC->SaveDC();
for (int i = 0; i < sizeof(dont_erase_indexes) / sizeof(int); i++)
{
GetDlgItem(dont_erase_indexes[i])->GetWindowRect(&clip);
ScreenToClient(&clip);
pDC->ExcludeClipRect(&clip);
}
pDC->GetClipBox(&clip);
pDC->FillSolidRect(clip, GetSysColor(COLOR_BTNFACE));
pDC->RestoreDC(-1);
return FALSE;
}
Roger Allen
Sonork 100.10016
Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
|
|
|
|
|
Hi,
I want to execute a DOS command line from my code
The funny thing is when I use:
<br />
WinExec("CMD.EXE /C .......")<br />
I will not work from the code but when I use the same exact command manually from a dods window it works great. I even followed the debugger and copy and paster the stuff it sends to the dos but nothing, I always end up with the DOS window flashing for a second a then it's gone/
Shay
|
|
|
|
|
One solution is ShellExecute().
ShellExecute(..."open", "cmd.exe"...);
Kuphryn
|
|
|
|
|
|
Let's try with this one:
WINSHELLAPI BOOL WINAPI ShellExecuteEx(
LPSHELLEXECUTEINFO lpExecInfo
);
Just three words: void main(void)
|
|
|
|
|
create a batch file ! execute_com.bat
open it write commands line by line ! and winexec it !
cool ah
//rate me or hate me
I am the mighty keeper of the book on knowledge . Contact me to get your copy .
|
|
|
|
|
hi, I'm a newbie at openGL. Anyway, I wrote a program in openGL that can display a 3-d part that's made of triangles. But the program would work on some computers, but doesn't work on others. On the computer that it doesn't work on, the part that's displayed become some what wierd, it would not display some of the triangles. So far I can't figure out why it's doing that. And it can't be the version of the Operating system either, because I've tried it on every OS, and wether the program will work or not seems to be random.
Anyone have any idea why it's doing this? Thanks in advance.
|
|
|
|
|
|
I don't understand what you mean? I wrote the program in VS6. Thanks
|
|
|
|
|
visit the mentioned website (NeHe), test with their OpenGL code.
if your bug is gone, it's inside your code + you have a new working base code.
|
|
|
|
|
The problem is, when I load the program on a machine, there's some clipping in my scene, also I implemented a picking routine, which should highlight the triangle I picked. But when I pick the triangle, it will only highlight if I move the scene a little or resize the window, it won't highlight immediately after the mouse click. This only happens on certain computers, not all, on some computers, it works perfectly, the triangle is highlighted immediately after the mouse click. Thanks
|
|
|
|
|
AFAIK, NeHe has a picking tutorial too.
|
|
|
|
|
hello to everybody. Thank you for reading my message. I've got a problem with a ToolTip control. My task is to make ToolTip appeare after clicking(for example) on CListCtrl, or CListBox, and that ToolTip has to contain some info about the item I clicked. I have used some projects from the site, but couldn't settle all my problem (one of I've described). so, if you can please help me with that. Thank you!
|
|
|
|
|
check out my post ! on XP controls ! you might just like the listbox !
multiline with tooltips and editing posibilities !
//rate me or hate me
I am the mighty keeper of the book on knowledge . Contact me to get your copy .
|
|
|
|
|
hi, do you know, how to connect the CVideoRenderer class from \"DirectShow\\Filters\\sampvid\" sample to the IGraphBuilder interface ?
plz, thnx
J.
|
|
|
|
|
Hi, all
How do you request a user to input a string like "cin >> x;" without breaking the current line where the input is taking place, when the user hits the Enter key? So that when you output a string to the console like "cout << x;", the output will be on the same line as the inputed is. Please help
Aidman » over and out
|
|
|
|