Click here to Skip to main content
15,918,108 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Handle right-click on listview column? Pin
BadJerry5-Feb-04 4:45
BadJerry5-Feb-04 4:45 
AnswerRe: Handle right-click on listview column? Pin
Anonymous5-Feb-04 9:55
Anonymous5-Feb-04 9:55 
GeneralCTRL+F1 message to window Pin
impeham5-Feb-04 4:03
impeham5-Feb-04 4:03 
GeneralRe: CTRL+F1 message to window Pin
Ravi Bhavnani5-Feb-04 6:08
professionalRavi Bhavnani5-Feb-04 6:08 
GeneralRe: CTRL+F1 message to window Pin
impeham8-Feb-04 6:09
impeham8-Feb-04 6:09 
GeneralRe: CTRL+F1 message to window Pin
Ravi Bhavnani8-Feb-04 6:20
professionalRavi Bhavnani8-Feb-04 6:20 
GeneralGlobal pointer Pin
krugger5-Feb-04 4:02
krugger5-Feb-04 4:02 
GeneralRe: Global pointer Pin
Nitron5-Feb-04 4:12
Nitron5-Feb-04 4:12 
krugger wrote:
i need to create a pointer which will have to be global since it will be accessed in many places in my application.

Can somehow please help since i do not know where to place the declaration of the pointer.


BAD IDEA!!!

I suggest you write a pointer manager type class and access it through there, otherwise you will have to continually check the status and validity of the pointer every time before you use it. Also, if you are accessing it via multiple threads, you will have to make sure you lock and unlock it before each access. A small manager class with a Get() and Set() fcn will take care of that for you. Then wherever you need the pointer, just #include your manager header.

Also having bald pointers floating around in "global" space is just plain immoral and causes needless coupling and makes for difficult maintenance.

~Nitron.
ññòòïðïðB A
start

GeneralRe: Global pointer Pin
J. Eric Vaughan5-Feb-04 5:34
J. Eric Vaughan5-Feb-04 5:34 
GeneralRe: Global pointer Pin
BadJerry5-Feb-04 4:44
BadJerry5-Feb-04 4:44 
GeneralRe: Global pointer Pin
jhwurmbach5-Feb-04 4:49
jhwurmbach5-Feb-04 4:49 
GeneralRe: Global pointer Pin
Tim Smith5-Feb-04 6:51
Tim Smith5-Feb-04 6:51 
GeneralRe: Global pointer Pin
krugger6-Feb-04 11:33
krugger6-Feb-04 11:33 
GeneralRe: Global pointer Pin
Robert A. T. Káldy7-Feb-04 22:35
Robert A. T. Káldy7-Feb-04 22:35 
GeneralDeleting pointer... Pin
Nitron5-Feb-04 3:52
Nitron5-Feb-04 3:52 
GeneralRe: Deleting pointer... Pin
Maximilien5-Feb-04 3:57
Maximilien5-Feb-04 3:57 
GeneralRe: Deleting pointer... Pin
Nitron5-Feb-04 4:02
Nitron5-Feb-04 4:02 
GeneralRe: Deleting pointer... Pin
jhwurmbach5-Feb-04 4:42
jhwurmbach5-Feb-04 4:42 
GeneralChild windows and different threads Pin
De Nardis Andrea5-Feb-04 3:36
De Nardis Andrea5-Feb-04 3:36 
GeneralRedrawing part of the client area Pin
newbee785-Feb-04 3:29
newbee785-Feb-04 3:29 
GeneralRe: Redrawing part of the client area Pin
basementman5-Feb-04 3:54
basementman5-Feb-04 3:54 
GeneralRe: Redrawing part of the client area Pin
newbee785-Feb-04 4:43
newbee785-Feb-04 4:43 
GeneralCreating an ActiveX Control on a UI Thread Pin
DimpleSurana5-Feb-04 3:20
DimpleSurana5-Feb-04 3:20 
GeneralRe: Creating an ActiveX Control on a UI Thread Pin
Nitron5-Feb-04 4:07
Nitron5-Feb-04 4:07 
GeneralRe: Creating an ActiveX Control on a UI Thread Pin
DimpleSurana5-Feb-04 4:14
DimpleSurana5-Feb-04 4:14 

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.