Scaling in a COleControl
Joao Marcos Melo Mendes -- jmmm@megamedia.pt Wednesday, February 19, 1997 Hello, all.:) Environment: VC++ 4.2b, Win 95 I need to build the simplest of OCXs, namely a simple frame OCX that creates itself as transparent, does not erase its background, and generally does nothing. I would like this control to always work in pixels. However, in some containers, namely VB4, it always works in twips (I believe this is HIMETRIC, but I might be wrong on this one...) Does anyone know how I could make this control work in pixels, or better yet, how to implement a ScaleMode property? I searched MSDN extensively (October '96 version) and found nothing of use... (perhaps I didn't search for the right subjects...) Thanks in advance for any suggestion. Joao Mendes MegaMedia, S.A. "We're fools to make war on our brothers in arms." - Mark Knopfler -----BEGIN PGP PUBLIC KEY BLOCK----- Version: 2.6.2 mQBNAzKu3TgAAAECAL8+YSEFZ0XrlBMu9t2xDq3rhpWZoscP83VrX5MevAm3UOd6 fOtDKsJxsWugnVMexo50NfBjeWOHz5nA1b9hYx0ABRG0H0pvYW8gTWVuZGVzIDxq bW1tQG1lZ2FtZWRpYS5wdD4= =sspP -----END PGP PUBLIC KEY BLOCK-----
Joao Marcos Melo Mendes -- jmmm@megamedia.pt Tuesday, February 25, 1997 Hello, all.:) I asked about this about a week ago but never got an answer, so... Environment: VC++ 4.2b, Win 95 I need to build the simplest of OCXs, namely a simple frame OCX that creates itself as transparent, does not erase its background, and generally does nothing. I would like this control to always work in pixels. However, in some containers, namely VB4, it always works in twips (I believe this is HIMETRIC, but I might be wrong on this one...) Does anyone know how I could make this control work in pixels, or better yet, how to implement a ScaleMode property? I searched MSDN extensively (October '96 version) and found nothing of use... (perhaps I didn't search for the right subjects...) I am also having a second, more annoying problem: sometimes, controls contained in my OCX won't refresh. This happens mostly when changin those controls' properties at runtime. If I move a window over the OCX and away again, the controls redraw correctly. However, refreshing the window that contains the OCX has no effect. Does anyone know how I could force all controls contained in the OCX to redraw themselves correctly? Thanks in advance for any suggestion. Joao Mendes MegaMedia, S.A. "We're fools to make war on our brothers in arms." - Mark Knopfler -----BEGIN PGP PUBLIC KEY BLOCK----- Version: 2.6.2 mQBNAzKu3TgAAAECAL8+YSEFZ0XrlBMu9t2xDq3rhpWZoscP83VrX5MevAm3UOd6 fOtDKsJxsWugnVMexo50NfBjeWOHz5nA1b9hYx0ABRG0H0pvYW8gTWVuZGVzIDxq bW1tQG1lZ2FtZWRpYS5wdD4= =sspP -----END PGP PUBLIC KEY BLOCK-----
Become an MFC-L member | Вернуться в корень Архива |