Click here to Skip to main content
16,011,120 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: GUI Pin
cristianmuller4-Aug-04 3:27
cristianmuller4-Aug-04 3:27 
QuestionDirectShow vs. DirectDraw ??? Pin
baboguru2-Aug-04 20:41
baboguru2-Aug-04 20:41 
QuestionHow to search a substring of a LPWSTR? Pin
ting6682-Aug-04 20:34
ting6682-Aug-04 20:34 
AnswerRe: How to search a substring of a LPWSTR? Pin
PJ Arends2-Aug-04 20:58
professionalPJ Arends2-Aug-04 20:58 
AnswerRe: How to search a substring of a LPWSTR? Pin
Johann Gerell2-Aug-04 21:09
Johann Gerell2-Aug-04 21:09 
AnswerRe: How to search a substring of a LPWSTR? Pin
Archer2824-Aug-04 11:54
Archer2824-Aug-04 11:54 
GeneralDLL making a MSN style pop up window Help. Pin
Member 9620472-Aug-04 19:46
Member 9620472-Aug-04 19:46 
Generalwindows, mouse coordinates with ctrlbars Pin
radiox2-Aug-04 19:26
radiox2-Aug-04 19:26 
Hello,

I dont normally ask stuff like this, but I haven't been able to find an answer anywhereFrown | :(

I'm writing an app in windows(MFC) (I have what I think is at _least_ a basic understanding of writing these things, but windows programming is not my forte)

I'm looking to find mouse coordinates in the client area, an easy task you might think...

But alas, no.

The app has 5 ctrl bars dotted about, 2 of which start docked to the sides, and 1 toolbar/ctrlbar, which starts docked to the top. I can access the ctrl bars and do stuff when buttons are clicked and sliders are slid.

hmmm. lets say its a paint app (NDA's etc :/)
what i want to do is pick a tool from the ctrl bar, which i can do, and draw onto the main white bit of the window(the client area, if im correct).
But, because I've got docked things, ScreentoClient doesnt work the way I'd like it to:

GetCursorPos(&c);
ScreenToClient(AfxGetMainWnd()->m_hWnd, &c);

This doesn't return the cursor relative to the TopLeft of the white bit, but to the point below the menubar, where I assume the windows actual client area starts.

So I supose what I'm asking is how do I get the TL corner of the white area? or even if it has different name, what is it called, so I can at least look for the right thing, clientArea isnt tuning up much for me.

I hope that all made sense to someone at least.

Thanks in advance to anyone who takes the time to look at this.
GeneralRe: windows, mouse coordinates with ctrlbars Pin
radiox2-Aug-04 20:32
radiox2-Aug-04 20:32 
Generalwindowsx.txt Pin
Archer2822-Aug-04 19:10
Archer2822-Aug-04 19:10 
GeneralRe: windowsx.txt Pin
V.2-Aug-04 22:15
professionalV.2-Aug-04 22:15 
GeneralRe: windowsx.txt Pin
Archer2824-Aug-04 7:48
Archer2824-Aug-04 7:48 
GeneralRe: windowsx.txt Pin
V.4-Aug-04 10:24
professionalV.4-Aug-04 10:24 
GeneralRe: windowsx.txt Pin
Archer2824-Aug-04 11:45
Archer2824-Aug-04 11:45 
QuestionHow to set Vertical CSliderCtrl position sequencely Pin
old_cat2-Aug-04 19:05
old_cat2-Aug-04 19:05 
Generalbitmap zooming Pin
Zeeshan Bilal2-Aug-04 18:59
Zeeshan Bilal2-Aug-04 18:59 
GeneralRe: bitmap zooming Pin
PJ Arends2-Aug-04 19:58
professionalPJ Arends2-Aug-04 19:58 
GeneralRe: bitmap zooming Pin
Zeeshan Bilal2-Aug-04 20:59
Zeeshan Bilal2-Aug-04 20:59 
GeneralRe: bitmap zooming Pin
PJ Arends2-Aug-04 21:12
professionalPJ Arends2-Aug-04 21:12 
Generaldatabase problem Pin
Anonymous2-Aug-04 17:48
Anonymous2-Aug-04 17:48 
GeneralRe: database problem Pin
wb2-Aug-04 20:25
wb2-Aug-04 20:25 
GeneralRe: database problem Pin
Anonymous2-Aug-04 20:39
Anonymous2-Aug-04 20:39 
GeneralRe: database problem Pin
wb2-Aug-04 20:51
wb2-Aug-04 20:51 
QuestionWhich is better? Pin
Zero_One_ADO2-Aug-04 17:35
Zero_One_ADO2-Aug-04 17:35 
AnswerRe: Which is better? Pin
Anonymous2-Aug-04 17:59
Anonymous2-Aug-04 17:59 

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.