質問編集履歴

2

ソースコードの追加

2019/05/26 08:01

投稿

dem0nmichik0
dem0nmichik0

スコア37

test CHANGED
File without changes
test CHANGED
@@ -361,3 +361,167 @@
361
361
  #endif
362
362
 
363
363
  ```
364
+
365
+
366
+
367
+ <TotalProject.cpp>
368
+
369
+ ```C++
370
+
371
+ //---------------------------------------------------------------------------
372
+
373
+
374
+
375
+ #include <vcl.h>
376
+
377
+ #pragma hdrstop
378
+
379
+ #include <tchar.h>
380
+
381
+ //---------------------------------------------------------------------------
382
+
383
+ USEFORM("Unit1.cpp", Form1);
384
+
385
+ //---------------------------------------------------------------------------
386
+
387
+ int WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPTSTR, int)
388
+
389
+ {
390
+
391
+ try
392
+
393
+ {
394
+
395
+ Application->Initialize();
396
+
397
+ Application->MainFormOnTaskBar = true;
398
+
399
+ Application->CreateForm(__classid(TForm1), &Form1);
400
+
401
+ // ここに入れても親タスクおよび子タスクのアイコンは消えず.
402
+
403
+ SetWindowLong(Application->Handle, GWL_EXSTYLE, GetWindowLong(Application->Handle, GWL_EXSTYLE) | WS_EX_TOOLWINDOW);
404
+
405
+ Application->Run();
406
+
407
+ }
408
+
409
+ catch (Exception &exception)
410
+
411
+ {
412
+
413
+ Application->ShowException(&exception);
414
+
415
+ }
416
+
417
+ catch (...)
418
+
419
+ {
420
+
421
+ try
422
+
423
+ {
424
+
425
+ throw Exception("");
426
+
427
+ }
428
+
429
+ catch (Exception &exception)
430
+
431
+ {
432
+
433
+ Application->ShowException(&exception);
434
+
435
+ }
436
+
437
+ }
438
+
439
+ return 0;
440
+
441
+ }
442
+
443
+ //---------------------------------------------------------------------------
444
+
445
+ ```
446
+
447
+
448
+
449
+ <Windows SDKにSetWindowLongを追加したソース>
450
+
451
+ ```C++
452
+
453
+ //---------------------------------------------------------------------------
454
+
455
+
456
+
457
+ #include <vcl.h>
458
+
459
+ #pragma hdrstop
460
+
461
+ #include <tchar.h>
462
+
463
+ //---------------------------------------------------------------------------
464
+
465
+ USEFORM("Unit1.cpp", Form1);
466
+
467
+ //---------------------------------------------------------------------------
468
+
469
+ int WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPTSTR, int)
470
+
471
+ {
472
+
473
+ try
474
+
475
+ {
476
+
477
+ Application->Initialize();
478
+
479
+ Application->MainFormOnTaskBar = true;
480
+
481
+ Application->CreateForm(__classid(TForm1), &Form1);
482
+
483
+ // ここに入れても親タスクおよび子タスクのアイコンは消えず.
484
+
485
+ SetWindowLong(Application->Handle, GWL_EXSTYLE, GetWindowLong(Application->Handle, GWL_EXSTYLE) | WS_EX_TOOLWINDOW);
486
+
487
+ Application->Run();
488
+
489
+ }
490
+
491
+ catch (Exception &exception)
492
+
493
+ {
494
+
495
+ Application->ShowException(&exception);
496
+
497
+ }
498
+
499
+ catch (...)
500
+
501
+ {
502
+
503
+ try
504
+
505
+ {
506
+
507
+ throw Exception("");
508
+
509
+ }
510
+
511
+ catch (Exception &exception)
512
+
513
+ {
514
+
515
+ Application->ShowException(&exception);
516
+
517
+ }
518
+
519
+ }
520
+
521
+ return 0;
522
+
523
+ }
524
+
525
+ //---------------------------------------------------------------------------
526
+
527
+ ```

1

「Visual C++」タグの削除

2019/05/26 08:01

投稿

dem0nmichik0
dem0nmichik0

スコア37

test CHANGED
File without changes
test CHANGED
File without changes