Click here to Skip to main content
15,902,938 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Mouse Events Pin
SandipG 13-Nov-08 20:12
SandipG 13-Nov-08 20:12 
QuestionHow to enable resize when no border for window? Pin
tarunclassic13-Nov-08 19:03
tarunclassic13-Nov-08 19:03 
AnswerRe: How to enable resize when no border for window? Pin
Code-o-mat14-Nov-08 6:52
Code-o-mat14-Nov-08 6:52 
QuestionExecute Program error Pin
Nikesh Jagtap13-Nov-08 18:59
Nikesh Jagtap13-Nov-08 18:59 
QuestionRe: Execute Program error Pin
David Crow14-Nov-08 3:29
David Crow14-Nov-08 3:29 
AnswerRe: Execute Program error Pin
Nikesh Jagtap14-Nov-08 17:13
Nikesh Jagtap14-Nov-08 17:13 
QuestionRe: Execute Program error Pin
David Crow17-Nov-08 3:26
David Crow17-Nov-08 3:26 
QuestionWeird Graphics Bug [modified] Pin
Leslie Sanford13-Nov-08 18:34
Leslie Sanford13-Nov-08 18:34 
I write VST plugins. These plugins use a lot of custom controls, e.g. knobs, sliders, etc. I've rolled my own library for these controls using Win32 and GDI+ mainly because it's hard to get VST to play nicely with MFC (long story).

What I do is use a resource editor and drag and drop the user control type onto the dialog surface. This makes it convenient to place controls in the correct position rather than trying to do it manually in code.

Anyway, I have a commercial plugin called Cobalt. It's been out since last January. Since then I've gotten a few rare bug reports that custom controls are not in the correct position. It's as if the scale the controls is using is larger than the underlying dialog they belong to.

Here is a screen shot of what I mean:

Messed up GUI[^]

Here is a screen shot of what it's suppose to look like:

Normal GUI[^]

The GUI comes in two sizes: Small and Large. I can flip between the two sizes in code with preprocessor directives so that it's easy to compile the resulting dll so that it uses one of the two sizes. My first thought when I came across this bug is that the code for the smaller size was using the coordinates for the larger size. But apparently both sizes suffer from the same bug on systems where this is a problem. And this doesn't explain why on the majority of systems the GUI looks correct. So I don't think it's related.

My biggest problem is that I can't reproduce the bug. So it's almost completely guess work. Could the units the code is using to place the controls be different somehow than what the system is using? I'm not even sure that question makes sense. I'm having a hard time figuring out what the issue is here (obviously). Thanks for any help.

EDIT: I think it's related to fonts somehow. The font type/size of the dialog box the controls belong to scales the overall position of the controls... I'm not to a point of having a coherent thought on this quite yet, lol, but I think I've found the trail.

EDIT2: (kinda going back and forth between two forums where I've posted this question):

My resource file specifies the font type. It seems as though on some systems the font type is bypassed... or something. If I delete the FONT line from the resource file, I can recreate the bug. Without the FONT specification in the resource file, Windows assumes (I think) a different type of font than what I used to create the resource file with, thus the positions of all of the controls are thrown off.

modified on Friday, November 14, 2008 2:18 AM

AnswerRe: Weird Graphics Bug Pin
Code-o-mat14-Nov-08 7:06
Code-o-mat14-Nov-08 7:06 
GeneralRe: Weird Graphics Bug Pin
Leslie Sanford14-Nov-08 7:24
Leslie Sanford14-Nov-08 7:24 
GeneralRe: Weird Graphics Bug Pin
Code-o-mat14-Nov-08 7:35
Code-o-mat14-Nov-08 7:35 
QuestionThe Editbox is working in XP, but it is white in color in Vista! Pin
LaHaHa13-Nov-08 17:39
LaHaHa13-Nov-08 17:39 
AnswerRe: The Editbox is working in XP, but it is white in color in Vista! Pin
David Crow14-Nov-08 3:32
David Crow14-Nov-08 3:32 
GeneralRe: The Editbox is working in XP, but it is white in color in Vista! Pin
LaHaHa14-Nov-08 6:06
LaHaHa14-Nov-08 6:06 
AnswerRe: The Editbox is working in XP, but it is white in color in Vista! Pin
Hamid_RT14-Nov-08 8:40
Hamid_RT14-Nov-08 8:40 
QuestionVC++2008 manifest dependencies confusion. Pin
oleg6313-Nov-08 12:03
professionaloleg6313-Nov-08 12:03 
AnswerRe: VC++2008 manifest dependencies confusion. Pin
Saurabh.Garg13-Nov-08 13:52
Saurabh.Garg13-Nov-08 13:52 
GeneralRe: VC++2008 manifest dependencies confusion. Pin
oleg6314-Nov-08 3:43
professionaloleg6314-Nov-08 3:43 
QuestionI do not understand why this compiles Pin
BobInNJ13-Nov-08 11:03
BobInNJ13-Nov-08 11:03 
AnswerRe: I do not understand why this compiles Pin
Saurabh.Garg13-Nov-08 13:58
Saurabh.Garg13-Nov-08 13:58 
AnswerRe: I do not understand why this compiles Pin
myfavour13-Nov-08 15:43
myfavour13-Nov-08 15:43 
QuestionModeless CPropertySheet - styles [modified] Pin
john john mackey13-Nov-08 9:23
john john mackey13-Nov-08 9:23 
QuestionCryptography with ECDSA from Openssl Pin
misscricri13-Nov-08 4:00
misscricri13-Nov-08 4:00 
QuestionRe: Cryptography with ECDSA from Openssl Pin
led mike13-Nov-08 4:29
led mike13-Nov-08 4:29 
AnswerRe: Cryptography with ECDSA from Openssl Pin
misscricri14-Nov-08 2:44
misscricri14-Nov-08 2:44 

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.