Click here to Skip to main content
15,919,178 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Stopping a Mouse Click from changing keyboard focus Pin
fluxt3-Jul-03 5:48
fluxt3-Jul-03 5:48 
GeneralRe: Stopping a Mouse Click from changing keyboard focus Pin
Rage3-Jul-03 5:53
professionalRage3-Jul-03 5:53 
GeneralRe: Stopping a Mouse Click from changing keyboard focus Pin
Rage3-Jul-03 5:55
professionalRage3-Jul-03 5:55 
GeneralRetrieving internet connection ip in LAN Pin
Kuniva3-Jul-03 4:02
Kuniva3-Jul-03 4:02 
GeneralRe: Retrieving internet connection ip in LAN Pin
valikac3-Jul-03 7:35
valikac3-Jul-03 7:35 
GeneralRead/Write a monochrome image to/from a .bmp file Pin
Neha3-Jul-03 3:22
Neha3-Jul-03 3:22 
GeneralRe: Read/Write a monochrome image to/from a .bmp file Pin
Rage3-Jul-03 5:50
professionalRage3-Jul-03 5:50 
GeneralGetting data into combo boxes Pin
keegan3-Jul-03 2:25
keegan3-Jul-03 2:25 
Ok, this is kinda intense, but if anyone could help me out, i'd greatly appreciate it. My main problem is that all my integer values for my CEdit boxes are coming up as -858993460. i know whats the default value for an int, but it shouldnt be coming up like that.

Here's whats going on:
i have CPropertySheet class, CMySheet containing 5 CPropertyPage (CPage1 - CPage5) thingies. I have m_page1 - m_page5 defined as CMySheet things. I have m_sh defined as a CMySheet thing in MyProgView.h. now, when i want to get data into an edit box on page1, say its variable name is my_edit, and its an int, then in the constructor for CMyProgView::CMyProgView, i put

CPropsView::CPropsView() : m_sh("")<br />
{<br />
m_sh.m_page1.my_edit= 0;<br />
}


this makes the number 0 show up in the edit boxes. This works fine. However, i'm having trouble with another section. On page4, i have a list of radio buttons. When a user clicks on a button, a new dialog window pops up with some edit boxes.

the dialog boxes are from base class CDialog, they aren't defined as antyhing to do with my CPropertypage or CPropertysheet. I have one dialog box class names New_dialog_box.

Now, here's how i set it up.
in one cpp file, i have the domodal of the dialog box...

<br />
void CPage4::OnBnClickedRadio10()<br />
{<br />
	New_dialog_box dlg;<br />
	dlg.DoModal();<br />
}


I have a variable defined in New_dialog_box as an integer, its named new_dialog_edit.

Now, back in MyProgVew.h, i tried putting in the constructor of CMyPropgView the line:

m_new_dialog_box.new_dialog_edit = 0;

I declared m_new_dialog_box in

class CPropsView : public CView<br />
{<br />
private:


the exact same spot as m_sh;

I've added m_new_dialog_box(0) to the top of the constructos in MyProgView.cpp, right next to m_sh("").

When i launch the program, go to page4, click on the radio button, the value of new_dialog_edit is teh default value for an integer, -858993460. But, i've set it = 0 in the CMyProgView constructor, just like i did in all the other proeperty pages.

I've been working on this for hours, and i'm really stumped. any help would be hugely appreciated.

*.*
GeneralRe: Getting data into combo boxes Pin
Cedric Moonen3-Jul-03 2:39
Cedric Moonen3-Jul-03 2:39 
GeneralRe: Getting data into combo boxes Pin
David Crow3-Jul-03 2:59
David Crow3-Jul-03 2:59 
GeneralRe: Getting data into combo boxes Pin
Rage3-Jul-03 3:02
professionalRage3-Jul-03 3:02 
GeneralRe: Getting data into combo boxes Pin
keegan3-Jul-03 3:25
keegan3-Jul-03 3:25 
GeneralRe: Getting data into combo boxes Pin
Cedric Moonen3-Jul-03 3:39
Cedric Moonen3-Jul-03 3:39 
GeneralRe: Getting data into combo boxes Pin
keegan3-Jul-03 3:56
keegan3-Jul-03 3:56 
Generalobject drawing Pin
jotham3-Jul-03 2:09
jotham3-Jul-03 2:09 
GeneralRe: object drawing Pin
Member 4242593-Jul-03 2:52
Member 4242593-Jul-03 2:52 
GeneralRe: object drawing Pin
basementman3-Jul-03 4:42
basementman3-Jul-03 4:42 
QuestionHow to detect Internet connection Pin
HemantR...3-Jul-03 1:44
HemantR...3-Jul-03 1:44 
AnswerRe: How to detect Internet connection Pin
Ryan Binns3-Jul-03 1:50
Ryan Binns3-Jul-03 1:50 
AnswerRe: How to detect Internet connection Pin
David Crow3-Jul-03 3:00
David Crow3-Jul-03 3:00 
AnswerRe: How to detect Internet connection Pin
Ravi Bhavnani3-Jul-03 3:08
professionalRavi Bhavnani3-Jul-03 3:08 
GeneralRe: How to detect Internet connection Pin
Ryan Binns3-Jul-03 4:10
Ryan Binns3-Jul-03 4:10 
GeneralReal Time performance problem Pin
Anonymous3-Jul-03 0:40
Anonymous3-Jul-03 0:40 
GeneralRe: Real Time performance problem Pin
Ryan Binns3-Jul-03 1:17
Ryan Binns3-Jul-03 1:17 
GeneralRe: Real Time performance problem Pin
Valeria Bogdevich3-Jul-03 1:27
Valeria Bogdevich3-Jul-03 1:27 

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.