|
I am showing the Clistctrl inside my CMYview
|
|
|
|
|
Ok, but as the documentation[^] says, OnDraw is getting called whenever your view needs to be drawn (or printed). Why do you need to fill your list every time your view is drawn? Sounds like bad design to me unless there is something obvious i am missing...
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Computers are evil, EVIL i tell you!! <
|
|
|
|
|
manoharbalu wrote: I have showing a CListCtrl inside a CView.
So are you using CListView ?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Hi,
Im my dialog i have one CStatic control.Im using that to display one float varialbe and also string.I assigned float varialbe(m_fPV) and control varaible(m_cPV).
When i give float value it displays correct value.But when i set text,it doesnot display.it shows 0 only.
My coding:
DDX_Text(pDX, IDC_PVVAL, m_fPV);
DDX_Control(pDX, IDC_PVVAL, m_cPV);
if(oTagBase->GetTagType()==CONT)
m_fPV = oTagBase->GetPV();
if(oTagBase->GetTagType()==SWITCH)
m_cPV.SetWindowText("OPEN");
Anu
|
|
|
|
|
Probably there's a UpdateData somewhere that overrides your SetWindowText.
IMO skip the DDX_Text thingy.
Just use a CString , Format the text and SetWindowText it to the control.
Watched code never compiles.
|
|
|
|
|
The first assumption I'm going to make is that that block of code is in your DoDataExchange implementation. Would something a bit simpler work?
if( oTagBase->GetTagType()==CONT )
{
DDX_Text( pDX, IDC_PVVAL, m_fPV );
}
else if( oTagBase->GetTagType() == SWITCH )
{
CString text( "OPEN" );
DDX_Text( pDX, IDC_PVAL, text );
}
The advantage of this is it keeps everything consistent - you're only using one mechanism to exchange data between the edit control and the members of the dialogue box. And it removes the need to subclass anything.
[Another thing you could do is to move the comparisons into whatever class oTagBase belongs to, then you could write something like:
if( oTagBase->finite_resistance() )
{
DDX_Text( pDX, IDC_PVVAL, m_fPV );
}
else if( oTagBase->infinite_resistance() )
{
CString text( "OPEN" );
DDX_Text( pDX, IDC_PVAL, text );
}
]
Cheers,
Ash
|
|
|
|
|
Hi,
How to crop an image and save that part only.
I think this might be possible using gdi++ but I could not find.
Help needed...
|
|
|
|
|
john5632 wrote: I think this might be possible using gdi++ but I could not find.
It's all here[^] in the Bitmap class.
It's time for a new signature.
|
|
|
|
|
i am trying to load a texture file in open gl in visual c++ but i donot know that where should i keep the texture file so that i can load it in my program.can any one tell me???
|
|
|
|
|
It really depends on how your texture is going to be used. Do you plan to reuse it for multiple "nodes" ?
Usually, the best way to handle this kind of thing is to have a texture manager which loads all the textures used by your application. When you need a specific texture, you simply "ask" it to the texture manager. The texture manager then first look if it already loaded it or not. This way, you don't load the same texture multiple times.
You can have a look at my series of articles over OpenGl. The second part focuses more in details about that specific subject.
|
|
|
|
|
Hello All,
I've made a service in which i monitored whenever the user logs off or logged on system, How can i retrieve user details before shell is created, I need user details when user logs on to system, For this when i use "NetWkstaUserGetInfo" , It gives me error 997 which is "Overlapped I/O operation is in progress. " , Can someone guide me to right direction..
Regards
Ashish
|
|
|
|
|
gothic_coder wrote: I need user details...
Such as?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Such As, User name, Domain name..
|
|
|
|
|
Problem with Activex control property pages. when any of the properties are changed and next property page is clicked using tabs and oncancel button is clicked of the property sheet the properties are saved.
When property page is changed onapply is getting called automatically and DoDataExchange function is gets called and properties gets updated even after oncancel button.
Inorder to avoid this wht needs to be done.
sreenivas003@yahoo.co.in
|
|
|
|
|
hi,
1- do i create an event for a windowless project (for example, a dll project)?
2- how do i use event of an ActiveX control in my project, without using control(hwnd) of ActiveX? my project is a windowless project (it is a dll). i create object of this activeX:
myActiveX.Create(NULL, NULL, CRect(0,0,0,0),cw.FindWindow(NULL,NULL), 0);
thanx all
Zo.Naderi-Iran
|
|
|
|
|
|
Can anybody tell me how can we hook a process creation event. Basically I want to get the trigger in my application when a new application is created. So I think hooking the CreateProcess will do it for me. Can anybody show me the code snippet
Thanks in advance
Regards
Rajmohan
|
|
|
|
|
|
Yes. Thank you so much for the response
Regards
Rajmohan
|
|
|
|
|
Hi Gurus,
I used two combo boxes in a dialogue, it seems that the two combo boxes interference each other. When I tried to retrieve the value from one combo box, I got value from the other Combo box selection.
The response to SelectChange to other Combo box. How to make sure retrieve the correct value from the Combo box A, prevent from interference from Combo Box B.
What is the code to call to retrieve the value from a Comb Box selection?
Thank you
|
|
|
|
|
According to MSDN, CBN_SELCHANGE gives combo box ID in wParam. I think you can use this id to distinguish between combo boxes.
|
|
|
|
|
You add two variables for the two comboboxes.
from class wizard add the two different CBN_SELCHANGE handlers.
|
|
|
|
|
Dont bore of this 80's question...please excuse me for this...
question is very simple...
Why empty class's size is one Byte in C++???
Answer 1:suppose in case of creating array of objects of this empty class, then to distinguish them atleast 1 byte is required ... mE fedup of this answer
My Doubt for this answer : If this reason is valid then why hell in C, empty structure's size is zero... Here also anyone can create the array of objects of this empty structure.Here no neeed to distinguise. Is It ????
Answer 2: Since in C++ provides function members so like
class test
{
};
this is also empty class but by default every class has some default member's function...
test tObject1=test();
test tObject2(tObject1);
or
class test
{
public:
void fun();
};
test obj;
obj.fun();
so to call this function it may required size atleast 1 byte...
BUT I M NOT SUTE FOR WHAT REASON IN C++ THEY HAVE TAKEN 1 BYTE FOR EMPTY CLASS AND ZERO BYTE FOR C....PLEASE U CAN SHARE WHAT'S EXACT REASON????
Truth Can'nt be changed
|
|
|
|
|
asadullah ansari wrote: THEY HAVE TAKEN 1 BYTE FOR EMPTY CLASS AND ZERO BYTE FOR C
C++ != C and a C++ class is not a C struct
the C++ standard requires that all class objects have a "nonzero size".
see page 149 : http://www-d0.fnal.gov/~dladams/cxx_standard.pdf[^]
|
|
|
|
|
offcourse C != C++ ...Here offcourse C++ standard requires it so it's there
But my question is why they have made like this... Some reason should be for this...
Truth Can'nt be changed
|
|
|
|