Click here to Skip to main content
15,892,161 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: VISUAL C++ resource.h/rc madness mess Pin
Hans Dietrich18-Feb-11 12:47
mentorHans Dietrich18-Feb-11 12:47 
AnswerRe: VISUAL C++ resource.h/rc madness mess Pin
Albert Holguin18-Feb-11 14:09
professionalAlbert Holguin18-Feb-11 14:09 
QuestionPlugin for activex Pin
S p k 52118-Feb-11 5:48
S p k 52118-Feb-11 5:48 
AnswerRe: Plugin for activex Pin
Luc Pattyn18-Feb-11 5:58
sitebuilderLuc Pattyn18-Feb-11 5:58 
QuestionAbout Resizing controls as per screen resolution.............. Pin
ddgalande18-Feb-11 0:22
ddgalande18-Feb-11 0:22 
AnswerRe: About Resizing controls as per screen resolution.............. Pin
ShilpiP18-Feb-11 1:09
ShilpiP18-Feb-11 1:09 
AnswerRe: About Resizing controls as per screen resolution.............. Pin
Richard MacCutchan18-Feb-11 2:48
mveRichard MacCutchan18-Feb-11 2:48 
AnswerRe: About Resizing controls as per screen resolution.............. Pin
Alan Balkany18-Feb-11 3:27
Alan Balkany18-Feb-11 3:27 
I had the same problem. You design your GUI for the lowest resolution (as someone already suggested), then when you're at a higher resolution, you have extra space in the X and Y directions. You then write functions to 1) space the controls (vertically and horizontally) using this extra space, and 2) enlarge the controls with the extra space.

Not all controls will use extra space, e.g. buttons will remain the same size. But list boxes can use the extra space to show more data.

You can write one class that does all this, then call it with each of your forms, the extra X and Y space, and resizing information.

For the resizing information, I defined a language called WASP (Window Arrangement Specification Protocol) with statements consisting of ints. The first int is the operation (e.g. space in X direction, add N percent of the X extra apace to the following controls, etc).

I did this in MFC, and each control was referred to by its int ID. Sizes and percents were also ints. Since a WASP program is all ints, I could define it as a static array of ints in my program. The advantage to this is that I didn't have to deal with any parsing or lexical analysis; I just passed the int-array WASP program to the WASP class. I used #defines for the int operations for readability.

There's a separate WASP program for each form you want to resize. The WASP program is run once when your form is initialized.
GeneralRe: About Resizing controls as per screen resolution.............. Pin
Hans Dietrich18-Feb-11 6:55
mentorHans Dietrich18-Feb-11 6:55 
GeneralRe: About Resizing controls as per screen resolution.............. Pin
Alan Balkany18-Feb-11 8:38
Alan Balkany18-Feb-11 8:38 
GeneralRe: About Resizing controls as per screen resolution.............. Pin
Hans Dietrich18-Feb-11 8:43
mentorHans Dietrich18-Feb-11 8:43 
QuestionType non-English characters at GINA / Windows logon Pin
Shashi.Shinde17-Feb-11 20:59
Shashi.Shinde17-Feb-11 20:59 
AnswerRe: Type non-English characters at GINA / Windows logon Pin
Richard MacCutchan17-Feb-11 22:05
mveRichard MacCutchan17-Feb-11 22:05 
GeneralRe: Type non-English characters at GINA / Windows logon Pin
Shashi.Shinde17-Feb-11 23:46
Shashi.Shinde17-Feb-11 23:46 
GeneralRe: Type non-English characters at GINA / Windows logon Pin
Richard MacCutchan18-Feb-11 1:29
mveRichard MacCutchan18-Feb-11 1:29 
AnswerRe: Type non-English characters at GINA / Windows logon Pin
ShilpiP18-Feb-11 5:57
ShilpiP18-Feb-11 5:57 
GeneralRe: Type non-English characters at GINA / Windows logon Pin
Shashi.Shinde20-Feb-11 19:45
Shashi.Shinde20-Feb-11 19:45 
QuestionNetwork Communication Pin
pix_programmer17-Feb-11 18:26
pix_programmer17-Feb-11 18:26 
AnswerRe: Network Communication [modified] Pin
LaxmikantYadav17-Feb-11 19:04
LaxmikantYadav17-Feb-11 19:04 
QuestionWich is the best way to launch/run an externall .exe app form vc++6 ? Pin
timbk17-Feb-11 10:53
timbk17-Feb-11 10:53 
AnswerRe: Wich is the best way to launch/run an externall .exe app form vc++6 ? Pin
Niklas L17-Feb-11 11:00
Niklas L17-Feb-11 11:00 
AnswerRe: Wich is the best way to launch/run an externall .exe app form vc++6 ? Pin
Hans Dietrich17-Feb-11 11:05
mentorHans Dietrich17-Feb-11 11:05 
AnswerRe: Wich is the best way to launch/run an externall .exe app form vc++6 ? Pin
Nish Nishant17-Feb-11 17:21
sitebuilderNish Nishant17-Feb-11 17:21 
AnswerRe: Wich is the best way to launch/run an externall .exe app form vc++6 ? Pin
LaxmikantYadav17-Feb-11 19:09
LaxmikantYadav17-Feb-11 19:09 
QuestionProblem reading Exif metadata [modified] Pin
David Crow17-Feb-11 4:35
David Crow17-Feb-11 4:35 

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.