|
hi,
Thanks for your solution Daniel but i don't understand what it means by fn. Can you please give me an example code so that i can get the whole picture.
Thank you
leonwoo
|
|
|
|
|
Any more Suggestion??
Please........
leonwoo
|
|
|
|
|
I was wondoring, how do i implant Music in a dialog??
I try to do it with "PlaySound"
It worked, but i could control the Dialog right, when the Wav file played,
it was like it locked up. Is the a way to avoid this??
Thank you.
|
|
|
|
|
Hi,
if you want to have access to the window/dialog while playing a sound you have to play the sound asynchron. That causes the function to return just after the sound has started. If you want to lock the window while playing use the synchron-playing feature.
Hope it helps - Mario
--------------------
www.klangwerker.de
rocknix@lycos.de
--------------------
|
|
|
|
|
Ok, how do i implant that, i didnt find any info on MSDN.
??
Thank you.
|
|
|
|
|
Ok, the implementation is easy :
#include <mmsystem.h> // dont forget to link winmm.lib
// play from file synchron
sndPlaySound( "file.wav", SND_SYNCH);
// play from file asynchron
sndPlaySound( "file.wav", SND_ASYNCH);
// to play from memory or whatever use
sndPlaySound( "file", SND_MEMORY|SND_ASYNCH);
-> there are some other flags - look @ msdn
Greatings Mario ///
--------------------
www.klangwerker.de
rocknix@lycos.de
--------------------
|
|
|
|
|
I implanted the code:
sndPlaySound( "file.wav", SND_SYNCH);
in my butten.
and #include <mmsystem.h>
and linked winmm.lib
but i get this error.
error C2065: 'SND_ASYNCH' : undeclared identifier
Thank you.
|
|
|
|
|
Sorry,
the right flag is called SND_ASYNC and not SND_ASYNCH.
You can read about all in MSDN.
Greatings Mario ///
----------------------
www.klangwerker.de
rocknix@lycos.de
mario@klangwerker.de
----------------------
|
|
|
|
|
... and the same for synchron playing:
SND_SYNC and not SND_SYNCH
---------------
P.S.: If you got problems with unknown flags take a look at the header-file. All flags are declared there.
Greatings Mario ///
--------------------
www.klangwerker.de
rocknix@lycos.de
--------------------
|
|
|
|
|
Hello,
I'd like to write a Program that
can be executed in pure DOS.
Is there a way to write DOS-Programs with Visual C++6?
thanks in advance,
FoxHunter
|
|
|
|
|
File -> New
Projects tab
choose 'Win32 Console Application'
Regards,
Daniel
|
|
|
|
|
Yes, but this will actually create a program that requires Win32 -> You want be able to run this program only in DOS;P
|
|
|
|
|
Yes...only DOS!
I'd like to program a little Password-protection that starts before the Desktop ist being loaded.
I'd like to start the program from the
autoexec.bat
I have written that program in quickbasic, but i'd like to program it in c++
|
|
|
|
|
Oh dear,
someone takes a simple bootdisk, removes the entry from your autoexec.bat and runs windows as usual -
and what about your password than ??? Why don`t you use the bios-password protection ??
Greatings Mario ///
--------------------
www.klangwerker.de
rocknix@lycos.de
--------------------
|
|
|
|
|
Yes, you're right...but i want to program more dos programs than just that crappy password protection.
I could do that in qbasic, but i don't like the programming environment of qbasic.
So how can i do that now?
thanks
|
|
|
|
|
I dont really know if you can write real dos-code with vc. I have never tried.
Maybe use an older DOS-Compiler from Borland or something else.
Sorry - Mario ///
--------------------
www.klangwerker.de
rocknix@lycos.de
--------------------
|
|
|
|
|
You need VC 1.52 I think.
This is the last version that you can compile and make dos app.
Good luck,
Dror
|
|
|
|
|
Hi,
I think you could try (and I know its not VC++) downloading Turbo C++ from the Borland museum - a bit naff but it still works for DOS stuff.
cheers,
Andrew.
|
|
|
|
|
Hello,
I have a question regarding the way that the ComboBox control looks in MFC. - When I put the ComboBox on my dialog, and add some items in it, when I press the controlling button(the one that shows the list) it shows just a single item with two scrollbar buttons -> how to fix that so I can view my items in a normal list - like this
ComboBox
-----item----|
-----item----|
-----item----|
-----item----|
-----item----|
Thanks - Deian
|
|
|
|
|
in the dialog editor, click on the combo drop-arrow button. then resize the rectangle that appears. this controls the size of the drop down list.
-c
|
|
|
|
|
Hello,
I have a question regarding the way that the ComboBox control looks in MFC. - When I put the ComboBox on my dialog, and add some items in it, when I press the controlling button(the one that shows the list) it shows just a single item with two scrollbar buttons -> how to fix that so I can view my items in a normal list - like this
ComboBox
-----item----|
-----item----|
-----item----|
-----item----|
-----item----|
Thanks - Deian
|
|
|
|
|
I've the sollution for you: Beginning Visual C++ 6 by Ivor Horton
Considdered to be the worlds fastest knoppenbonker.
10 Months of working experience with the worlds fastest copie paster(about 2000 lines a minute). Greatings to my Guru "The bokkelul"
And experience with the one and only NewEra Guru.
|
|
|
|
|
Or open the dialog for resource editting, click on the dropdown button and change the size.
If you want to change the list height of the combobox during runtime. Create a new class and let it inherrit from CCombobox, add the message handler:
ON_CONTROL_REFLECT(CBN_DROPDOWN, OnDropdown)
and edit the OndropDown function like this:
void CMyComboBox::OnDropdown()
{
// This limits the maximum number of visible entries to 7
int nLines = min( max(GetCount(), 1), 7 );
CRect lprect;
GetWindowRect( &lprect );
lprect.bottom = lprect.top + nLines * GetItemHeight( -1 ) + lprect.Height();
SetWindowPos(NULL, 0, 0, lprect.Width(), lprect.Height(), SWP_NOMOVE | SWP_NOZORDER );
}
Good luck
Le Ridder Noir
Considdered to be the worlds fastest knoppenbonker.
10 Months of working experience with the worlds fastest copie paster(about 2000 lines a minute).
And experience with the one and only NewEra Guru.
|
|
|
|
|
Or open the dialog for resource editting, click on the dropdown button and change the size.
If you want to change the list height of the combobox during runtime. Create a new class and let it inherrit from CCombobox, add the message handler:
ON_CONTROL_REFLECT(CBN_DROPDOWN, OnDropdown)
and edit the OndropDown function like this:
void CMyComboBox::OnDropdown()
{
// This limits the maximum number of visible entries to 7
int nLines = min( max(GetCount(), 1), 7 );
CRect lprect;
GetWindowRect( &lprect );
lprect.bottom = lprect.top + nLines * GetItemHeight( -1 ) + lprect.Height();
SetWindowPos(NULL, 0, 0, lprect.Width(), lprect.Height(), SWP_NOMOVE | SWP_NOZORDER );
}
Good luck
Le Ridder Noir
Considdered to be the worlds fastest knoppenbonker.
10 Months of working experience with the worlds fastest copie paster(about 2000 lines a minute).
And experience with the one and only NewEra Guru.
|
|
|
|
|
I have a problem with a popup menu - namely I want to set up a menu so it has some default commands that get added, and acted on within OnContextMenu, but I want to add them to an existing menu and send off my messages if any of the existing commands are selected. I can make one or the other happen, but not both. I have the command returned and am switching it's value. Basically I want to know what to put in the default case, where one of the id's I am looking for is not the value returned....
Thanks as always
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|