|
I have a dialog that runs on a timer to update the buttons (used like lights). The timer runs, the button values are updated, but they don't actually happen until I press them or pull a window over the top and then move it. I've tried the UpdataData() functions in different places but that doesn't work.
Any ideas?
Thanks!
|
|
|
|
|
Try with RedrawWindow .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I tried this and it does update, but it flickers like mad
|
|
|
|
|
|
Thanks for your help. I will give these a try...next week. I'm off to Tampa in a few minutes.
Thanks again!
|
|
|
|
|
Guys:
I know my program leaks memory. Win32 documentation says, the leaked memory will be acquired by win32 OS once the leaking process terminates. Is it true?
If it is so, how do I make sure that the OS 'really' acquired the leaked bytes? Is there any tool which shows the memory size before and after?
Is the "Mem Usage" in Performance tab of NT-Task Manager indicates this?
|
|
|
|
|
There is nothing you need to do to make sure. All pages assigned to your process will be released. End of story.
I guess my question is what leads you to believe pages are not getting returned? Or are you just making sure?
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
Tim:
I just want to make sure. Thats all.
Thanks for your reply.
|
|
|
|
|
It's true.
If memory size is plenty large then you can see it in Task Manager
|
|
|
|
|
right.
mIchAel Liu
__________________________________________________________
The secret of business is to know something that nobody else knows.
|
|
|
|
|
I've installed the latest MS Plateform SDK in a different directory from the directory of VC6. How can I compile my program with the latest SDK files?
Thanks.
mIchAel Liu
|
|
|
|
|
Go to Tools->Options->Directories page, add ?:\PROGRAM FILES\MICROSOFT PLATFORM SDK\INCLUDE path to directories list and move it to the top of the list.
|
|
|
|
|
|
Hello!
I read something about CDragListBox.
How can I create it?
Can I use the same member-functions as in CListBox (like GetText(), GetCurlSel(), SetCurlSel())?
Thank you very much!
Lucky2002
|
|
|
|
|
Yes you can (CDragListBox derives from CListBox .)
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hello!
But how can I create a CDragListBox?
Thank you!
Lucky2002
|
|
|
|
|
Drag and drop a listbox control in your dialog resource editor, then launch the MFC wizard (CTRL+W) and associate a control variable of type CDragListBox to the newly created control.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hello!
I´m sorry , but when I want to associate the member variable, I can only choose the type CListBox.
What must I do, that the CDragListBox-type is possible?
Thank you!
Lucky2002
|
|
|
|
|
Well, associate it a CListBox and then manually replace the type for CDragListBox in your source code.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hello!
I change the type CListBox in CDragListBox.
Before: CListBox m_ctrlListBox;
After: CDragListBox m_ctrlListBox;
It´s changed in the class wizard too.
But when I run the programm I get a debug error. It doesn´t works.
Must I change something else?
Thank you!
Lucky2002
|
|
|
|
|
Uhmmm... Check the docs, I think there' a couple of styles that must be checked for the control in order to associate to a CDragListCtrl .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Sorry, what are the docs ????
Lucky2002
|
|
|
|
|
Ok, so I'm developing a post-processing data reduction and visualization program. I have all my graph controls and UI together with custom vector templates for the control's data and all that fun stuff. But my weak point is file IO and storing the data read from the files. The files are csv and don't necessarilly contain doubles for data. Some may be hex denoted by "0xABCD1234", or may even be an enumeration. So streaming the file into my vector templates was shady. So I created a class that has the following member (among others):
#define MAX_VARS 200
#define MAX_SAMP 75000
CString m_DataArray[MAX_SAMP][MAX_VARS];
I then allocate a 'new' CSV class and put one of these things on the heap. The good news is that the data is global for all my numerical analysis tools and functions and I can manipulate it fast. The bad news is that I rarely have 200 vars and 75000 samps, so mass memory is very wasted! Even worse, when I'm under the gun to outperform Excel or PV-Wave, I may have up to .25 Million samples or more (Excel dies @ 65536 / PV-wave can't do more than 2048 chars per line)!! I tried ohter CSV classes to access row,col but with many samples the process is slow.
Anyway, I'm just probing for alternatives. I tried CStringArray but got lost because all my routines operate on 2d arrays (row,col). Any comments or advise is certainly appreciated in advance.
Thanks All.
Nitron
_________________________________________--
message sent on 100% recycled electrons.
|
|
|
|
|
Ok, this might be a solution. Use a std::vector<std::vector<std::string> > > ,which can easily grow on demand. To maintain the 2d array interface, wrap the thing into a class that provides the indexing feature:
class twodstringarray
{
std::vector<std::vector<std::string> > > data;
public:
std::string& operator()(size_t x,size_t y)
{
while(x>=data.size())data.push_back(std::vector<std::string>());
while(y>=data[x].size())data[x].push_back(""):
return data[x][y];
}
};
...
twodstringarray array;
array(100,10)="hello";
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi,
I tried to capture a WM_MOVING in a CDiaologBar subclass of mine to make it snap to the borders when in floating state.
But apparently ,if my DialogBar is floating, another Miniframe is built around my DialogBar. (or something like that)
How can I delegate the WM_MOVING message from this MiniFrame to DialogBar
without having to start all over again ? (because I really cannot afford the time)
Any help will be much appreciated.
I used to have a life ... now I have a computer
|
|
|
|