Click here to Skip to main content
15,887,135 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Enter button not working on CBitmapButton. Pin
Le@rner28-Jul-10 2:30
Le@rner28-Jul-10 2:30 
QuestionAdding combo box to list control Pin
Sakhalean28-Jul-10 1:16
Sakhalean28-Jul-10 1:16 
AnswerRe: Adding combo box to list control Pin
Cool_Dev28-Jul-10 1:22
Cool_Dev28-Jul-10 1:22 
AnswerRe: Adding combo box to list control Pin
David Crow28-Jul-10 3:09
David Crow28-Jul-10 3:09 
AnswerRe: Adding combo box to list control Pin
Rolf Kristensen29-Jul-10 2:29
Rolf Kristensen29-Jul-10 2:29 
QuestionPassing Variable between Files Pin
T.RATHA KRISHNAN28-Jul-10 0:30
T.RATHA KRISHNAN28-Jul-10 0:30 
AnswerRe: Passing Variable between Files Pin
Cool_Dev28-Jul-10 1:10
Cool_Dev28-Jul-10 1:10 
AnswerRe: Passing Variable between Files Pin
Aescleal28-Jul-10 1:27
Aescleal28-Jul-10 1:27 
If you really want to do this (and judging by other questions you've posted on these forums I'm waiting for the inevitable "my pointer's being overwritten/when I dererference the pointer an exception is thrown" question) then:

- add a member function to the class that returns the pointer
- include the header with the class in it to the other files that contain code that you want to mangle^h^h^h^h^h^haccess the pointer.

Generally (although not always) it's a bad idea to expose a class's internally dangly bits to the outside world like this though. If you start thinking of classes less as dumping grounds for data but as things that do stuff your question changes from: "How do I access this pointer?" to "what behaviour do I want my class to have?" You'll probably find that you only need a small subset of what unfettered pointer access gives you in the code you currently think of as wanting access and your code will be a bit safer as a result.

Cheers,

Ash
QuestionScanf problem Pin
sagargulhane27-Jul-10 21:32
sagargulhane27-Jul-10 21:32 
AnswerRe: Scanf problem [modified] Pin
Aescleal27-Jul-10 21:49
Aescleal27-Jul-10 21:49 
GeneralRe: Scanf problem Pin
sagargulhane28-Jul-10 23:23
sagargulhane28-Jul-10 23:23 
AnswerRe: Scanf problem Pin
«_Superman_»27-Jul-10 22:31
professional«_Superman_»27-Jul-10 22:31 
Questionpdb VC++ Pin
VVVimal27-Jul-10 19:47
VVVimal27-Jul-10 19:47 
AnswerRe: pdb VC++ Pin
Sauro Viti27-Jul-10 20:52
professionalSauro Viti27-Jul-10 20:52 
AnswerRe: pdb VC++ Pin
ARopo28-Jul-10 6:22
ARopo28-Jul-10 6:22 
AnswerRe: pdb VC++ Pin
Abhi Lahare30-Jul-10 8:20
Abhi Lahare30-Jul-10 8:20 
Questiona prob with HKEY Pin
Krauze27-Jul-10 16:18
Krauze27-Jul-10 16:18 
QuestionRe: a prob with HKEY Pin
David Crow27-Jul-10 17:13
David Crow27-Jul-10 17:13 
AnswerRe: a prob with HKEY Pin
Krauze27-Jul-10 17:49
Krauze27-Jul-10 17:49 
QuestionRe: a prob with HKEY Pin
David Crow28-Jul-10 2:29
David Crow28-Jul-10 2:29 
AnswerRe: a prob with HKEY Pin
Krauze28-Jul-10 15:33
Krauze28-Jul-10 15:33 
AnswerRe: a prob with HKEY [modified] Pin
Cool_Dev27-Jul-10 19:20
Cool_Dev27-Jul-10 19:20 
AnswerRe: a prob with HKEY Pin
KarstenK28-Jul-10 2:47
mveKarstenK28-Jul-10 2:47 
QuestionDifferent usage of CWinFormsControl Pin
cppmfcnewbie27-Jul-10 13:22
cppmfcnewbie27-Jul-10 13:22 
AnswerRe: Different usage of CWinFormsControl Pin
Cool_Dev27-Jul-10 18:46
Cool_Dev27-Jul-10 18: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.