- Timestamp:
- Feb 9, 2016, 12:57:59 PM (10 years ago)
- Location:
- branches/swt/testapp/apitest
- Files:
-
- 5 edited
-
ApiTest.properties (modified) (1 diff)
-
src/ApiTestOdin.cpp (modified) (6 diffs)
-
src/ApiTestOdin.def (modified) (1 diff)
-
src/ApiTestPm.cpp (modified) (2 diffs)
-
src/ApiTestWin.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/swt/testapp/apitest/ApiTest.properties
r22113 r22115 2 2 #The properties in this file are here to aid the developer by providing a backlink. 3 3 #This kinda has to do with 'modeling' and being able to 'regenerate' a published commit. 4 #Sun, 07 Feb 2016 1 0:54:27 -05004 #Sun, 07 Feb 2016 19:51:37 -0500 5 5 6 meta-commit= none6 meta-commit=9d829c3e499fe73c168edbbcf7112f4a12184f4e -
branches/swt/testapp/apitest/src/ApiTestOdin.cpp
r22113 r22115 92 92 /* Message from the button, we post a message to close the window */ 93 93 case ID_EXIT: 94 Post QuitMessage(0);95 break; 96 97 /* Exit Message from the File Menu, forward it to ID_EXIT*/94 PostMessage(hwnd, WM_CLOSE, NULL, NULL); 95 break; 96 97 /* Message from the button, we post a message to close the window */ 98 98 case ID_FILE_EXIT: 99 PostMessage(hwnd, WM_C OMMAND, (UINT) ID_EXIT, NULL);99 PostMessage(hwnd, WM_CLOSE, NULL, NULL); 100 100 break; 101 101 … … 129 129 130 130 /* 131 // Request to quit the application. 131 // This message is generated by a call to PostQuitMessage() or the 132 // posting of a WM_QUIT message. It causes GetMessage() to return zero 133 // and thus the message-loop to end. So this message is never 134 // dispatched and this case thus never reached. After the message-loop 135 // ends, the message-structure contains this message with an exit-code 136 // (from PostQuitMessage()) in wParam. 132 137 */ 133 138 case WM_QUIT: … … 137 142 138 143 /* 139 // Request to close the application.140 // On Win32 WM_CLOSE does a DestroyWindow() but does not post a WM_QUIT141 // message and thus does not terminate the message-loop.144 // This message is sent when the close-button is clicked. 145 // On Win32, DefWindowProc() does a DestroyWindow(), but does not post 146 // a WM_QUIT message and thus does not terminate the message-loop. 142 147 */ 143 148 case WM_CLOSE: 144 149 printf("WM_CLOSE received\n"); 145 150 lres = DefWindowProc(hwnd, msg, wparam, lparam); 146 PostQuitMessage(0); 147 break; 148 149 /* 150 // Window is being destroyed, time to cleanup resources allocated. 151 break; 152 153 /* 154 // This message is generated by a call to DestroyWindow(). 155 // At the time this message is received, the windows and its children 156 // are not destroyed yet. 151 157 */ 152 158 case WM_DESTROY: 153 159 printf("WM_DESTROY received\n"); 154 160 lres = DefWindowProc(hwnd, msg, wparam, lparam); 161 PostQuitMessage(99); 155 162 break; 156 163 … … 262 269 hwnd = CreateWindow( 263 270 MainWndClass, // Our Window Class 264 "ApiTestOdin :: Main Window [generated:201602071 054]", // Caption Text271 "ApiTestOdin :: Main Window [generated:201602071950]", // Caption Text 265 272 WS_OVERLAPPEDWINDOW, // Window Stype 266 273 100, // The x-pos from ulc … … 288 295 } 289 296 297 /* Last Message Info */ 298 printf("\n"); 299 printf("Last Message:\n"); 300 printf("msg.hwnd=%08X\n", msg.hwnd); 301 printf("msg.message=%08X (%d)\n", msg.message, msg.message); 302 printf("msg.wParam=%08X (%d)\n", msg.wParam, msg.wParam); 303 printf("msg.lParam=%08X (%d)\n", msg.lParam, msg.lParam); 304 290 305 /* App is terminating */ 306 printf("\n"); 291 307 printf("ApiTestOdin is terminating...\n"); 292 308 … … 303 319 printf("\n"); 304 320 printf("%s\n","###############################################################################"); 305 printf("%s\n","# This is the Odin variant of ApiTest version.201602071 054#");321 printf("%s\n","# This is the Odin variant of ApiTest version.201602071950 #"); 306 322 printf("%s\n","###############################################################################"); 307 323 printf("\n"); -
branches/swt/testapp/apitest/src/ApiTestOdin.def
r22113 r22115 8 8 ;############################################################################## 9 9 10 NAMEApiTestOdin WINDOWAPI ; PM11 ;NAMEApiTestOdin WINDOWCOMPAT ; CLI10 ;NAME ApiTestOdin WINDOWAPI ; PM 11 NAME ApiTestOdin WINDOWCOMPAT ; CLI 12 12 DESCRIPTION 'A Program to test the Odin32 API from an Odin Based Executable' -
branches/swt/testapp/apitest/src/ApiTestPm.cpp
r22113 r22115 208 208 }; 209 209 PSZ pszClassClient = (PSZ) "ApiTestPm"; // Window Class Name 210 PSZ pszTitle = (PSZ) "ApiTestPm :: Main Window [generated:201602071 054]"; // Window Title210 PSZ pszTitle = (PSZ) "ApiTestPm :: Main Window [generated:201602071950]"; // Window Title 211 211 ULONG flStyleClient = 0; // Style for Client Window 212 212 HWND hwndFrame = NULL; // Receives handle for Frame Window … … 314 314 printf("\n"); 315 315 printf("%s\n","###############################################################################"); 316 printf("%s\n","# This is the PM variant of ApiTest version.201602071 054#");316 printf("%s\n","# This is the PM variant of ApiTest version.201602071950 #"); 317 317 printf("%s\n","###############################################################################"); 318 318 printf("\n"); -
branches/swt/testapp/apitest/src/ApiTestWin.cpp
r22113 r22115 95 95 /* Message from the button, we post a message to close the window */ 96 96 case ID_EXIT: 97 Post QuitMessage(0);98 break; 99 100 /* Exit Message from the File Menu, forward it to ID_EXIT*/97 PostMessage(hwnd, WM_CLOSE, NULL, NULL); 98 break; 99 100 /* Message from the button, we post a message to close the window */ 101 101 case ID_FILE_EXIT: 102 PostMessage(hwnd, WM_C OMMAND, (UINT) ID_EXIT, NULL);102 PostMessage(hwnd, WM_CLOSE, NULL, NULL); 103 103 break; 104 104 … … 132 132 133 133 /* 134 // Request to quit the application. 134 // This message is generated by a call to PostQuitMessage() or the 135 // posting of a WM_QUIT message. It causes GetMessage() to return zero 136 // and thus the message-loop to end. So this message is never 137 // dispatched and this case thus never reached. After the message-loop 138 // ends, the message-structure contains this message with an exit-code 139 // (from PostQuitMessage()) in wParam. 135 140 */ 136 141 case WM_QUIT: … … 140 145 141 146 /* 142 // Request to close the application.143 // On Win32 WM_CLOSE does a DestroyWindow() but does not post a WM_QUIT144 // message and thus does not terminate the message-loop.147 // This message is sent when the close-button is clicked. 148 // On Win32, DefWindowProc() does a DestroyWindow(), but does not post 149 // a WM_QUIT message and thus does not terminate the message-loop. 145 150 */ 146 151 case WM_CLOSE: 147 152 printf("WM_CLOSE received\n"); 148 153 lres = DefWindowProc(hwnd, msg, wparam, lparam); 149 PostQuitMessage(0); 150 break; 151 152 /* 153 // Window is being destroyed, time to cleanup resources allocated. 154 break; 155 156 /* 157 // This message is generated by a call to DestroyWindow(). 158 // At the time this message is received, the windows and its children 159 // are not destroyed yet. 154 160 */ 155 161 case WM_DESTROY: 156 162 printf("WM_DESTROY received\n"); 157 163 lres = DefWindowProc(hwnd, msg, wparam, lparam); 164 PostQuitMessage(99); 158 165 break; 159 166 … … 266 273 hwnd = CreateWindow( 267 274 MainWndClass, // Our Window Class 268 "ApiTestWin :: Main Window [generated:201602071 054]", // Caption Text275 "ApiTestWin :: Main Window [generated:201602071950]", // Caption Text 269 276 WS_OVERLAPPEDWINDOW, // Window Stype 270 277 100, // The x-pos from ulc … … 292 299 } 293 300 301 /* Last Message Info */ 302 printf("\n"); 303 printf("Last Message:\n"); 304 printf("msg.hwnd=%08X\n", msg.hwnd); 305 printf("msg.message=%08X (%d)\n", msg.message, msg.message); 306 printf("msg.wParam=%08X (%d)\n", msg.wParam, msg.wParam); 307 printf("msg.lParam=%08X (%d)\n", msg.lParam, msg.lParam); 308 294 309 /* App is terminating */ 310 printf("\n"); 295 311 printf("ApiTestWin is terminating...\n"); 296 312 … … 307 323 printf("\n"); 308 324 printf("%s\n","###############################################################################"); 309 printf("%s\n","# This is the Windows variant of ApiTest version.201602071 054#");325 printf("%s\n","# This is the Windows variant of ApiTest version.201602071950 #"); 310 326 printf("%s\n","###############################################################################"); 311 327 printf("\n");
Note:
See TracChangeset
for help on using the changeset viewer.
