|
You can open the executable with Visual C++, select open as resources, and then edit the toolbar bitmaps.
I just tried it.
|
|
|
|
|
Look at these functions:
BeginUpdateResource<br />
UpdateResource<br />
EndUpdateResource
Good luck!
|
|
|
|
|
If you're looking for a tool for the job, ResourceHacker is probably the best one out there.
Regards,
Alvaro
|
|
|
|
|
Hi all,
I implemented an ActiveX which runs fine in Debug mode.
When I compiled the project in Release mode, I got this
error message "Can't execute program".
Apparently, after the compilation process, the
myApp::InitInstace() is called which in turn calls
STDAPI DllRegisterServer(void)
{
AFX_MANAGE_STATE(_afxModuleAddrThis);
if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
return ResultFromScode(SELFREG_E_TYPELIB);
if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
return ResultFromScode(SELFREG_E_CLASS);
return NOERROR;
}
for some wild reason, It trys to run something after InitInstance.
The DllRegisterServer() function returns NOERROR.
I tried this on the command line, still got the same error:
c:>regsvr32 myActx.ocx
Does anyone know why?
Thanks
|
|
|
|
|
Try to register it with: (menu command) Tools->Register Control
or
Try to execute it from the activex control container tool
or
You still can debug it Release, goto: Project->Settings
C/C++ Tab:
Optimizations: Default
Debug Info: Program Database for Edit and Continue
Link Tab:
[x] Generate Debug Info
Good luck!
|
|
|
|
|
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
|
|
|
|