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

C / C++ / MFC

 
QuestionHow to display picture while my programm is running Pin
bilas6-Feb-05 23:37
bilas6-Feb-05 23:37 
GeneralHelp with global variables Pin
Muad-Dib6-Feb-05 23:31
Muad-Dib6-Feb-05 23:31 
GeneralRe: Help with global variables Pin
bilas6-Feb-05 23:44
bilas6-Feb-05 23:44 
GeneralRe: Help with global variables Pin
Antony M Kancidrowski7-Feb-05 1:38
Antony M Kancidrowski7-Feb-05 1:38 
GeneralRe: Help with global variables Pin
Muad-Dib7-Feb-05 2:36
Muad-Dib7-Feb-05 2:36 
GeneralRe: Help with global variables Pin
Muad-Dib7-Feb-05 11:53
Muad-Dib7-Feb-05 11:53 
GeneralRe: Help with global variables Pin
Antony M Kancidrowski7-Feb-05 11:58
Antony M Kancidrowski7-Feb-05 11:58 
GeneralRe: Help with global variables Pin
Muad-Dib7-Feb-05 20:43
Muad-Dib7-Feb-05 20:43 
The variable is private:

class CMyApp : public CWinApp
{
...
public:
int GetHelp(void)
{ reutrn help;}
}
void SetHelp(int a)
{
help = a;
}
...
private:
int help;
There is only one SetHelp in the code. At the beginning. After it there is an if (GetHelp()==1) so the program can only go furthere if the value is correct.
I have set the vlaue to 1 only for testing. So it's not always the same Smile | :)

However when I try to read it from the CMyDlg class with the help of the pointer pApp->GetHelp() it returns 0....

CMyApp* pApp = reinterpret_cast<cmyapp*>(AfxGetApp());
ASSERT(pApp != NULL); The pointer actually can call the functions but the variables are read incorrectly.





Muad-Dib
GeneralRe: Help with global variables Pin
Antony M Kancidrowski8-Feb-05 10:45
Antony M Kancidrowski8-Feb-05 10:45 
Generalinformation on pixel of a picture Pin
petit sorcier6-Feb-05 23:23
petit sorcier6-Feb-05 23:23 
GeneralRe: information on pixel of a picture Pin
ThatsAlok6-Feb-05 23:39
ThatsAlok6-Feb-05 23:39 
GeneralError in put_text Pin
cj_rahul6-Feb-05 23:22
cj_rahul6-Feb-05 23:22 
GeneralRe: Error in put_text Pin
Mike Dimmick6-Feb-05 23:29
Mike Dimmick6-Feb-05 23:29 
GeneralDifferent fonts in CTreeView Pin
bilas6-Feb-05 23:16
bilas6-Feb-05 23:16 
GeneralRe: Different fonts in CTreeView Pin
Mike Dimmick6-Feb-05 23:23
Mike Dimmick6-Feb-05 23:23 
GeneralRe: Different fonts in CTreeView Pin
bilas6-Feb-05 23:33
bilas6-Feb-05 23:33 
GeneralRe: Different fonts in CTreeView Pin
bilas7-Feb-05 0:40
bilas7-Feb-05 0:40 
GeneralCreateWindow fails Pin
Member 14932146-Feb-05 23:01
Member 14932146-Feb-05 23:01 
GeneralRe: CreateWindow fails Pin
ThatsAlok6-Feb-05 23:19
ThatsAlok6-Feb-05 23:19 
GeneralRe: CreateWindow fails Pin
Member 14932147-Feb-05 0:35
Member 14932147-Feb-05 0:35 
GeneralUpdateCommandUI problem Pin
Ro_land6-Feb-05 22:38
Ro_land6-Feb-05 22:38 
GeneralRe: UpdateCommandUI problem Pin
Roger Allen7-Feb-05 3:59
Roger Allen7-Feb-05 3:59 
GeneralRe: UpdateCommandUI problem Pin
Ro_land7-Feb-05 19:00
Ro_land7-Feb-05 19:00 
GeneralLSP Problem Pin
X20406-Feb-05 21:32
X20406-Feb-05 21:32 
GeneraljosephSDK Listview Pin
tijo_joseph@rediffmail.com6-Feb-05 21:31
susstijo_joseph@rediffmail.com6-Feb-05 21:31 

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.