|
Check which one you installed! SDK is Software Development Kit and is released independently of Windows. It is usually accompanied by a new compiler, and will often include functionality that is not supported on earlier versions of Windows. However you should check the MSDN pages for compatibility issues on particular functions.
It's time for a new signature.
|
|
|
|
|
I have showing a CListCtrl inside a CView.
I am adding the items using DrawItem method of CListCtrl.
When I open the view, Only one item gets added inside the List control. When I minimize or maximize the view then one by one the items are getting added.
How to correct the problem.
Please note that the items that are getting added in the list control are dynamic values which will get changed from time to time. So the changed values are to be reflected in the list control
Please help me
|
|
|
|
|
Not sure what you mean but my guess is that you don't know how to make your list control update when your values change, right? I'd say, when a value changes, call RedrawItems[^] (if you know which item belongs to which value), or simply do a RedrawWindow[^] on your list view. If your values change a lot then redrawing the list every time becomes very unefficient so you could add some delay to the updates (like, update your list only if 5 seconds has passed since the last time you redrawn it and a value has changed or somesuch).
If you do not know when exactly your values change then i guess you have to rely on polling, meaning, check the values frequently from a timer or somesuch and if you detect a change, do the drawing.
> 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!! <
|
|
|
|
|
Thanks for your support.
I am Showing the List Control inside my view class using the below code.
pAlrmListCtrl is the list control object.
In the DrawItem() function of the listcontrol I am adding the items (approx 10 items) to the list control. When I run the application only one item shows up in the list control. When I maximize and minimize the view (CMYView), the items are getting added one by one for each maximize or minimize operation.
Also when i Set break point in the DrawItem() function, the list control shows up all the items.
It seems like a refresh problem
CMYView::OnDraw()
{
// TODO: add draw code here
CRect rect;
CExperionDoc* pDoc =(CExperionDoc*)GetDocument();
GetClientRect( &rClientArea );
pAlrmListCtrl->rAlrmScreen = rClientArea;
sWindowTitle = "Process Alarm";
pDoc->SetTitle(sWindowTitle);
pAlrmListCtrl->UpDateList();
Invalidate(TRUE);
}
Kindly help me to get over this problem.
|
|
|
|
|
Why do you add items to your list where you should draw the view??
> 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!! <
|
|
|
|
|
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
|
|
|
|