Click here to Skip to main content
15,893,668 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: SetDIBits and GetDIBits in MFC? Pin
yoaz28-Aug-09 9:54
yoaz28-Aug-09 9:54 
QuestionDetermine Boot Disk Pin
Abinash Mohanty27-Aug-09 23:50
Abinash Mohanty27-Aug-09 23:50 
AnswerRe: Determine Boot Disk Pin
Mohan Ramachandra28-Aug-09 1:18
Mohan Ramachandra28-Aug-09 1:18 
AnswerRe: Determine Boot Disk Pin
kilt3-Sep-09 4:45
kilt3-Sep-09 4:45 
Question_controlfp() - function Pin
durban227-Aug-09 22:57
durban227-Aug-09 22:57 
QuestionRe: _controlfp() - function Pin
CPallini27-Aug-09 23:06
mveCPallini27-Aug-09 23:06 
AnswerRe: _controlfp() - function Pin
durban227-Aug-09 23:39
durban227-Aug-09 23:39 
GeneralRe: _controlfp() - function Pin
CPallini27-Aug-09 23:54
mveCPallini27-Aug-09 23:54 
The following code works fine on my system
#include "Excpt.h"
#include <Windows.h>
#include "cmath"
#include <float.h>

void main()
{
  _controlfp(0, MCW_EM);
  float fResult; // Bennet, pg.136
  //int x,y;
  float x,y;
  // x = 5;
  // y = 0;

  x = 5.0;
  y = 0.0;
  _try // __try
  {
    fResult = x/y;
  }
  //__except (GetExceptionCode() == EXCEPTION_FLT_DIVIDE_BY_ZERO)
  _except (GetExceptionCode() == EXCEPTION_FLT_DIVIDE_BY_ZERO)
  {
    MessageBox(NULL, L"DIVIDE BY ZERO", L"", MB_OK);
  }
}

Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke

[My articles]

QuestionHow to retrieve the all drives in a computer and their size using VC++ Code Pin
Shiv Murti Pal27-Aug-09 22:54
Shiv Murti Pal27-Aug-09 22:54 
AnswerRe: How to retrieve the all drives in a computer and their size using VC++ Code Pin
ThatsAlok28-Aug-09 0:37
ThatsAlok28-Aug-09 0:37 
AnswerRe: How to retrieve the all drives in a computer and their size using VC++ Code Pin
David Crow28-Aug-09 3:25
David Crow28-Aug-09 3:25 
AnswerRe: How to retrieve the all drives in a computer and their size using VC++ Code Pin
Hamid_RT28-Aug-09 4:59
Hamid_RT28-Aug-09 4:59 
QuestionDC to Bitmap Pin
LuisFilipeSa27-Aug-09 22:13
LuisFilipeSa27-Aug-09 22:13 
AnswerRe: DC to Bitmap Pin
CPallini27-Aug-09 22:38
mveCPallini27-Aug-09 22:38 
GeneralRe: DC to Bitmap Pin
LuisFilipeSa27-Aug-09 23:42
LuisFilipeSa27-Aug-09 23:42 
GeneralRe: DC to Bitmap Pin
CPallini27-Aug-09 23:56
mveCPallini27-Aug-09 23:56 
GeneralRe: DC to Bitmap Pin
LuisFilipeSa30-Aug-09 23:33
LuisFilipeSa30-Aug-09 23:33 
QuestionOleDb Application Pin
andrew_dk27-Aug-09 21:50
andrew_dk27-Aug-09 21:50 
QuestionTracking tooltip double-click problem when using XP manifest (ComCtl32.dl) [modified] Pin
Moak27-Aug-09 13:48
Moak27-Aug-09 13:48 
AnswerRe: Tracking tooltip double-click problem when using XP manifest (ComCtl32.dl) Pin
Moak1-Sep-09 4:25
Moak1-Sep-09 4:25 
QuestionUsing GetThreadContext to get the Program Counter of a thread Pin
Code-o-mat27-Aug-09 11:15
Code-o-mat27-Aug-09 11:15 
GeneralRe: Using GetThreadContext to get the Program Counter of a thread Pin
harold aptroot27-Aug-09 11:48
harold aptroot27-Aug-09 11:48 
GeneralRe: Using GetThreadContext to get the Program Counter of a thread Pin
Code-o-mat27-Aug-09 12:07
Code-o-mat27-Aug-09 12:07 
GeneralRe: Using GetThreadContext to get the Program Counter of a thread Pin
harold aptroot27-Aug-09 12:11
harold aptroot27-Aug-09 12:11 
GeneralRe: Using GetThreadContext to get the Program Counter of a thread Pin
Code-o-mat27-Aug-09 20:19
Code-o-mat27-Aug-09 20:19 

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.