|
tx.
if the sampling rate and the bits per sampling is the same for both files, wouldn't it then be easier to concatenate?
|
|
|
|
|
Hi,
I got this modeless Dialog wich is created as a child of the main Frame ?
How can I make this Dialog always have the same focus as the Parent ? (the CMainFrame)
thx & greetz
I used to have a life ... now I have a computer
|
|
|
|
|
If you mean, you don't want the modeless dialog to always be on top of the main frame window, then I can help you, else I guess I havent understood what you meant :-
Read - http://www.codeproject.com/dialog/gettingmodeless.asp
and scroll down to the scetion titled as "The parent issue"
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
Hi,
I use some basic MSHTML interfaces for HTML parsing which are already present in IE 4, too. I tested my project on W2k/IE 5. Can there be any problems on XP/IE 6 when I don't use the latest platform SDK for my VC project?
Thanks
BC
|
|
|
|
|
I should not give you any problems when you use an old platform sdk...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
OK so I have my project open and im looking at the current file and on the left is my workspace. Workspace has three tabs
ClassView
ResourceView
FileView
Sometimes, it appears random but im sure its something im doing, one of my classes dissapears from the ClassView. The #include files are still there and everything compiles fine I just cant see the class in the workspace. This also causes the wonderfull shortcuts where you type -> or . to access member functions to no longer work forcing me to look up class definitions of many libraries. Why does this happen and how can I stop it?
Eric
|
|
|
|
|
Install Visual Assist. It will help with the . -> thing, and even turn . into -> where needed ( no good for smart pointers ).
Christian
come on all you MS suckups, defend your sugar-daddy now. - Chris Losinger - 11/07/2002
|
|
|
|
|
Thanks for your help Chris
|
|
|
|
|
This problem comes from a bad update of the .ncb file.
Send me a mail, and i´ll mail you back the OpenVC dll which installs an add-in in VC++ (a button which erases .NCB file and reopens your windows). It is very easy to do, and kicks ass.
~RaGE();
|
|
|
|
|
This is what I use...
BOOL DoEvents()
{
MSG msg;
while ( ::PeekMessage( &msg, NULL, 0, 0, PM_NOREMOVE ) )
{
if ( !AfxGetApp()->PumpMessage( ) )
{
::PostQuitMessage( 1 );
return FALSE;
}
}
LONG lIdle = 0;
while (AfxGetApp()->OnIdle(lIdle++ ) )
;
return TRUE;
}
|
|
|
|
|
Is there any simple method to convert from double to CString(i have seen _ecvt(),_gcvt(),_fcvt() but too complex )i need something like Javas .toString(1234.4432) method.
THANX
|
|
|
|
|
Check for the Format member function for CString s.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Ok, here's the deal.
I got an "array" of 60 normal variables
and a separate "array" of 10 filler (fake) variables
I need to go through the "array" of 60 and
as I do I need to randomly place all the variables
of the "array" of 10 between some of those of the first array
if I just do something like if(rand()%(60/10))
use normal;
else
use filler;
I might not get all ten variable in. What algorythm should I use
to randomly run each of the 10 variables between the 60 normal ones, and to make sure I do not get a systematic large chunk of normal variables?
P.S. I don't know if what I said is very clear, sorry about that....
|
|
|
|
|
Something like this should work:
int fillers_used=0;
for(int i=n;i<60;++i){
if(fillers_used<10 && rand()%((60-i)/(10-fillers_used))) {
}
else{
++fillers_used;
}
}
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thanks a lot...
but this way wouldn't the frequency of the filler used be increased as I go through the array?
(nnnnnnnnfnnnnnnnfnnnnnfnnnnfnnfnnff)?
|
|
|
|
|
Well there's a deficiency due to truncation problems, I guess you should use something like this instead:
static double rand01()
{
int r;
while((r=rand())==RAND_MAX);
return (double)rand/RAND_MAX;
}
...
if(rand01()<(double)(10-fillers_used)/(60-i)){
... Apart from this, the process is unbiased. To prove this, we can use a little probability. Let's call Pn the probability that the process uses a filler value at position n. Also, let p=10/60, q=1-(10/60).Then:
P0 = 10/60
P1 = P0·(9/59)+(1-P0)·(10/59) = (10/60)·(9/59)+(50/60)·(10/59) = 590/3540 = 10/60
Pn = pn·((10-n)/(60-n)) + pn-1·q·((10-(n-1))/(60-n)) + ··· + qn·(10/(60-n))
It can be formally proven that Pn = 10/60 for every n, but also a small test program doing the calculations will convince you.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I have an application written in MFC. The document data of the application contains the File Preview as form of Bitmap.
I show the File Preview in the File Open dialog of my application.
Now I want to enhance this to show the Thumbnail File Preview when the user selects the File in Windows Explorer. This is similar to what the .BMP & .JPEG File does. How can I make the OS aware and as to where the OS can look the File Preview in the File.
Thanks
|
|
|
|
|
"thumbnail preview" is based on .HTT template and a preview activeX. There's a good article on MSDN about this. Have a look to "More Windows 2000 UI Goodies: Extending Explorer Views by Customizing Hypertext Template Files" , msdn.microsoft.com/msdnmag/issues/0600/w2kui2/w2kui2.asp
HTH,
We do not inherit the Earth from our ancestors. We borrow it from our children.
Antoine de Saint Exupéry (1900-1944)
|
|
|
|
|
Thanks Karl.
I shall investigate & let you know after I have implemented it.
|
|
|
|
|
ok I have a pointer to a COblist
CObList* m_Unsorted_Members = GetDocument()->Get_Unsorted();
and im inserting members of the class State. The State Class is inherited from CObject since CObList only takes CObject type.
Container = new State(Name, Loc, pop, area);
m_Bookmark = m_Unsorted_Members->AddTail(Container);
all is good
however when I try and retrieve a member from the list
State* pObject = m_Unsorted_Members->GetAt(m_Bookmark);
I get an error saying that it cant convert from type CObject* to State*
Why is GetAt(m_Bookmark) not returning the same type that I inserted and instead is returning the base class?
thanks in advance,
Eric
|
|
|
|
|
Ok I just fixed my own problem (about 2 min after I wrote this post of course)
needed to add
State* pObject = (State*) m_Unsorted_Members->GetAt(m_Bookmark);
Is that extra code converting from base class to child class? I dont exactly understand the functionality of it.
Either way code works now
|
|
|
|
|
Instead of using CObList directly, you should use CTypedPtrList to make the list typesafe. You can put any pointer which is derived from CObject into a CObList. You also need to cast the value when you take it out of a CObList (which again could lead to errors if the actual pointer is not the type that you are casting it to).
To use CTypedPtrList to contain pointers to State objects, you can declare it as follows:
CTypedPtrList<CObList,State *> stateList;
This list works the same as CObList, except that you can only put State * objects into the list, and any objects you get from the list are State * objects.
So, this works:
m_Bookmark = stateList.AddTail( new State(Name,Loc,pop,area) );
And, this works:
State *pObject = stateList.GetAt( m_Bookmark ); // note: no cast
Best regards,
John
|
|
|
|
|
Thanks for your response. The reason I chose not to make the list typesafe is because I am under the impression that it is more dificult to perform serialization on lists of it is a CTypedPtrList. This is my first time performing serialization using MFC's DOC/VIEW structure as opposed to straight writing to text files.
Was my information correct or is serialization identical for both types of lists?
|
|
|
|
|
You should have no problems with serialization of CTypedPtrList. It is a simple wrapper class for whatever list type is passed as the first argument. Since CObList is being passed as the first argument, it supports serialization the same way as CObList. If you passed a CPtrList as the first argument, it wouldn't support serialization, as serialization isn't supported by CPtrList.
Best regards,
John
|
|
|
|
|
uh whats OLE? whats does it mean? whats the concept? in short: what is it????
I see a lot about OLE controls and all but whats specific about OLE? and is it good?
Kuniva
--------------------------------------------
|
|
|
|