|
Here's the mail: what are you talking about and why are you talking about it here?
Steve
|
|
|
|
|
Hi, I'm trying to alter control properties at runtime.
I've got two images in a Picture Control (BMP) and I only want one visible at a time as they will overlap. I'm already animating them but I only want to see one Animation Frame at a time.
So, how can I set properties of controls at runtime? (I've already got control variables attached.)
Pointing out articles to me would also suffice.
thanks for your time,
|
|
|
|
|
Like2Byte wrote: how can I set properties of controls at runtime?
Which properties?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
This should be fun to watch
led mike
|
|
|
|
|
Not as fun as the conversation going on over at the dotnet-related board
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Same old noise, different day. At this point I don't believe it will improve, it might get worse I suppose.
Have you seen Graus's new article[^]? This is what we have come to! It gave me an idea for new Article, ok, an idea for an article title, "If you're an idiot go away". If they don't know how to determine that, they can ask in the forum for the article.
led mike
|
|
|
|
|
led mike wrote: Have you seen Graus's new article[^]? This is what we have come to!
Yes! I've linked to it before
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hello to all,
i am working to develop a media player in MFC. I am useing the FMODCE library to play the audio files. The problem is that the FSOUND_Stream_Open( "File name") function takes very large time to open the .MP# file format. So bcoze of this i seems that the application is going to halt.
Can any body help/guide me to overcome this difficulty. Or can tell me any other function/library to play .mp3, .wav,midi format file more accurately / and fastly. I shall be very thankful to all of u.
thanx in Advance.
|
|
|
|
|
shinewine wrote: The problem is that the FSOUND_Stream_Open( "File name") function takes very large time to open the .MP# file format.
Wouldn't the fmod forums be a more appropriate place to ask about this?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
i am guessing u are using the FSOUND_MPEGACCURATE mode?
if so just read the file into memory first then use FSOUND_LOADMEMORY mode instead.
might help maybe
|
|
|
|
|
Hi,
I have a SDI application that I wrote in .NET 2005 C++ and in unmanaged code, I have used the ST_SplitterWnd to split the windows, but now what I need to do is, I need to create tabs so that all the views are contained in one, so that I can make another instance of tabs when the next tab is clicked.
Now I have no clue how to do this. Is there anyone else out there that knows how to do this?
Thanks in advance
|
|
|
|
|
You want to use tabs instead of splitters?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi Mark,
I still want the splitters, but I want say 3 splitters in 1 tab and 2 splitters in another.
|
|
|
|
|
You can use a tab window as the client of the main frame.
Then use frame windows as tab windows and use the splitters in those frame
windows as usual.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Do you by any chance have like a mock example?
Thanks for the help
|
|
|
|
|
For some reason I was thinking MFC, sorry. You can ignore the frame window comments.
I don't have a complete example, Which part is giving you trouble?
You just need to build your window hierarchy the way you want it.
For example:
Create the main window
Create a tab window as a child of the main window. See Tab Controls[^]
Add code to so the tab window gets resized to fit the client area of the main window.
Add tab windows to the tab control
Add code that resizes/repositions the tab windows appropriately within the tabs.
Add splitters to the tab windows.
etc.
etc.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
Hi, Ive made a tab group using a property sheet with property pages. The problem is that when I display the tabgroup/propertysheet, I use the DoModal() command which makes it open in a new dialog box.
I was wondering if it is possible to embed my propertysheet into the main view so that I can have other stuff around it? I dont want it opening in separate dialog box with only the tab group.
Any help will be appreciated.
|
|
|
|
|
You'll need to use a modeless property sheet.
Then you can use the property sheet as a client/child window.
Use Create() instead of DoModal().
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thanks Mark. I have never used a modeless property sheet but I'll figure it out. I'l post back if i still cant pull it off. Thanks again.
|
|
|
|
|
Hi all,
I faced with an intresting event about GetActiveWindow() method. When I call the code blok below by clicking to a button, I can see the messagebox as "asdasd". But when I call the code blok in a worker thread I cannot see the messagebox.
CWnd *wnd;
wnd = GetActiveWindow();
if(pDlgb == wnd)
MessageBox(_T("asdasd"));
What is the reason for that? Is there any body who can give me an advice about getting the active window in a worker thread?
Thanks,
ibrahim
|
|
|
|
|
Because MFC keeps internal table(s) of (CWnd) windows on a per-thread-basis.
Therefore , the CWnd returned by GetActiveWindow() on a different thread can't possibly
be the same pointer as your pDlgb. It will be a temporary CWnd object also attached to your dialog's
HWND (assuming that window is actually the active window).
Compare the HWNDs instead
if(pDlgb->GetSafeHwnd() == wnd->GetSafeHwnd())
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
It's a little more complicated than that, although it’s true that MFC's handle maps are thread specific. Here’s how MFC implements CWnd::GetActiveWindow :
_AFXWIN_INLINE CWnd* PASCAL CWnd::GetActiveWindow()
{ return CWnd::FromHandle(::GetActiveWindow()); }
Now the following is from MSDN on the ::GetActiveWindow[^] function:
The GetActiveWindow function retrieves the window handle to the active window attached to the calling thread's message queue.
So ::GetActiveWindow is also thread specific, although you could use the AttachThreadInput[^] to get around this.
Steve
|
|
|
|
|
I'm using VS2008 for a MFC application and I'm having some problems
setting text and background color for a Group-box control.
In previous versions of Visual Studio the following code was working:
HBRUSH CMyPrjView::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH l_hBrush = CWnd::OnCtlColor(pDC, pWnd, nCtlColor);
int l_iCtrlId;
l_iCtrlId = pWnd->GetDlgCtrlID();
switch(l_iCtrlId)
{
case IDC_STC_GRPBOX_1:
case IDC_STC_GRPBOX_2:
pDC->SetTextColor(RED_COLOR);
pDC->SetBkColor(BLACK_COLOR);
break;
default:
break;
}
return m_cbrshBlack;
}
Now, in VS2008 it doesn't work. I can change all other controls
colors but not for group-box controls. What is changed ?
Is there some properties of the group-box control to be set ?
Or have I to do other things in OnCtlColor ?
Thanks a lot !
|
|
|
|
|
ilgale wrote: Now, in VS2008 it doesn't work.
Are the SetTextColor() and SetBkColor() methods getting called?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|