|
Well, my statement may have come across a bit too strong.
But I believe that, in an object oriented environment, ou should use the object oriented way to do something.
By using the ID_SOMETHING resource constants directly, you are breaching confidentiality of the inner workings of the control-class.
You are working 'across' the MFC mechanisms, which I view as a bad thing when you have decided to use MFC.
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
jhwurmbach wrote: Well, my statement may have come across a bit too strong.
No. I just wanted to know.
jhwurmbach wrote: But I believe that, in an object oriented environment, ou should use the object oriented way to do something.
True.
jhwurmbach wrote: By using the ID_SOMETHING resource constants directly, you are breaching confidentiality of the inner workings of the control-class.
Well GetDlgItem(ID...) returns a pointer to a CWnd object . I don't see any breach here.
jhwurmbach wrote: You are working 'across' the MFC mechanisms, which I view as a bad thing when you have decided to use MFC.
This is still MFC because it returns a CWnd pointer.
Well some advocate against using GetDlgItem but I personally like it.
Have you ever had problems with GetDlgItem , well I never had. I you had let please me know.
Nibu thomas
Software Developer
|
|
|
|
|
or
m_checkbox.EnableWindow(TRUE);
yes it's same
|
|
|
|
|
"Eventyy Tspe : Fwll Wwvefwrm"
"Version : V 8.01-8.0 MiniMate Plus"
"Shmplk Reta : 1024 wps"
"avt : ret/s and "
"ueak wecter Swm : 8.41 ww/t"
"Mar 10 /06 15:38:54 Mar 10 /06 15:39:11 Event qecerded.
"
"PC SW Verqiwn : V8.01 - 8.01"
Tranw Vertw Longw
0.127 0.127 0.0
0.127 0.127 0.127
0.127 0.127 0.127
0.127 0.127 0.127
0.127 0.127 0.127
0.127 0.127 0.127
0.127 0.127 0.0
-- modified at 23:19 Wednesday 15th March, 2006
|
|
|
|
|
I know I just finished an adult beverage but I am clueless why exactly you posted this here. Is this an answer to a question that someone posted? Or did codeproject somehow mess up??
[EDIT]
Ok, I think I know what you want. You are asking how to read in data like this line by line and store the last data into a 3 dimensional array...
[/EDIT]
John
-- modified at 23:44 Wednesday 15th March, 2006
|
|
|
|
|
In treeview when the paricular expanded node is made unexpanded after then it is expanded again , it shows the duplicate node of the expanded node.
-- modified at 23:18 Wednesday 15th March, 2006
|
|
|
|
|
pankajgarg12 wrote: In treeview when the paricular expanded node is made unexpanded after then it is expanded again , it shows the duplicate node of the expanded node.
You could be doing something wrong.
Nibu thomas
Software Developer
|
|
|
|
|
|
When using the afxThread, like following articles
http://www.codeproject.com/internet/winsockintro01.asp#xx959651xx
How to call back the MFC function write in the MFC class.
I want to make a response where recevce the message.
I try to add following code in afxThread:
CTestingDlg::AddLog("Hello");
when compile it make error:
illegal call of non-static member function
Can i pass out the value or call back the function outside the afxThread ?
Thanks
|
|
|
|
|
stny2000 wrote: CTestingDlg::AddLog("Hello");
AddLog is a member function and you are accessing it as if it is a static member function.
Create an instance of CTestingDlg and then access AddLog .
Note: You will get better answers if you can post this question to the author of this article.
Nibu thomas
Software Developer
|
|
|
|
|
Hi,
This is how you should use your thread:
AfxBeginThread(YourThreadName , this);
Now , in your thread :
UINT YourThreadName(LPVOID lpvoid)
{
YourClass *dlg = (YourClass *)lpvoid;
dlg->AddLog("Hellow");
}
Regards,
Eli
|
|
|
|
|
I want to extract the icon of any file or folder .Earlier I solved this portion of treeview in vb.net using the implementation of the following API's. I want to know the implementation in VC++ 6.0
Private Declare Auto Function SHGetFileInfo Lib "shell32.dll" (ByVal pszPath As String, _
ByVal dwFileAttributes As Integer, ByRef psfi As SHFileInfo, ByVal cbFileInfo As Integer, _
ByVal uFlags As Integer) As IntPtr
-- modified at 23:16 Wednesday 15th March, 2006
|
|
|
|
|
It's the same. Loop up MSDN for SHGetFileInfo for more details.
Nibu thomas
Software Developer
|
|
|
|
|
Can I get the link for my Query in vc++ 6.0 ?
|
|
|
|
|
SHFILEINFO shfi;
memset(&shfi,0,sizeof(shfi));
SHGetFileInfo("somebmpfile.bmp",
FILE_ATTRIBUTE_NORMAL,
&shfi, sizeof(shfi),
SHGFI_ICON|SHGFI_USEFILEATTRIBUTES
);
shfi.hIcon;
Nibu thomas
Software Developer
|
|
|
|
|
|
Whats wrong with this article here that you refuse to read it?
http://www.codeproject.com/treectrl/shelltreectrl.asp[^]
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
The Problem is when I right click on the node the selection goes to previous selected node.
-- modified at 23:17 Wednesday 15th March, 2006
|
|
|
|
|
pankajgarg12 wrote: The Problem is when I right click on the node the selection goes to previous selected node.
That's how tree behaves. Left click result in selection. Right click doesn't, previous selection gets selected again.
You can use HitTest to select the particular item.
Nibu thomas
Software Developer
|
|
|
|
|
Is there any function that selects the node on right click
|
|
|
|
|
Handle NM_RCLICK ...
Use HitTest to select the item.
Nibu thomas
Software Developer
|
|
|
|
|
|
Sir,
I have an query regarding in which areas VC++ is applicable in real time systems. By using VC++ which projects was implemented.
Is VC++ is applicable for Embedded systems.
S. Suresh Kumar
|
|
|
|
|
I think VC++ is the best language for making Embedded system. You can do almost every thing using C++.
Divyang Mithaiwala
System Engineer & Software Developer
|
|
|
|
|
Sriram Suresh wrote: Is VC++ is applicable for Embedded systems.
Certainly yes.
But most probably C will be used more often.
It probably depends on what your code will run:
On a 8-Bit microcontroller or on a embedded PentiumIII equvalent with 256MB of RAM and a Harddisk.
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|