What is the best way to define Screen cordinates of windows and dialogs which are more generic so that it works fine in any type of screen resolutions.
Most of the time I would like to use the max.area of the screen.
For my Main Window (MDI) I have used the following code so that My App's window runs in Full screen without hiding my Win XP Start Button Bar.
Code used
- Code: Select all Expand view
nScrHeight:=GetSysMetrics(1) // Screen Height
nScrWidth :=GetSysMetrics(0) // Screen Width
DEFINE WINDOW oWnd FROM 0, 0 TO nScrHeight, nScrWidth MDI;
TITLE "Accounting Software" ;
MENU BuildMenu()
DEFINE BUTTONBAR oBar OF oWnd SIZE 60, 60 2007
SET MESSAGE OF oWnd TO " " 2007
DEFINE MSGITEM OF oWnd:oMsgBar PROMPT alltrim(mCoName) SIZE 220 // Company Name
ACTIVATE WINDOW oWnd MAXIMIZED;
ON INIT Select_Co();
VALID MsgYesNo( "Do you want to quit this application ?","Quit Accounting Software")
The above code is giving me the desired output
Right now I am not using any Resource editors to define windows and dialogs. I plan to use resorce editors only from my 2nd project on FWH,
This is my 1st project and at this moment I have to get familiar with FWH.
Now I want to define a MDICHILD window with it's top starting just below from the Button Bar. With the follwoing code (ie If I don't specify the Window cordinate From 0,0 to 21,30 ) the top and top left is absolutely ok. But height and width is the problem.
I want my MDI Child Window's :-
1) Height (Bottom Border) to be just above the MsgBar of my Main MDI Window, so that it will not hide the MsgBar.
2) Width should be near to the right border of my main MDI window.
Is there any general way to acheive this so that my app's windows look the same on any PC with any type of Screen Resolution.
Regards
Anser