|
Hi Yaron,
Thanks for the reply... But the problem is my parent window (CMyBar) does get WM_NOTIFY and VM_PARENTNOTIFY messages(I've checked it with Spy), but my method OnTreeChange never gets called...
I'm new to MFC and I'm sure I'm missing something here.
Jim Jim
|
|
|
|
|
well, if you have checked it with spy and the Bar does get the WM_NOTIFY message, then check the id of the tree control (IDC_TREE) check the name of the function.....other than that it suppose to work....
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
YaronNir wrote: well, if you have checked it with spy and the Bar does get the WM_NOTIFY message, then check the id of the tree control (IDC_TREE) check the name of the function.....other than that it suppose to work....
Thanks for your help! You're right, it was a an incorrect id of the tree control.
Jim Jim
|
|
|
|
|
hi all,
i am unable to access the property page control values from another property page.
// snippet of the code
CPropertySheet dlg(_T("Hellow"), this, 0);
one a; //First Property Page
two b; //second Property Page
three c; //third Property Page
dlg.AddPage(&a);
dlg.AddPage(&b);
dlg.AddPage(&c);
dlg.SetWizardMode();
dlg.DoModal();
//================================================
if the first property page contains the ComboBox with some values i am trying to acces the values in the second property page as
one* m_Main2 = (one *) GetParent();
CString str;
for(int i =0;i< m_Main2->p->GetCount();i++)
{
m_Main2->p->GetLBText(i,str); // p is the pointer of the combobox
MessageBox(str);
}
where p is the pointer of combobox control in the first property sheet.
any solutions for this please.
thanks
uday.
uday kiran
|
|
|
|
|
The dialog of property will be created only if it is shown once. That is why you can't access them.
- NS -
|
|
|
|
|
As each tab loses focus, store the control's values in the sheet (parent).
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
I have a big project and when run application, VC report leak memory but I don't know variable is cause leak memory? Can you help me
-----------------
conglt
|
|
|
|
|
Install Bounds checker
never say die
|
|
|
|
|
Bounds checker is good but expensive, I can't buy it
-----------------
conglt
-- modified at 3:28 Tuesday 18th April, 2006
|
|
|
|
|
|
thanks
-----------------
conglt
|
|
|
|
|
|
thanks
-----------------
conglt
|
|
|
|
|
Hi all
Can someone tell me steps I need to take in order to change my programs default MFC icon to the icon I want ?
Thanks.
I am having some strange problems, when simply rename the icon i want to IDR_MAINFRAME
|
|
|
|
|
where u see in the code LoadIcon and IDR_MAINFRAME change the IDR_MAINFRAME to your desired icon (use the MAKEINTRESOURCE maco if it an icon from the resources)
hope it helps
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
Hi big_denny_200
Example
HICON h=LoadIcon(AfxGetApp()->m_hInstance,(LPCTSTR)IDI_ICON1);
SetIcon(h,0);
|
|
|
|
|
Hi friends,
1)What is user of global static variables.
2) can i user those vars in other files with extern keyword?
Vikram S
|
|
|
|
|
vikrams wrote: 2) can i user those vars in other files with extern keyword?
it has an internal linkage ie its scope is in the translation unit where it is defined.
vikrams wrote: 2) can i user those vars in other files with extern keyword?
u have to remove the static keyword
never say die
-- modified at 5:04 Monday 17th April, 2006
|
|
|
|
|
Can u please put some more light on "translation unit" concept in terms of source & header files?
|
|
|
|
|
Hi Friends,
After some analysis I got following answers
1) When u compile your files(any type of project). each cpp/cxx/C file treated as separate translation unit
2) Object file will be created for each one of them
So for static variables
1) If the static variable in declared in some other cpp/cxx/c file, U can not access it ( using extern keyword) as it becomes as private for that file/translation unit.
2) If u declared global static variable in header file then each translation unit will get copy of it and also your final exe will contain mutiple instances of that global variable
for each file contents (means the functions/classes... inside file ).
Experts.. Please correct me if there is any incorrectness.
VikramS
|
|
|
|
|
Hi Friends,
After some analysis I got following answers
1) When u compile your files(any type of project). each cpp/cxx/C file treated as separate translation unit
2) Object file will be created for each one of them
So for static variables
1) If the static variable in declared in some other cpp/cxx/c file, U can not access it ( using extern keyword) as it becomes as private for that file/translation unit.
2) If u declared global static variable in header file then each translation unit will get copy of it and also your final exe will contain mutiple instances of that global variable
for each file contents (means the functions/classes... inside file ).
Experts.. Please correct me if there is any incorrectness.
VikramS
-- modified at 6:40 Monday 17th April, 2006
|
|
|
|
|
Hi,
Does any have idea of "Timing Diagram"..i want to implement it,pls help me out.
thanks in before
James rocky
|
|
|
|
|
RockyJames wrote: Does any have idea of "Timing Diagram"..
This could be most anything. Please elaborate.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Hey sorry to repost, but no one seems to pay attention to posts that have some answers.
I am strying to take a STL string that I have and use it WIN32 API calls that require a LPTCSTR ( I think this is a const tstring). Anyways, I have tried the following header code, and it compiles, but I have no idea how to use the " typedef std::basic_string< TCHAR > tstring; " code... basically I want to do the following:
string stlStr;
LPTSTR sillyMicrosoftString = stringToLPTSTR(blah);
How can I make this work?
//header code in my file
#include <windows.h>
#include <stdio.h>
#define NULL 0
#include "LogFiles.h"
#include "TestPrint.h"
#include <string>
#include "TestPrint.h"
#include <iostream>
#include <conio.h>
typedef std::basic_string< TCHAR > tstring;
-- modified at 3:10 Monday 17th April, 2006
|
|
|
|
|
you can convert string to "char *" first,then convert "char *" to LPTSTR.
|
|
|
|