Win32


Windows OWL - . 85


frequencySliderValue=new TStatic(this,-1,"",250,20,200,25);

frequencyLegend=new TStatic(this,-1,

"1 10,250,85,200,25);

phaseBarValue=new TStatic (this, -1,"", 250,150,200,25);

phaseLegend=new TStatic(this,-1,

"0 32",250,215,200,25);

} void MyWindow::UpdateFrequency(UINT notifyCode){

char str[50];

if(notifyCode==SB_THUMBTRACK||notifyCode==SB_ENDSCROLL) return;

else{

kf=frequencySlider->GetPosition(); wsprintf(str," = %d",kf); frequencySliderValue->SetText (str);

panel->Invalidate(); }

} void MyWindow::UpdatePhase(UINT){

char str[50];

ph=phaseBar->GetPosition();

wsprintf(str," = PI/32 * %d",ph);

phaseBarValue->SetText(str);


275

panel->Invalidate(); } /*3 SetupWindow*/

void MyWindow::SetupWindow(){

TWindow::SetupWindow();// SetupWindow

frequencySlider->SetRange(1,10);//

freguencySlider->SetRuler(1,TRUE);//

frequencySlider->SetPosition(1);//

phaseBar->SetRange(0,32);//

phaseBar->SetPosition(16);//

UpdateFrequency();//

UpdatePhase() ;//

}

/* Paint -*/ void Panel::Paint(TDC&dc,bool,TRect&){

for(float i=0;i<2*PI*1000;i++){// 1000 float x=sin(i/100)*100;//- float y=sin((i/100+PI/32*ph)*kf)*100;//- dc.Rectangle(x+110,y+110,x+112,y+112);11 }

}

/*3 InitWainWindow*/ void MyApp::InitMainWindow(void){

SetMainWindow(new MyWindow(0," 29-2"));

} /* OwlMain*/

int OwlMain(int,char*[]){

return MyApp{).Run();