|
Hi,
I have a DIALOG BOX(1) that calls other dialog box(2). Any change in the called dialog box(2) will affect the initial DIALOG BOX(1). So, when I open the DIALOG BOX(1), and call dialog box(2), DIALOG BOX(1) will be behind the dialog box(2).The problem is, when some changes is made on the dialog box(2), the DIALOG BOX(1) do not change immediately. I have to reopen the DIALOG BOX(1) to see the changes made previously. I think this is something about "redraw" the DIALOG BOX(1) immediately after the changes is made on dialog box(2) or some other thing on how to update the DIALOG BOX(1) immediately after dialog box(2) is closed. Is there any possible way for me to solve this problem?
I'm still learning...
|
|
|
|
|
if Dialog2 is modal (you launch it with DoModal), then there's no (easy) way to do this.
what you really want is for Dialog2 to be "modeless". that's a whole other set of problems. but, if you need the functionality you describe, it's the best way to do it.
there are modeless dialog examples on CP. look in the "dialog" section.
-c
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|
|
I made this macro in VC++ 6:
Sub Temp()
Set Doc = ActiveDocument.Selection
Set FSO = CreateObject("Scripting.FileSystemObject")
End Sub
When I try to run it, I get "ActiveX component can't create object Scripting.FileSystemObject".
What to do? =(.
Vitaly Belman
|
|
|
|
|
that's not VC++
-c
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|
|
Ehm, where would you put it then?? That's neither VB cuz in Visual Basic the same line works fine. The question applies only to VC++ macros.
Vitaly Belman
|
|
|
|
|
ohh... it's an IDE macro?
that's different, i guess.
-c
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|
|
Is there source code available that shows how to append two wave (.wav) files, and how can information be extracted from a wave file (similar to the wavread and wavwrite functions in Matlab)
|
|
|
|
|
The wav format is a file format, which may contain several sound formats or encoding (one per file). That's why adding two wav file may need a conversion between two different sound formats, with a different sample frequencies and with different sample sizes. That's why it's not that easy to concatenate wav files.
You may find nice info about wav format at www.tsp.ece.mcgill.ca/Docs/AudioFormats/WAVE/WAVE.html
HTH,
We do not inherit the Earth from our ancestors. We borrow it from our children.
Antoine de Saint Exupéry (1900-1944)
|
|
|
|
|
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
|
|
|
|