Click here to Skip to main content
15,917,642 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: unicode case insensative compares Pin
Henry miller6-Aug-04 4:29
Henry miller6-Aug-04 4:29 
GeneralAre named pipes Secure Pin
Malcolm Smart6-Aug-04 3:36
Malcolm Smart6-Aug-04 3:36 
GeneralRe: Are named pipes Secure Pin
valikac6-Aug-04 6:09
valikac6-Aug-04 6:09 
GeneralList controll Pin
Larsson6-Aug-04 2:57
Larsson6-Aug-04 2:57 
GeneralRe: List controll Pin
Ravi Bhavnani6-Aug-04 3:12
professionalRavi Bhavnani6-Aug-04 3:12 
Generalwindow doesn't get redrawn Pin
Kamis6-Aug-04 2:56
Kamis6-Aug-04 2:56 
GeneralRe: window doesn't get redrawn Pin
Ravi Bhavnani6-Aug-04 3:14
professionalRavi Bhavnani6-Aug-04 3:14 
GeneralRe: window doesn't get redrawn Pin
Kamis6-Aug-04 7:04
Kamis6-Aug-04 7:04 
It still doesn't work. Here's a scheme:

// Main.cpp

void CMainDialog::On_Visualize() // Create a modal dialog
{
...
OpenGL_Dialog my_gl;
my_gl.DoModal();
...
}

// OpenGL_Dialog.cpp

BOOL OpenGL_Dialog::OnInitDialog() // Setting timer when creating dialog
{
CDialog::OnInitDialog();
...
draw_counter=0;
SetTimer(1,10,NULL);
}

void OpenGL_Dialog::OnDestroy() // Kill timer when destroying
{
...
KillTimer(1);
CDialog OnDestroy();
}

void OpenGL_Dialog::OnPaint()
{
draw_counter++; // check
CPaintDC dc(this);
DrawGLScene2D;
SwapBuffers(m_hgldc);
}

void OpenGL_Dialog::OnTimer(UINT nIDEvent)
{
switch(nIDEvent)
{
case 1:
RedrawWindow();
break;
...
}
CDialog::OnTimer(nIDEvent);
}

void OpenGL_Dialog::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
switch (nChar)
{
case 32:
char buf[10];
itoa(draw_counter,buf,10);
AfxMessageBox(buf);
break;
...
}

CDialog::OnKeyDown(nChar, nRepCnt, nFlags);
}

Something like this. I wouldn't actually have placed drawing handling on timer but I need to respond to user input and other stuff. So striking space during the dialog's lifecycle I get the number of redrawings and this number is growing all the time. But in most cases the screen stays blank and nothing is drawn.

GeneralRe: window doesn't get redrawn Pin
Ravi Bhavnani6-Aug-04 7:37
professionalRavi Bhavnani6-Aug-04 7:37 
GeneralInserting ActiveX from VB Pin
dudic6-Aug-04 2:44
dudic6-Aug-04 2:44 
GeneralRe: Drag n Drop a file Pin
David Crow6-Aug-04 2:34
David Crow6-Aug-04 2:34 
Generaltristate menu item Pin
gokings6-Aug-04 2:30
gokings6-Aug-04 2:30 
GeneralIs there any method to draw point and ellipse using real value( i.e. floats) Pin
JHAKAS6-Aug-04 0:49
JHAKAS6-Aug-04 0:49 
GeneralNo Keyboard Dialog Controls Pin
Joel Holdsworth6-Aug-04 0:46
Joel Holdsworth6-Aug-04 0:46 
GeneralRe: No Keyboard Dialog Controls Pin
David Crow6-Aug-04 2:13
David Crow6-Aug-04 2:13 
GeneralRe: No Keyboard Dialog Controls Pin
Joel Holdsworth6-Aug-04 3:30
Joel Holdsworth6-Aug-04 3:30 
GeneralUpdating file attached to ofstream. Pin
CreepingFeature6-Aug-04 0:44
CreepingFeature6-Aug-04 0:44 
QuestionHow to view a file with default viewers? Pin
ryuki6-Aug-04 0:41
ryuki6-Aug-04 0:41 
AnswerRe: How to view a file with default viewers? Pin
Michael P Butler6-Aug-04 0:53
Michael P Butler6-Aug-04 0:53 
GeneralRe: How to view a file with default viewers? Pin
ryuki6-Aug-04 2:02
ryuki6-Aug-04 2:02 
Questionhow to run multiple instances of a service Pin
Michael Olsen6-Aug-04 0:32
Michael Olsen6-Aug-04 0:32 
AnswerRe: how to run multiple instances of a service Pin
Michael P Butler6-Aug-04 0:50
Michael P Butler6-Aug-04 0:50 
GeneralRe: how to run multiple instances of a service Pin
Michael Olsen8-Aug-04 21:09
Michael Olsen8-Aug-04 21:09 
GeneralRe: how to run multiple instances of a service Pin
Michael P Butler8-Aug-04 21:19
Michael P Butler8-Aug-04 21:19 
GeneralSOS! About the API CreatePolygonRgn() Pin
xulibing6-Aug-04 0:24
xulibing6-Aug-04 0:24 

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.