JunkBox_Lib++ (for Windows) 1.10.1
Loading...
Searching...
No Matches
tools++.cpp
Go to the documentation of this file.
1#include "tools++.h"
2
9using namespace jbxl;
10
11
12#ifdef WIN32
13
33void jbxl::DisPatcher(int signalno, ...)
34{
35 int i;
36 unsigned int* ign_signal = NULL;
37
38 va_list args;
39 va_start(args, signalno);
40
41 if (signalno>0) {
42 ign_signal = (unsigned int*)malloc(signalno*sizeof(int));
43 if (ign_signal!=NULL) memset(ign_signal, 0, signalno*sizeof(int));
44 }
45 if (ign_signal==NULL) signalno = 0;
46 for (i=0; i<signalno; i++) {
47 ign_signal[i] = va_arg(args, unsigned int);
48 }
49
50 MSG msg;
51 while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)){
52 TranslateMessage(&msg);
53 if (msg.message==WM_QUIT) exit(1); // 強制終了
54 for (i=0; i<signalno; i++) {
55 if (msg.message==ign_signal[i]) {
56 msg.message = WM_NULL;
57 break;
58 }
59 }
60 DispatchMessage(&msg);
61 }
62
63 free(ign_signal);
64 va_end(args);
65 return;
66}
67
68#endif
Definition Brep.h:29
void DisPatcher(int sno=0,...)
Definition tools++.cpp:33
ツールライブラリ ヘッダ for C++