|
Hi Blake,
Thanx for your reply. Now i am implementing it only. I was just curious to know whether there is something like SetSysModalWindow. I got another new concept "GINA". i am reading it also.
Any way Thanx a lot
Sujan
|
|
|
|
|
How can I send a WM_Quit message to a process when all i have is its PID?
Ray
|
|
|
|
|
Perhaps EnumThreadWindows can help.
Don't try it, just do it!
|
|
|
|
|
Hi,
I have created a MDI sing MFC Application.
When I run the application, single empty childframe appears, which i don't want.
Only when the click the 'New' menu/Icon, a new childframe should appear.
Initially, no document should appear.
Could somebody please help me on this. I thank in advance.
Thanx
Mughi
|
|
|
|
|
Add this code to your application InitInstance() just before the call to ProcessShellCommands()
// stop a new document being created if just run normally
if (cmdInfo.m_nShellCommand == CCommandLineInfo::FileNew)
{
cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing;
}
If you vote me down, my score will only get lower
|
|
|
|
|
Thank You Roger Allen. It working perfectly.
Thanx
Mughi
|
|
|
|
|
hi!
i wrote an app which captures live video using the directshow api from a webcam. this works fine only when the hardware format is set to RGB (fourcc=0). when the fourcc is different like I420, the video of course is broken. do i need to use the ICDecompressOpen etc. methods to decomress the compressed frame from the DD buffer or is there a better way of decompressing the frames to RGB?
thanks for any hints
|
|
|
|
|
Hi,
Is there any way to get documentation about a visual c++ .dsp file?
I would like to be able to add parameters in the .DSP file. (environment variables for example)
Anyone could give me a good tutorial/link/documentation about this issue?
Thank you,
Jens
|
|
|
|
|
I've written code to read .DSP and .DSW files for ED (see sig). However I'm only interested in extracting folder and filenames and I don't write back to the files. If that's of any interest email me and I'll send you the code.
Neville Franks, Author of ED for Windows www.getsoft.com and coming soon: Surfulater www.surfulater.com
|
|
|
|
|
Hi Franks,
First of all, I am very interested in reading your code that can examine a .dsp file (.dsw is alsoo interesting).
I want to have a better look at what a .dsp contains and really needs.
Can I have your e-mail address please?
Best Regards,
Jens
|
|
|
|
|
|
I've also written code to extract info from .DSP and .DSW files (with Neville's help no less!). My code extracts the files and some of the compiler settings from the .DSP, and extracts the projects from the .DSW.
The code is on CP, in the following article:
http://www.codeproject.com/useritems/includefinder.asp[^]
If you download the source, the files you are interested in are VC6Objects.cpp/h and DSObjects.cpp/h.
Chris Richardson
|
|
|
|
|
Hi,
I wanted to add 'code' into the .DSP file.
I have set an environment variable with text in it ("mylib.lib test2.lib" etc) in it, and i want it to be added in the include list of libs in the project.
Any ideas?
Best regards,
Jens
|
|
|
|
|
Aaarrrggghhh. Recently, some users have been reporting problems with one of my massive MFC apps. Turns out it is leaking 6 HRGN handles everytime a new top-level window is opened (the program uses LOTS of CFrameWnd-derived top-level windows). Over the course of a day, some users are getting thousands of GDI handles leaked. Not good.
After much head scratching and some assistance from Google Groups, I tracked this down to a bug in Windows XP.
http://support.microsoft.com/?kbid=319740
Guess what? MS fixed this bug in XP SP1, but they have REINTRODUCED IT IN SP2!!!! Most of the XP users in our company have already upgraded to Service Pack 2 now too. Sob.
Sigh. So my users have to revert back to "Classic" mode to workaround this problem (no bad thing you might say!) which they are none too pleased about.
And, of course, as this is an MFC-specific issue, they think it is *my* fault as "other apps run fine".
I am praying for MS to release a hotfix but have no idea how I can escalate such a problem.
So fellow CPians - be warned - this bug may be affecting your MFC apps right now...
"May the seed of your loin be fruitful in the belly of your woman"
|
|
|
|
|
What a PITA. I wonder if it is possible to use the XP SP1 Uxtheme.dll mentioned in the KB.
Neville Franks, Author of ED for Windows www.getsoft.com and coming soon: Surfulater www.surfulater.com
|
|
|
|
|
I'm too chicken to try it! Sigh. The grief I am getting because of this bug...
"May the seed of your loin be fruitful in the belly of your woman"
|
|
|
|
|
|
Hello !
I would like to produce random numbers between 0 and 15. I tried to use srand and rand. So I used a similar code:
#define RAND_MAX 15 //Outside of the function<br />
srand(1);<br />
int Random = rand();<br />
But the numbers are greater than 15
How can I do that ?
Thanks
|
|
|
|
|
Just #defining your own RAND_MAX is no good. The rand() method uses the RAND_MAX that was defined when the library it was in was compiled. To get it into a particular range try something like:
int Random = rand()*(15/RAND_MAX);
The other thing to note is that if you always seed the random number generator with the same number (1 in your example), it will always generate the same sequence of pseudorandom numbers. Try something like:
srand( (unsigned)time( NULL ) );<br />
This seends the generator with a value based on the current time so it should give you different sequences.
Mike
|
|
|
|
|
Thanks
|
|
|
|
|
To produce random numbers from 0 to some predefined limit it would probably be easiest to do:
#define RAND_MAX_LIMIT 15 // Set 15 as limit for randomly generated values
srand((unsigned)time(NULL)); // Seed random number generator with current time
int Random = rand() % (RAND_MAX_LIMIT + 1); // Only generate numbers between 0 and your predefined limit
|
|
|
|
|
cedric moonen wrote:
I would like to produce random numbers between 0 and 15.
Try rand() % 16 .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi Folks,
I am searching a listbox similar to the "favorits" list in IE6. A List with buttons or hyperlinks whitch I can dynamically add and remove. I need it for a MFC-App.
Sorry, don`t have time to write it myselfe...
Anybody knows something??
Thanks, Hardy.
|
|
|
|
|
How can I transmit a xml's datas to multi-listview?TKS!give me some sourcecodes pls.tks!
|
|
|
|
|
Hello,
Quick question...
I have CDialog derived dialog and in it I start a timer in the OnInitDialog with a specific ID. I never kill that timer though when leaving the dialog.
Does anybody know if this might build up resources calling the SetTimer multiple times(with same ID!!!) without specifically killing it ever.
Does the Timer get killed when the dialog object goes out of scope?
Thx for any light on this subject..
Greetz,
Davy
|
|
|
|