Click here to Skip to main content
15,927,914 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionNotify should i return 0 ? Pin
28-Jun-01 9:53
suss28-Jun-01 9:53 
GeneralFunction passed in argument Pin
28-Jun-01 9:30
suss28-Jun-01 9:30 
GeneralRe: Function passed in argument Pin
Igor Sukhov28-Jun-01 11:06
Igor Sukhov28-Jun-01 11:06 
GeneralRe: Function passed in argument Pin
28-Jun-01 11:14
suss28-Jun-01 11:14 
GeneralExport classes with a template method Pin
28-Jun-01 9:29
suss28-Jun-01 9:29 
GeneralTone generation Pin
Roy28-Jun-01 8:35
Roy28-Jun-01 8:35 
GeneralRe: Tone generation Pin
Jim A. Johnson28-Jun-01 8:45
Jim A. Johnson28-Jun-01 8:45 
GeneralRe: Tone generation Pin
Anders Molin28-Jun-01 9:14
professionalAnders Molin28-Jun-01 9:14 
I know this is not a nice solution, but it works...

Start another thread that calls Beep(), when you need to stop the tone, just kill the thread, and eventually start it again with another frequency...

something like:
DWORD WINAPI WorkThread(LPVOID lpParameter)
{
  Beep(500, 1000000);
  return 0;
}

int main(int argc, char* argv[])
{
  DWORD dwThreadId, dwThrdParam; 
  HANDLE hThread; 
  dwThrdParam = 1;
  hThread = CreateThread(NULL, 0, WorkThread, &dwThrdParam, 0, &dwThreadId);
  Sleep(1000);
  CloseHandle(hThread);
  return 0;
}


- Anders

Money talks, but all mine ever says is "Goodbye!"
GeneralMSDATLST.OCX Pin
28-Jun-01 8:05
suss28-Jun-01 8:05 
GeneralCFile open behaviour Pin
28-Jun-01 7:32
suss28-Jun-01 7:32 
GeneralRe: CFile open behaviour Pin
Roy28-Jun-01 8:43
Roy28-Jun-01 8:43 
GeneralRe: CFile open behaviour Pin
Erik Funkenbusch28-Jun-01 11:11
Erik Funkenbusch28-Jun-01 11:11 
GeneralCompiler hangs with Winoldap Pin
DRHuff28-Jun-01 7:21
DRHuff28-Jun-01 7:21 
GeneralRe: Compiler hangs with Winoldap Pin
Michael P Butler29-Jun-01 3:16
Michael P Butler29-Jun-01 3:16 
GeneralRe: Compiler hangs with Winoldap Pin
DRHuff29-Jun-01 4:50
DRHuff29-Jun-01 4:50 
QuestionHow to get LOGFONT from COleControl? Pin
Jason Liao28-Jun-01 7:20
Jason Liao28-Jun-01 7:20 
GeneralCView/CDoc Pin
mr200328-Jun-01 6:36
mr200328-Jun-01 6:36 
Generaldialog focus Pin
28-Jun-01 6:21
suss28-Jun-01 6:21 
GeneralRe: dialog focus Pin
Carlos Antollini28-Jun-01 6:42
Carlos Antollini28-Jun-01 6:42 
GeneralRe: dialog focus Pin
28-Jun-01 6:53
suss28-Jun-01 6:53 
QuestionSharing dynamically allocated data across DLL instances? Pin
Jim A. Johnson28-Jun-01 5:38
Jim A. Johnson28-Jun-01 5:38 
AnswerRe: Sharing dynamically allocated data across DLL instances? Pin
Stephen Kellett29-Jun-01 5:25
Stephen Kellett29-Jun-01 5:25 
GeneralRe: Sharing dynamically allocated data across DLL instances? Pin
Jamie Nordmeyer6-Aug-01 18:14
Jamie Nordmeyer6-Aug-01 18:14 
AnswerRe: Sharing dynamically allocated data across DLL instances? Pin
Matt Gullett6-Aug-01 18:48
Matt Gullett6-Aug-01 18:48 
AnswerRe: Sharing dynamically allocated data across DLL instances? Pin
6-Aug-01 19:05
suss6-Aug-01 19:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.