a99  V32.6
allegro Windows Hauptprogramm
 Alle Klassen Dateien Funktionen Variablen Typdefinitionen Aufzählungen Aufzählungswerte Makrodefinitionen
abutton.cpp
gehe zur Dokumentation dieser Datei
1 // aButton.cpp : Button mit Groessenaenderung
2 //
3 // Copyright 2011 Universitätsbibliothek Braunschweig, more see bottom
4 
5 #include "stdafx.h"
6 #include "ca99.h"
7 #include "aButton.h"
8 
9 #ifdef _DEBUG
10 #define new DEBUG_NEW
11 #undef THIS_FILE
12 static char THIS_FILE[] = __FILE__;
13 #endif
14 
15 /////////////////////////////////////////////////////////////////////////////
16 // CaButton
17 
19 {
20  B=0;
21 }
22 
24 {
25 }
26 
27 
28 BEGIN_MESSAGE_MAP(CaButton, CButton)
29  //{{AFX_MSG_MAP(CaButton)
30  ON_WM_CHAR()
31  ON_WM_KEYDOWN()
32  //}}AFX_MSG_MAP
33 END_MESSAGE_MAP()
34 
35 /////////////////////////////////////////////////////////////////////////////
36 // CaButton message handlers
37 
38 
39 void CaButton::movewin(int cx,int cy)
40 {
41 // wird bei Groessenveraenderung aktiv
42 extern int wihi, wiwi;
43 int wh=wihi,ww=wiwi;
44 if(!B)
45 {
46  WINDOWPLACEMENT pl;
47  GetWindowPlacement(&pl);
48  L=pl.rcNormalPosition.left;
49  R=pl.rcNormalPosition.right;
50  T=pl.rcNormalPosition.top;
51  B=pl.rcNormalPosition.bottom;
52 // sprintf(Aerror,"eL=%d,eR=%d,eT=%d,eB=%d",L,R,T,B); MessageBox(Aerror);
53 }
54  MoveWindow(L*cx/ww,T*cy/wihi,((R-L)*cx)/ww,((B-T)*cy)/wihi);
55 
56 }
57 
58 /*
59  Copyright 2011 Universitätsbibliothek Braunschweig
60 
61  Licensed under the Apache License, Version 2.0 (the "License");
62  you may not use this file except in compliance with the License.
63  You may obtain a copy of the License at
64 
65  http://www.apache.org/licenses/LICENSE-2.0
66 
67  Unless required by applicable law or agreed to in writing, software
68  distributed under the License is distributed on an "AS IS" BASIS,
69  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
70  See the License for the specific language governing permissions and
71  limitations under the License.
72 */
73