Click here to Skip to main content
15,893,190 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Header Pin
PJ Arends28-Nov-04 7:19
professionalPJ Arends28-Nov-04 7:19 
Generalglobal variables Pin
Tomate6628-Nov-04 4:21
Tomate6628-Nov-04 4:21 
GeneralOpen files Pin
vilmer28-Nov-04 2:39
vilmer28-Nov-04 2:39 
GeneralRe: Open files Pin
PJ Arends28-Nov-04 7:31
professionalPJ Arends28-Nov-04 7:31 
GeneralVideo Compression?! Pin
sabzee27-Nov-04 21:43
sabzee27-Nov-04 21:43 
GeneralUCS2 to String ... Pin
rasha200327-Nov-04 21:37
rasha200327-Nov-04 21:37 
GeneralRe: UCS2 to String ... Pin
rasha200330-Nov-04 4:06
rasha200330-Nov-04 4:06 
GeneralQuestion about CEdit and CSpinButtonCtrl Pin
Uwe Keim27-Nov-04 20:53
sitebuilderUwe Keim27-Nov-04 20:53 
Maybe someone can help me on this: I'm creating a MFC custom control which is a combination of a CEdit and a CSpinButtonCtrl. The control is created solely by code, i.e. no resource editor.

The problem is that the edit control paints itself incorrectly. Let me explain:

1.) Directly after showing the dialog with the custom controls it looks this way (the control in question is the control labeled "Breite der Bilder"):

<a href="http://www.magerquark.de/data/misc/mfc-cedit-01.png">Screenshot 1</a> [<a target=_blank title='New Window' href="http://www.magerquark.de/data/misc/mfc-cedit-01.png">^</a>]
As you can see, the border around the CEdit is missing and the text ("640") is hanging on the upper left border.

2.) If I move the mouse over the control it looks this way:

<a href="http://www.magerquark.de/data/misc/mfc-cedit-02.png">Screenshot 2</a> [<a href="http://www.magerquark.de/data/misc/mfc-cedit-02.png" target="_blank" title="New Window">^</a>]
I.e. now it paints the border but the text is still in the upper left corner, now partially hidden by the border.

3.) The control resizes when the user sizes the dialog. Now when the size was change, suddenly it looks correct, as in this screenshot:

<a href="http://www.magerquark.de/data/misc/mfc-cedit-03.png">Screenshot 3</a> [<a href="http://www.magerquark.de/data/misc/mfc-cedit-03.png" target="_blank" title="New Window">^</a>]
As you can see, now the "640" has 'snapped down' to the correct position (in contrast to the control labeled "Breite der Vorschaubilder", which doesn't scale). Also, the CEdit border now is always visible.

So something must happen upon scaling. I already examined the styles of the CEdit before and after scaling with Spy++ and also compared with CEdit controls created with the resource editor. The styles are always the same, so these are not the cause of the display-error.

Question: Can someone enlighten me about why this display-error occures an how I can get rid of it?

Thank you
Uwe

--
Affordable Windows-based CMS: www.zeta-producer.com


GeneralRe: Question about CEdit and CSpinButtonCtrl Pin
John R. Shaw28-Nov-04 9:21
John R. Shaw28-Nov-04 9:21 
GeneralRe: Question about CEdit and CSpinButtonCtrl Pin
Uwe Keim28-Nov-04 15:19
sitebuilderUwe Keim28-Nov-04 15:19 
GeneralRe: Question about CEdit and CSpinButtonCtrl Pin
Ryan Binns28-Nov-04 17:28
Ryan Binns28-Nov-04 17:28 
GeneralRe: Question about CEdit and CSpinButtonCtrl Pin
Michael Dunn28-Nov-04 20:43
sitebuilderMichael Dunn28-Nov-04 20:43 
GeneralRe: Question about CEdit and CSpinButtonCtrl Pin
Uwe Keim29-Nov-04 4:10
sitebuilderUwe Keim29-Nov-04 4:10 
GeneralRe: Question about CEdit and CSpinButtonCtrl Pin
Uwe Keim29-Dec-04 18:58
sitebuilderUwe Keim29-Dec-04 18:58 
GeneralMFC help for a beginner Pin
Member 153369527-Nov-04 15:45
Member 153369527-Nov-04 15:45 
GeneralRe: MFC help for a beginner Pin
John R. Shaw27-Nov-04 18:22
John R. Shaw27-Nov-04 18:22 
GeneralRe: MFC help for a beginner Pin
rasha200327-Nov-04 21:41
rasha200327-Nov-04 21:41 
GeneralRe: MFC help for a beginner Pin
Member 153369528-Nov-04 4:08
Member 153369528-Nov-04 4:08 
GeneralRe: MFC help for a beginner Pin
bitpusher28-Nov-04 7:46
bitpusher28-Nov-04 7:46 
GeneralProblem with derivation Pin
Cramp27-Nov-04 15:05
Cramp27-Nov-04 15:05 
GeneralRe: Problem with derivation Pin
John R. Shaw27-Nov-04 18:09
John R. Shaw27-Nov-04 18:09 
Generalhooking Pin
gamitech27-Nov-04 11:15
gamitech27-Nov-04 11:15 
GeneralRe: hooking Pin
John R. Shaw27-Nov-04 17:26
John R. Shaw27-Nov-04 17:26 
GeneralRe: hooking Pin
Roger Allen29-Nov-04 2:34
Roger Allen29-Nov-04 2:34 
QuestionEz ? Pin
BaldwinMartin27-Nov-04 11:07
BaldwinMartin27-Nov-04 11:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.