|
Hi,
But At the same time I donot want to display my main DialogBox until user respond to my shown DialogBox.
Thankx for taking time to write-in again.
-- Sumit
Sumit Pandya
modified 1-Aug-19 21:02pm.
|
|
|
|
|
Does anyone know how to create a media player for mp3/wma that doesnt need windows media player? Napster used a mp3 dll file. do i just wrap it or do i need to write somehting else?
.NET or not .NET? MFC is the question......
|
|
|
|
|
I presume you mean a winamp type player ? There's one on CP - search for MPEG.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Hi All,
In an MFC Application I'm using Dialog-Box to accept user input. This input can be stored in registry or if user selects "Open" then it again retrieved from registry. This Dialog box contains EditBox and Radio Button controls. My problem is when user select "Ok" the user must be prompted to store settings or not. I wanted this prompt only if user has made some changes in existing retrieved profile. So this decision is only Applicable if "Open" while for "New" this prompt will always be there.
I can assure this change in Editbox but not in the RadioButton group
For Editbox I'm doing following
... ... ...
m_ctrlLdapCredentials.GetLine(0, Buffer);
bNoSavePrompt &= (m_ldapCredentials.CompareNoCase(Buffer) == 0);
... ... ...
How I'll come to know that If any of setting in radio button group controls has been changed?
Do I need to remove that group then what is alternative to that?
GetCheck() is not answer in case of group.
Thanks.
-- Sumit
Sumit Pandya
modified 1-Aug-19 21:02pm.
|
|
|
|
|
Create a variable (an UINT) for that radio group using Class Wizard.
After this you can compare its previous value (which is an integer, that contains the index of the selected radio button) with this new value.
Or if you choose the hard way, you can use
((CButton*)GetDlgItem(ID_MYRADIOBUTTON))->GetCheck () method on all of your radio buttons and look if it is changed or not.
Kind regards
Mustafa Demirhan
http://www.macroangel.com
Sonork ID 100.9935:zoltrix
|
|
|
|
|
Hi,
How can I add the mnemonics on toolbar buttons ? I have created a toolbar with only text on buttons. I would like to add the mnemonics on it. Adding '&' to the button text before setting does not work.
Thanks,
Sujata.
|
|
|
|
|
Would I be right in thinking that what you really want is a toolbar with images and captions?
If so, I have some code you can take a look at to see how it's done. Go to http://www.resorg.co.uk/whats_new.html, download the source code and take a look at the class for the main toolbar - it should be self explanatory
FYI the shortcut keys are normally handled by the menu, not the toolbar, so if you have a menu command for each toolbar button with the '&' in the right place it should work.
Andy Metcalfe - Sonardyne International Ltd
Trouble with resource IDs? Try the Resource ID Organiser Add-In for Visual C++
"I would be careful in separating your wierdness, a good quirky weirdness, from the disturbed wierdness of people who take pleasure from PVC sheep with fruit repositories."
- Paul Watson
|
|
|
|
|
Hi Guy's
I have a couple of problems with Visual C++ 6. (with Service Pack 5)
1) Is there a way of not stepping into functions such as CString during a debug session.
I'm sure I read on CP how to do this, but I cannot find that article again.
2) When running Visual C++ on a Win2K machine, sometimes when pressing F5 to build and run, VC will cause my machine to reboot. Any ideas on how to fix this?
Paresh Solanki
A Completly Random Ordering Never Yields Meaning
|
|
|
|
|
Hmm... do not use F11 and you won't step in, lol..
As for second question, I'm running VC6 on Win2k too, and have no problems with it.. So it is not Win2k, but something installed on your machine
Philip Patrick
"Two beer or not two beer?" (Shakesbeer)
Web-site: www.saintopatrick.com
|
|
|
|
|
Hmmm.., helpful, never woulda thought of that
If you have something like
<br />
CString bar = "Hello Philip";<br />
foo(bar.mid(3, 7));<br />
Pressing F10 will step over foo() , but F11 will step into CString::Mid() , before stepping into foo() .
What I would like is to be able to step over CString::Mid()() but into foo() .
Paresh Solanki
A Completly Random Ordering Never Yields Meaning
|
|
|
|
|
I'm not sure u can disable this... But who knows?
Anyways I don't see big deal by pressing F11 - Shift+F11 - F11... and u are inside your function
Philip Patrick
"Two beer or not two beer?" (Shakesbeer)
Web-site: www.saintopatrick.com
|
|
|
|
|
That's fine until you get
foo(fn1(), fn2(), fn3(), fn4()...)
causes some frantic F11-shift+F11 keystrokes.
Paresh Solanki
A Completly Random Ordering Never Yields Meaning
|
|
|
|
|
The VC debugger and UI is pretty intelligent. But if it was as intelligent as you want it to be, it'd do you out of a job!
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
|
Just what I needed Thanks!!
Paresh Solanki
A Completly Random Ordering Never Yields Meaning
|
|
|
|
|
What do you think is the better way to implement a object-oriented worker-th?
passing "this" as a LPVOID-param to a static member-function, which uses "this" to access member-data/functions dedicated to thread-operation and call the static member-function with AfxBeginThread, or subclass CWinThread
like that:
BOOL CWinThreadDerived::InitInstance()
{
while(WaitForSingleObject(m_hEventKill, 0) == WAIT_TIMEOUT)
{
WorkToBeDone();
}
return FALSE;
}
I prefer the CWinThread-derived way, because it's comfortable to implement, but a programming-professional told me THAT I shouldn't do so, but not WHY. What do you think?
|
|
|
|
|
If want to have an OO solution, you should definitely use CWinThread-derived way.
I am also using CWinThread-derived way in my applications and I have not heard any problems from my customers yet. But some multi-thread related classes in MFC have really serious bugs. For example, using CEvent class is not advised. As I have heard, it causes the application crash in some situations. I also saw this warning in a book from Microsoft Press(I could not remember the name right now).
Kind regards
Mustafa Demirhan
http://www.macroangel.com
Sonork ID 100.9935:zoltrix
|
|
|
|
|
Could you explain how you use it?
Remember: I want a Message-loop-LESS worker-thread. I poll for a shutdown-event in InitInstance() and while it's unsignaled a Work()-function is executed. Is it the way to go?
Yeah I heard about those troubles with MFC-syncs, so I use API-calls to sync my threads, Thanx for your Re, Flo!
|
|
|
|
|
AFAIK, a worker thread is always message-loopless. Otherwise it is called user interface threads.
In InitInstance() method, you can do the initializations. You should have a method called int Run() which will be called automatically when the thread is initialized. The thread should do its job in this method.
CMyThread *pThread = new CMyThread ();
pThread->CreateThread ();
This creates the thread, and starts running it. If you want it to be started later, CreateThread takes a parameter for this (CREATE_SUSPENDED or something like this. I could not remember it right now )
Have a look at the following pages
http://www.codeproject.com/threads/cthread.asp -> This really a very good example!
http://www.codeproject.com/threads/usingworkerthreads.asp
Hope this helps.
Kind regards
Mustafa Demirhan
http://www.macroangel.com
Sonork ID 100.9935:zoltrix
|
|
|
|
|
Aaaah! I see!
when I override Run and don't care THERE for the Messages, it already has no message-loop, am I right?
Is Run called once or continuosly?
thx Flo
|
|
|
|
|
|
Thank you very very much for your answers. I rely on them and forward any customers-complain to you OK?
mfg HintiFlo@gmx.at
|
|
|
|
|
OK! I will. But I am sure that there will be none! There are no problems with CWinThread. The problems occur generally because of bad design
Kind regards
Mustafa Demirhan
http://www.macroangel.com
Sonork ID 100.9935:zoltrix
|
|
|
|
|
Bah, I bet that "programmer-professional" was another Microsoft's hater lol.
Use CWinThread as long as u are using MFC... why to make life harder?
Philip Patrick
"Two beer or not two beer?" (Shakesbeer)
Web-site: www.saintopatrick.com
|
|
|
|
|
Oh no! He was an MFC-programmer with a very good reputation.
Two beer or not two beer -> 2B-r || !2B-r
mfg Flo
|
|
|
|