Click here to Skip to main content
15,921,113 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How does a modal dialog work (message pump)? Pin
29-May-02 5:28
suss29-May-02 5:28 
GeneralRe: How does a modal dialog work (message pump)? Pin
Joaquín M López Muñoz29-May-02 8:29
Joaquín M López Muñoz29-May-02 8:29 
GeneralRe: How does a modal dialog work (message pump)? Pin
29-May-02 13:13
suss29-May-02 13:13 
GeneralRe: How does a modal dialog work (message pump)? Pin
29-May-02 18:20
suss29-May-02 18:20 
GeneralRe: How does a modal dialog work? Code snippets Pin
29-May-02 13:36
suss29-May-02 13:36 
GeneralRe: How does a modal dialog work? Code snippets Pin
Joaquín M López Muñoz29-May-02 23:12
Joaquín M López Muñoz29-May-02 23:12 
GeneralRe: How does a modal dialog work? Workaround Pin
30-May-02 0:50
suss30-May-02 0:50 
GeneralRe: How does a modal dialog work? Workaround Pin
Joaquín M López Muñoz30-May-02 2:36
Joaquín M López Muñoz30-May-02 2:36 
First of all, have you finally solved the message pump mess following my proposal? (just curious, you know.)

As for how to get repainting in your OpenGL window, you have various options:
  1. The most simple way is to set a Windows timer (see SetTimer), which sends a message at a given rate. This is not very accurate, but should suffice for say up to 10 fps.
  2. If you need more frames per second, probably your best bet is multimedia timers. These call a user-defined callback with much finer temporal resolution than Windows timers. This callback is executed in a thread different from your app's, so beware of concurrency problems. Probably the best way to avoid them is sending a user message to the OpenGL window from the multimedia timer callback and doing the reapaint there.
For much more info on different timers, read Nemanja Trifunovic's Timers tutorial.

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
GeneralRe: How does a modal dialog work? Workaround Pin
30-May-02 6:59
suss30-May-02 6:59 
GeneralRe: How does a modal dialog work? Workaround Pin
Joaquín M López Muñoz1-Jun-02 5:28
Joaquín M López Muñoz1-Jun-02 5:28 
AnswerRe: How does a modal dialog work (message pump)? Pin
Paul M Watt29-May-02 7:24
mentorPaul M Watt29-May-02 7:24 
GeneralFile Type Association Pin
moobob29-May-02 4:34
moobob29-May-02 4:34 
GeneralRe: File Type Association Pin
Mauricio Ritter29-May-02 6:27
Mauricio Ritter29-May-02 6:27 
GeneralRe: File Type Association Pin
moobob29-May-02 7:06
moobob29-May-02 7:06 
GeneralCombo box without dropdown button Pin
ed987129-May-02 4:03
ed987129-May-02 4:03 
GeneralRe: Combo box without dropdown button Pin
dlhson29-May-02 6:09
dlhson29-May-02 6:09 
GeneralRe: Combo box without dropdown button Pin
ed987129-May-02 7:15
ed987129-May-02 7:15 
GeneralRe: Combo box without dropdown button Pin
aldeba29-May-02 23:48
aldeba29-May-02 23:48 
GeneralConvert a HRESULT to a string Pin
Anders Molin29-May-02 3:32
professionalAnders Molin29-May-02 3:32 
GeneralRe: Convert a HRESULT to a string Pin
Philippe Mori29-May-02 3:49
Philippe Mori29-May-02 3:49 
GeneralRe: Convert a HRESULT to a string Pin
CodeGuy29-May-02 3:44
CodeGuy29-May-02 3:44 
GeneralSubclassing a static control Pin
Cathy29-May-02 3:03
Cathy29-May-02 3:03 
GeneralRe: Subclassing a static control Pin
Roger Allen29-May-02 4:58
Roger Allen29-May-02 4:58 
GeneralRe: Subclassing a static control Pin
Cathy29-May-02 11:45
Cathy29-May-02 11:45 
GeneralATL DLL-server problem Pin
Hans Ruck29-May-02 2:27
Hans Ruck29-May-02 2:27 

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.