|
Thanks Ernest,
Debugging the release version won't help.
I register the activex on the command line as follows:
c:>regsvr32.exe myActX.ocx
The result was successfull. Right after that, regsvr32
trys to run something else. Then the MsDev pops up along
with the popup window with the error message:
"Cannot execute program"
It only happens when I try to build a release version.
The strange thing is It never happens in debug version don't know why
|
|
|
|
|
Can you see your control with the "ActiveX Control Container Test" program?
"Microsoft Visual Studio\Common\Tools\tstcon32.exe". If it works, your problem
is caused by something else. And check carefully the path of the control.
click "New control" toolbar button.
|
|
|
|
|
Yes, I can see the ActiveX control in "ActiveX Control Container Test".
It works and the path of the control is also correct.
The client test program is also working. The regsvr32.exe does
install/uninstall the ActiveX. The BUG (perhaps not a good choice of word
for today ) appears right after install/uninstall the ActiveX.
Thanks for your inputs.
|
|
|
|
|
Problem solved !
|
|
|
|
|
I'm developing a custom application to Capture Sequences.
I'm using Videofor Windows Macro to capture sequences.
I'm istalled a matrox Marvel G450eTv.
I Need to select runTime,before capture startes, the videoCompression to use:I know that there is the capDlgVideoCompression macro....but this is not good for my application.I need to select video Compression Through a different method such as special functions or silmilar solutions.
anybody know how can I do this???
thanks
DIEGO
|
|
|
|
|
Select codec by it's name in silence:
VidCap1.Compressor = "h263"
http://www.banasoft.net/AVPhone.htm
|
|
|
|
|
Hi, all, I want to read text files for processing in my CRichEditView text editor. If I don't set the attribute m_bRTF to FALSE when loading, it can't read other text files besides my own. How to test for other text files?
|
|
|
|
|
rtf files are, of course, text files. There is nothing absolutely definitive. There are some 99.9999% tests you can use.
Here is a sample of an rtf file. (it contains a string of 10 "a" characters. you could check for some of the first chars maybe "{\rtf" would be specific enough and yet general enough for all versions. I don't know if there are files with {\rft0 or {\rtf2.
{\rtf1\ansi\ansicpg1252\uc1 \deff0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman{\*\falt Times};}{\f55\froman\fcharset238\fprq2 Times New Roman CE{\*\falt Times};}
{\f56\froman\fcharset204\fprq2 Times New Roman Cyr{\*\falt Times};}{\f58\froman\fcharset161\fprq2 Times New Roman Greek{\*\falt Times};}{\f59\froman\fcharset162\fprq2 Times New Roman Tur{\*\falt Times};}
{\f60\froman\fcharset186\fprq2 Times New Roman Baltic{\*\falt Times};}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;
\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{
\nowidctlpar\widctlpar\adjustright \fs20\cgrid \snext0 Normal;}{\*\cs10 \additive Default Paragraph Font;}}{\info{\title sfdsdfsdsdfsdff}{\author WilsonB5}{\operator WilsonB5}{\creatim\yr2001\mo12\dy12\hr15\min41}{\revtim\yr2001\mo12\dy12\hr15\min42}
{\version2}{\edmins0}{\nofpages1}{\nofwords0}{\nofchars0}{\*\company }{\nofcharsws0}{\vern71}}\widowctrl\ftnbj\aenddoc\formshade\viewkind4\viewscale110\pgbrdrhead\pgbrdrfoot \fet0\sectd \linex0\endnhere\sectdefaultcl {\*\pnseclvl1
\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}{\*\pnseclvl5
\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang
{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {aaaaaaaaaa
\par }}
Hope this helps,
Bill
|
|
|
|
|
Hi folks,
my newest, coolest app uses a property sheet to expose some settings. Due to an action in one page (or s.th. like apply button in the sheet itself) I'd like to insert/remove an other property page.
I'd be good also if there is some way to hide (and display) a property page ...
Thanks for your help!
Thomas
|
|
|
|
|
Well, if the property sheet inserted/removed is always the last one, you can get by using AddPage and RemovePage , but I guess you had already figured that out...
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Joaquin,
thank your for your quick suggestion . The page in question *is* the last one on the sheet, but it won't work:
CMyPropertySheet::OnSomeMessage(......)
{
RemovePage(&m_myPage);
AddPage(&m_myPage);
}
The RemoveMessage function destroys the property page, and AddPage isn't enough to have the page created: I get an empty property sheet, all controls on it are not visible/created
|
|
|
|
|
mumble mumble... Maybe you should use a fresh CPropertyPage each time, like this:
CMyPropertySheet::OnSomeMessage(......)
{
RemovePage(m_pMyPage);
delete m_pMyPage;
m_pMyPage=new CMyPropertyPage();
AddPage(m_pMyPage);
} Why don't you try this and tell us if it works?
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Joaquín,
thank you, that was the right trick. Once the property page has been created (OnInitDialog is done) you cannot RemovePage it and reuse the same object instance.
Thomas
|
|
|
|
|
Hi folx!
I have a huge problem: On the one hand I have a open CFile object and on the other hand I have a library that decodes data from and encodes data into files with fread/fwrite aso.
So for a short example the following code fragment should be enough to imagine this...
CFile file("FileName",CFile::modeRead);
FILE *stream = ... // <- what do I have to write to convert a CFile into a FILE* ???
fread( buffer, size, count, stream );
.
.
Same in writeing a file!
I would be very lucky, if someone has an idea, what I can do!
(Best Regards,)
Patrick Hoffmann
-------------------------------------------------------------------------------
Technical and Operations Manager, System Analyst, Software Architect
PGP: http://www.novacom.net/pgp/PatrickHoffmann.asc
-------------------------------------------------------------------------------
veturo, der kostenlose NOVACOM Routenplaner für Europa... http://www.veturo.de
--------------------------------------------------------------------------
|
|
|
|
|
|
Hi.
I was wondering how to:
1) hide what a user types, but still read the keys.
I am working on a program that is involves password protection. I need a way to asks for the pass, but not display it openly just when logging onto any OS. A good example is logging onto linux. It asks for the password, but it does not display what the user enters.
2) code a counter that uses the clock as a seed.
For example let say this is the code:
cout << "testing";
cout << "1 ";
------------------3 second delay
cout << "2 ";
------------------3 second delay
cout << "3 ";
In other word, is there a way to code some type of delay or counter?
Thanks,
Kuphryn
|
|
|
|
|
1) Check this thread on CodeProject from some weeks ago, which discusses the subject.
2) I don't quite get your question. If you want to insert delays among outputs to cout , you can simply write:
cout<<"1 "<<flush;
Sleep(3000);
cout<<"2 "<<flush;
Sleep(3000);
cout<<"3"<<flush; but I guess you're looking for something else.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
How can I execute a file programatically, and not continue until it has returned (i.e. the program ends)?
Thank you,
Russell McCurly
Hobbiest Programmer
|
|
|
|
|
Do a WaitForSingleObject() on the hProcess handle returned by CreateProcess() inside the PROCESS_INFORMATION structure.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
If I remember correctly, you take the process handle returned by CreateProcess and use it to call WaitForSingleObject, which will wait until the process ends or a certain amount of time has elapsed.
Regards,
Alvaro
|
|
|
|
|
I am sure you know the answer but you were too quick to send a message.
Here's the answer:
When you call CreateProcess , use PROCESS_INFORMATION
to have the handle of process or thread and call WaitForSingleObject .
on the process (or thread if you want).
|
|
|
|
|
Thank you all three of you, that helped me.
Cheers,
Russell McCurly
Hobbiest Programmer
|
|
|
|
|
Hello Folks!
I have a button on a dialog to which I want to add a bitmap to. I have no problems doing this by calling this code:
hbit = (HBITMAP) LoadBitmap ( hinst, MAKEINTRESOURCE ( IDB_ASSET ) );
SendDlgItemMessage ( hwnd, ASSET_BUTTON, BM_SETIMAGE, (WPARAM) IMAGE_BITMAP, LPARAM) hbit );
Is there anyway to setup a transparency mask on this bitmap such that the background color will be the same color as the dialog itself?
I myself have a color scheme on my desktop, and the bitmap button looks horrible, you see the grey background.
Any thoughts? I know you can do this on imagelists and stuff...
Mike.
doner@obtain.com
|
|
|
|
|
You might want to consider using Davide Calabro's CButtonST class, which seems to have almost everything anyone has ever dreamt about button controls.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
If you override OnCtlColor you can return a NULL_BRUSH for that button when its being drawn. Might help...
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
CBrush br;
if(pWnd->GetDlgCtrlID() == IDC_MYBUTTON) {
br.CreateStockObject(NULL_BRUSH);
return br;
}
later...
Actually, now that I think of it you still have the transparency prob - (I do this for icons on buttons) - guess your best bet is ::LoadImage instead of LoadBitmap...
|
|
|
|