Advertisement
ASP_Volume3 Windows API Call/ Explanation #44862

True Always On top With API

True window always on top. Like MS toolbar. It floats over any active application is inactive but is still always on top. Allows you to switch between applications and window is still always on top! Much better than Jake McCurry's lousy Always on top code.

AI

AIサマリー: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

ソースコード
original-source
Public Sub MakeWindowAlwaysTop(hwnd As Long)
SetWindowPos hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE
End Sub
Public Sub MakeWindowNotTop(hwnd As Long)
SetWindowPos hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE
End Sub

#include <iostream.h> 
float x, y; 
int main () 
{ 
bool done = false; 
int x,y,z; 
int a,b,c,d;  
for(;;) 
{ 
cout << "\nWelcome To Batting Avg Calculator By Matt Belair!\n";
cout<<"Version 1.0 Compiled May 17. 2k1 AD\n"; 
cout << "\nMain Menu- Choose an option\n"; 
    cout << "[1] Calculate Your Batting Avg.\n"; 
cout << "[2] Calculate Pitchers Era\n";    
cout << "[3] Quit\n"; 
    cin >> z; 
    switch (z) 
      { 
case 1: 
cout << "\nEnter Number of Hits:\t"; 
    cin >> x; 
    cout << "Enter Number of At Bats:\t"; 
    cin >> y; 
	
 cout <<"Batting avg:\t\t"<<(float)x/y<<endl;
	break; 
case 2: 
cout << "\nEnter The Number of Earned Runs given up:\t"; 
cin>>a; 
cout << "\nEnter number of Innings Pitched:\t"; 
cin>>b; 
cout << "\nEnter number of innings in a standard game:\t"; 
cin >>c; 
 
cout <<"ERA:\t\t"<<(float)a/b*c<<endl;
      break; 
case 3: 
      done = true; 
      break; 
      default: 
      cout << "Make another Selection"; 
      break; 
} 
if (done) 
break; 
} 
return 0; 
} 
オリジナルのコメント (3)
Wayback Machineから復元