Click here to Skip to main content
16,010,553 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionquadratic problem Pin
ss200625-Mar-06 8:51
ss200625-Mar-06 8:51 
AnswerRe: quadratic problem Pin
El Corazon25-Mar-06 8:59
El Corazon25-Mar-06 8:59 
Questiontftp Pin
obat25-Mar-06 8:19
obat25-Mar-06 8:19 
AnswerRe: tftp Pin
ThatsAlok26-Mar-06 17:57
ThatsAlok26-Mar-06 17:57 
GeneralRe: tftp Pin
obat31-Mar-06 10:31
obat31-Mar-06 10:31 
QuestionConnect to SQL Server via network Pin
DDeliyiannis25-Mar-06 7:48
DDeliyiannis25-Mar-06 7:48 
QuestionWhich control? Pin
Waldermort25-Mar-06 7:17
Waldermort25-Mar-06 7:17 
AnswerRe: Which control? Pin
Maximilien25-Mar-06 7:39
Maximilien25-Mar-06 7:39 
waldermort wrote:
I have seen this done in plenty of programs, but how did they do it?


it's called magic.

MFC does not have an automatic resizing framework ( me think it's one of its failing ) to be able to easilly resize dialogs ( mostly ) and their contents. Why ? ( my interpretation of it ) Because the resource editor is not pixel oriented, it's based on DLU ( dialog logical unit ) which lets the system do some resizing depending on the size of the font scaling ( big font vs. normal font ) and that once a dialog is designed, it's not easy to translate to pixel and keep the exact positioning.


ok, so, now, how is it done ? for simple layouts, manual resizing and positioning of the control is easy to do, handle the WM_SIZE message and recompute each control position and move them to position with do MoveWindow ( or SetWindowPos ).

for more complex layout, you can still do it manually, or you can go have a look at different resising classes and framework that exists, do a little search here on codeproject to find a couple of them. in general, each work well, but I think that they all have some sort of limitation that makes layout difficult.

At work, We are using the LayoutManager of Dundas, which works ok for some layout, but is a nightmare for others.




Maximilien Lincourt
Your Head A Splode - Strong Bad
GeneralRe: Which control? Pin
Waldermort25-Mar-06 8:29
Waldermort25-Mar-06 8:29 
GeneralRe: Which control? Pin
PJ Arends25-Mar-06 9:50
professionalPJ Arends25-Mar-06 9:50 
GeneralRe: Which control? Pin
Waldermort25-Mar-06 20:42
Waldermort25-Mar-06 20:42 
QuestionDebugging in Visual C++.NET Pin
pplshero5425-Mar-06 6:21
pplshero5425-Mar-06 6:21 
QuestionWhot is wrong with this code? Pin
Glich25-Mar-06 3:49
Glich25-Mar-06 3:49 
AnswerRe: Whot is wrong with this code? Pin
Justin Tay25-Mar-06 4:43
Justin Tay25-Mar-06 4:43 
GeneralRe: Whot is wrong with this code? Pin
Glich25-Mar-06 4:50
Glich25-Mar-06 4:50 
AnswerRe: Whot is wrong with this code? Pin
Nemanja Trifunovic25-Mar-06 5:18
Nemanja Trifunovic25-Mar-06 5:18 
GeneralRe: Whot is wrong with this code? Pin
Glich25-Mar-06 5:50
Glich25-Mar-06 5:50 
GeneralRe: Whot is wrong with this code? Pin
Nemanja Trifunovic25-Mar-06 6:20
Nemanja Trifunovic25-Mar-06 6:20 
GeneralRe: Whot is wrong with this code? Pin
Glich25-Mar-06 6:55
Glich25-Mar-06 6:55 
GeneralRe: Whot is wrong with this code? Pin
PJ Arends25-Mar-06 9:43
professionalPJ Arends25-Mar-06 9:43 
Questiondafs Pin
pravin parmar25-Mar-06 1:38
pravin parmar25-Mar-06 1:38 
Questionhow to check thread is running or not Pin
baldha rakesh25-Mar-06 0:18
baldha rakesh25-Mar-06 0:18 
AnswerRe: how to check thread is running or not Pin
Justin Tay25-Mar-06 0:35
Justin Tay25-Mar-06 0:35 
AnswerRe: how to check thread is running or not Pin
Stephen Hewitt25-Mar-06 1:10
Stephen Hewitt25-Mar-06 1:10 
GeneralRe: how to check thread is running or not Pin
Justin Tay25-Mar-06 1:42
Justin Tay25-Mar-06 1:42 

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.