Click here to Skip to main content
15,895,011 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Detecting CD/DVD Burning Devices Pin
David Crow26-Jul-04 10:11
David Crow26-Jul-04 10:11 
Generaladding a package!! Pin
Oriocat26-Jul-04 8:41
Oriocat26-Jul-04 8:41 
GeneralRe: adding a package!! Pin
David Crow26-Jul-04 9:54
David Crow26-Jul-04 9:54 
GeneralRe: adding a package!! Pin
Oriocat26-Jul-04 9:59
Oriocat26-Jul-04 9:59 
GeneralRe: adding a package!! Pin
David Crow26-Jul-04 10:05
David Crow26-Jul-04 10:05 
GeneralRe: adding a package!! Pin
palbano26-Jul-04 10:09
palbano26-Jul-04 10:09 
General2 not so simple questions Pin
Nemok26-Jul-04 7:36
Nemok26-Jul-04 7:36 
GeneralRe: 2 not so simple questions Pin
Antti Keskinen26-Jul-04 8:26
Antti Keskinen26-Jul-04 8:26 
1. Easily.

As you can see in the WM_NCHITTEST message handler, you receive a CPoint object that specifies the point, in screen coordinates, where the hit test was made. If you first use ScreenToClient function to convert the CPoint into client coordinates then you can compare the coordinates to a pre-made list of where the function should return HTCAPTION. Everywhere where HTCAPTION is returned, the dialog becomes draggable.

Thus, if, for example, the x-coordinate of the CPoint is smaller than a half of the dialog's width, then you return HTCLIENT. Otherwise you return HTCAPTION. As a result, when you click and hold on the right-most half of your dialog, it can be dragged.

2. Some advanced file managers by-pass the security settings placed in the registry. To go around this, you could try the _access and _waccess functions of the Run-Time C Library. Not sure if they work though...

-Antti Keskinen

----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
GeneralRe: 2 not so simple questions Pin
David Crow26-Jul-04 8:34
David Crow26-Jul-04 8:34 
GeneralRe: 2 not so simple questions Pin
Nemok27-Jul-04 11:37
Nemok27-Jul-04 11:37 
GeneralRe: 2 not so simple questions Pin
David Crow28-Jul-04 3:32
David Crow28-Jul-04 3:32 
GeneralList Contol Pin
sweep12326-Jul-04 5:57
sweep12326-Jul-04 5:57 
GeneralRe: List Contol Pin
palbano26-Jul-04 18:51
palbano26-Jul-04 18:51 
GeneralComparing Real Numbers Pin
jerry1211a26-Jul-04 5:10
jerry1211a26-Jul-04 5:10 
GeneralRe: Comparing Real Numbers Pin
Henry miller26-Jul-04 6:23
Henry miller26-Jul-04 6:23 
GeneralRe: Comparing Real Numbers Pin
PJ Arends26-Jul-04 6:26
professionalPJ Arends26-Jul-04 6:26 
GeneralRe: Comparing Real Numbers Pin
David Crow26-Jul-04 6:43
David Crow26-Jul-04 6:43 
GeneralDisplaying build times Pin
Chris Hills26-Jul-04 4:25
Chris Hills26-Jul-04 4:25 
GeneralRe: Displaying build times Pin
Tomasz Sowinski26-Jul-04 4:38
Tomasz Sowinski26-Jul-04 4:38 
GeneralRe: Displaying build times Pin
Chris Hills1-Aug-04 2:10
Chris Hills1-Aug-04 2:10 
GeneralDocument template problem Pin
dolph_loe26-Jul-04 3:19
dolph_loe26-Jul-04 3:19 
GeneralRe: Document template problem Pin
Tomasz Sowinski26-Jul-04 4:51
Tomasz Sowinski26-Jul-04 4:51 
GeneralRe: Document template problem Pin
dolph_loe28-Jul-04 10:51
dolph_loe28-Jul-04 10:51 
GeneralTerminating Process Pin
GTS202026-Jul-04 2:28
GTS202026-Jul-04 2:28 
GeneralRe: Terminating Process Pin
David Crow26-Jul-04 3:46
David Crow26-Jul-04 3:46 

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.