Click here to Skip to main content
15,910,123 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CStatic::Drawitem gets called repeatledly Pin
ForNow19-Nov-17 3:30
ForNow19-Nov-17 3:30 
GeneralRe: CStatic::Drawitem gets called repeatledly Pin
Jochen Arndt19-Nov-17 7:35
professionalJochen Arndt19-Nov-17 7:35 
GeneralRe: CStatic::Drawitem gets called repeatledly Pin
ForNow19-Nov-17 8:38
ForNow19-Nov-17 8:38 
GeneralRe: CStatic::Drawitem gets called repeatledly Pin
Jochen Arndt19-Nov-17 21:27
professionalJochen Arndt19-Nov-17 21:27 
GeneralRe: CStatic::Drawitem gets called repeatledly Pin
ForNow20-Nov-17 1:28
ForNow20-Nov-17 1:28 
QuestionHiding tab control for CPropertySheet Pin
Joe Woodbury14-Nov-17 15:13
professionalJoe Woodbury14-Nov-17 15:13 
AnswerRe: Hiding tab control for CPropertySheet Pin
David Crow15-Nov-17 2:38
David Crow15-Nov-17 2:38 
AnswerRe: Hiding tab control for CPropertySheet Pin
Victor Nijegorodov15-Nov-17 5:30
Victor Nijegorodov15-Nov-17 5:30 
GeneralRe: Hiding tab control for CPropertySheet Pin
Joe Woodbury15-Nov-17 7:14
professionalJoe Woodbury15-Nov-17 7:14 
GeneralRe: Hiding tab control for CPropertySheet Pin
Victor Nijegorodov15-Nov-17 10:13
Victor Nijegorodov15-Nov-17 10:13 
QuestionDumping Derived CStatic Object Pin
ForNow9-Nov-17 13:02
ForNow9-Nov-17 13:02 
QuestionRe: Dumping Derived CStatic Object Pin
David Crow9-Nov-17 16:13
David Crow9-Nov-17 16:13 
AnswerRe: Dumping Derived CStatic Object Pin
ForNow10-Nov-17 3:04
ForNow10-Nov-17 3:04 
GeneralRe: Dumping Derived CStatic Object Pin
leon de boer12-Nov-17 6:00
leon de boer12-Nov-17 6:00 
QuestionQuantum Computing sim ? Pin
bluatigro7-Nov-17 22:42
bluatigro7-Nov-17 22:42 
AnswerRe: Quantum Computing sim ? Pin
CPallini7-Nov-17 22:58
mveCPallini7-Nov-17 22:58 
QuestionRe: Quantum Computing sim ? Pin
David Crow8-Nov-17 3:43
David Crow8-Nov-17 3:43 
AnswerRe: Quantum Computing sim ? Pin
bluatigro13-Nov-17 22:07
bluatigro13-Nov-17 22:07 
QuestionMessage Closed Pin
7-Nov-17 0:09
Munchies_Matt7-Nov-17 0:09 
AnswerRe: Anyone noticed that... Pin
Richard MacCutchan7-Nov-17 0:28
mveRichard MacCutchan7-Nov-17 0:28 
PraiseRe: Anyone noticed that... Pin
CPallini7-Nov-17 0:37
mveCPallini7-Nov-17 0:37 
GeneralRe: Anyone noticed that... Pin
Richard MacCutchan7-Nov-17 1:10
mveRichard MacCutchan7-Nov-17 1:10 
GeneralRe: Anyone noticed that... Pin
CPallini7-Nov-17 2:55
mveCPallini7-Nov-17 2:55 
Questioncreate a dpi-aware application Pin
Theo Buys6-Nov-17 23:19
Theo Buys6-Nov-17 23:19 
I try to find out what the best strategy is to create a MFC based application that is dpi-aware. Windows is based on 96 dpi for years. Today there are pc's like the Microsoft Surface that have lot more dots per inch.

In windows you can set the screen scaling factor to 100%, 125%, 150%, etc.

If you build the application with a manifest that set DPI Awareness with High DPI Aware, then the resource templates like dialogs scale automatically. Only the custom drawings must be scaled with extra code
like:
C++
int DpiScale(int val)
{
   const HDC hDC = ::GetDC(NULL);
   const UINT dpix = ::GetDeviceCaps(hDC, LOGPIXELSX);
   ::ReleaseDC(NULL, hDC);
   return ::MulDiv(val, dpix, 96);
}

int DpiPerc()
{
   return DpiScale(100);
}

DpiScale you can for coordinates or font points. DpiPerc you can use to select the a icon or picturewith the right resolution from resource.

My question is, must I develop the application for 1024 x 768?
AnswerRe: create a dpi-aware application Pin
Richard MacCutchan7-Nov-17 0:24
mveRichard MacCutchan7-Nov-17 0:24 

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.