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

C / C++ / MFC

 
Questionpassing a variable inside thread Pin
Le@rner23-Dec-09 18:46
Le@rner23-Dec-09 18:46 
AnswerRe: passing a variable inside thread Pin
Adam Roderick J23-Dec-09 18:59
Adam Roderick J23-Dec-09 18:59 
GeneralRe: passing a variable inside thread Pin
Rajesh R Subramanian23-Dec-09 21:57
professionalRajesh R Subramanian23-Dec-09 21:57 
QuestionRe: passing a variable inside thread Pin
CPallini23-Dec-09 22:25
mveCPallini23-Dec-09 22:25 
AnswerRe: passing a variable inside thread Pin
Rajesh R Subramanian23-Dec-09 22:32
professionalRajesh R Subramanian23-Dec-09 22:32 
GeneralRe: passing a variable inside thread Pin
Adam Roderick J23-Dec-09 22:39
Adam Roderick J23-Dec-09 22:39 
GeneralRe: passing a variable inside thread Pin
CPallini23-Dec-09 23:05
mveCPallini23-Dec-09 23:05 
GeneralRe: passing a variable inside thread Pin
Adam Roderick J23-Dec-09 22:34
Adam Roderick J23-Dec-09 22:34 
GeneralRe: passing a variable inside thread Pin
Rajesh R Subramanian24-Dec-09 1:38
professionalRajesh R Subramanian24-Dec-09 1:38 
AnswerRe: passing a variable inside thread Pin
Rajesh R Subramanian23-Dec-09 21:49
professionalRajesh R Subramanian23-Dec-09 21:49 
Questionupload larger file using Ftp in c+ Builder problem Pin
raj157623-Dec-09 18:37
raj157623-Dec-09 18:37 
QuestionI want to attach my window to the parent window so that on resizing or minimizing the parent window, the child window should be resized and moved appropriately Pin
manoharbalu23-Dec-09 18:30
manoharbalu23-Dec-09 18:30 
AnswerRe: I want to attach my window to the parent window so that on resizing or minimizing the parent window, the child window should be resized and moved appropriately Pin
Richard MacCutchan23-Dec-09 22:20
mveRichard MacCutchan23-Dec-09 22:20 
Questionhow to disable keyboard accelerators temporarily in a mdi application Pin
Prasann Mayekar23-Dec-09 17:04
Prasann Mayekar23-Dec-09 17:04 
AnswerRe: how to disable keyboard accelerators temporarily in a mdi application Pin
Adam Roderick J23-Dec-09 17:23
Adam Roderick J23-Dec-09 17:23 
QuestionFindFirstChangeNotification Pin
Still learning how to code23-Dec-09 11:20
Still learning how to code23-Dec-09 11:20 
AnswerRe: FindFirstChangeNotification Pin
Garth J Lancaster23-Dec-09 13:19
professionalGarth J Lancaster23-Dec-09 13:19 
GeneralRe: FindFirstChangeNotification Pin
Still learning how to code23-Dec-09 22:23
Still learning how to code23-Dec-09 22:23 
GeneralRe: FindFirstChangeNotification Pin
Garth J Lancaster23-Dec-09 22:38
professionalGarth J Lancaster23-Dec-09 22:38 
AnswerRe: FindFirstChangeNotification Pin
Garth J Lancaster23-Dec-09 23:02
professionalGarth J Lancaster23-Dec-09 23:02 
GeneralRe: FindFirstChangeNotification Pin
Still learning how to code24-Dec-09 3:49
Still learning how to code24-Dec-09 3:49 
GeneralRe: FindFirstChangeNotification Pin
Garth J Lancaster24-Dec-09 11:04
professionalGarth J Lancaster24-Dec-09 11:04 
GeneralRe: FindFirstChangeNotification Pin
Still learning how to code24-Dec-09 20:27
Still learning how to code24-Dec-09 20:27 
QuestionWindows coordinate system different in US and European version Pin
Denny10123-Dec-09 11:02
Denny10123-Dec-09 11:02 
AnswerRe: Windows coordinate system different in US and European version Pin
Nelek23-Dec-09 23:30
protectorNelek23-Dec-09 23:30 
I didn't know about that, I thought it should be "standard", but... one possibility could be to get the version of windows and adapting your coordinates to the differences.

I use German Windows, by printing or previewing I use:

pDC->SetMapMode (MM_LOMETRIC);
//...
pDC->TextOut (pInfo->m_rectDraw.left, 50 - pInfo->m_rectDraw.bottom, pDoc->GetPathName());
//...


With this I print the path of the file at the bottom of the page.

You say the Y orientation changes between countries, then my
50 - pInfo->m_rectDraw.bottom should change and be pInfo->m_rectDraw.bottom - 50 for US, shouldn't it?
the result is just the change of the sign, at german version will be -X and at US will be X

A way to do it could be getting the version of windows and adapting the +/- to it. So you can get the version of windows (sorry but I don't know how to for sure) at the initialization of the program in BOOL CMyApp::InitInstance() and say:

if ((windows == US) || /* Other countries with same settings than US */)
   iFactor = 1;
else
   iFactor = -1;


and afterwards

pDC->SetMapMode (MM_LOMETRIC);
pDC->TextOut (pInfo->m_rectDraw.left, iFactor(pInfo->m_rectDraw.bottom - 50), pDoc->GetPathName());


Using as coordinates with Y positive to go down, and that would adapt the sign, according to the windows version.


I guess there is a better approach, but this is an idea.

Regards.
--------
M.D.V. Wink | ;)

If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpfull answers is nice, but saying thanks can be even nicer.

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.