|
In a part of my project, I must compile many HTML files into a single file ,I decided to choose CHM file. But how can I do this using C++? I know HTML Help workshop,but it's only a tool. I didn't get much on MSDN.I am using Visual C++ 6.0. many thanks.
Alick
|
|
|
|
|
Why dont you use HTML Help workshop but using its comand lines, this way you'll compile by code, but by issuing the right command using CreateProcess or the likes.
Check in the help for the different command lines and the one you could need
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
You can create the hhp project file (and, if you need, the contents/index files) dynamically, and then execute hhc.exe (which is the compiler, with the hhp file as argument).
Creating the .chm directly is probably a major and very painful project, just to figure out the format will take some time (there's an incomplete documentation at wotsit[^]).
(OTOH, it would make a cool CP article )
we are here to help each other get through this thing, whatever it is Vonnegut jr.
sighist || Agile Programming | doxygen
|
|
|
|
|
Hi guys. I need help, I dont even know if Im putting this in the right FORUM... but here it goes.
Ive been asked to create a Point of Sale application that can control a recipt printer and a cash register. I HAVE NO IDEA WHERE TO START. as of now I know that the printer and cash register is connected through LPT1...THATS IT!!..
please help..
Im pretty good at handling web applications and flash...so if there is anyway that I could create componets that I might be able to manage through a web application and SQL/Access database...It´d be great.
Thank you very much...
X-ZD Designs
|
|
|
|
|
The printer and register should have provided you with some sort of interface instructions (e.g., send such-and-such code to open cash drawer). Without that, how are you going to know what commands to send, and how to interpret the commands that you receive?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
>> Ive been asked to create a Point of Sale application
>> I could create componets that I might be able to manage through a web application
So you want to create a "web based" - "point of sale application"?
I'm confused
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
well. Im not stuck on the idea that it has to be web based..but I did want to use the visual benifits that FLASH can give me for this application...therefore I need to create other components (.DLLs for example) that I could control (send and recieve data) through my FLASH and save into a database for inventory, statistics and other information..
Im interested in the DLLs that can recieve and send info to the cashier, so that my web interface can know when the register is open or closed...or..so that I can OPEN the cashier through my FLASH movie..
With this I can save a log in my database of when and by who the register was opened..(I would have a previous login)
X-ZD Designs
|
|
|
|
|
I design my DirectX project like this:
CScene{
...
creat Driect3D object,
creat Driect3D device,
render()
...
}
and I need a instance of CScene in MFC framework.
There should be only one instance of CScene in the whole porject, is that right?
The question is which class I should implement the CScene? I want to get the best effciency!
Any exam code is welcome~~
Many thanks!
|
|
|
|
|
I have a derived class of CCheckListBox. I would like to prevent the checkbox from appearing on certain items in my list. I have overridden the DrawItem and MeasureItem routines, but don't want to simply just paint over the rectangle area that encompasses the checkboxes. Is there a field in the LPDRAWITEMSTRUCT that I can set to a particular value that would remove the checkbox for a particular item? If there is a solution for this, will it also remove the framework event handling of the mouse clicks in the checkbox region of the list item?
Thanks,
Bob
|
|
|
|
|
Hi all, how to open the document with the exiting MS Word Application?
I used CreateToolhelp32Snapshot() to find out whether MS Word, MS Excel, and MS Powerpoint exe files are open. Then I want to open the file ( .doc file with MSWord, .xls file with MSExcel, .ppt with MSPowerpoint) with exiting application.
I used mswApp.CreateDispatch(TEXT("Word.Application")) to open word application. But I dont want to open the application, then close it after the document is closed. I want to just open the application once.
Now I know whether the application is already open or not.
How to do the next step, open the document with application already opened?
|
|
|
|
|
|
I know about ShellExecute() and ShellExecuteEx().
However I have to format those office files (.doc,.xls,.ppt) such as formating the page setup like page size, margins, quality, paper size, etc., formating font size, and also printing out embedded objects in word document. Therefore, I have to use automation.
However, I am encountering the error in my program.
The function is marshalled to other thread
here what I do,
I have a dialog that has 3 buttons, print, stop printing, and exit.
when you click print, the program will get files name from database and send it to printer. The printer send message (window message) END_DOC when the file get printed and the program catch the message and send the next file. Meanwhile, if the user click on stop printing button, the program stop immediately.
Inorder to stop printing, I have use following code.
dlg->openApps() opens ms word, excel, and powerpoint application just simply using CreateDispatch().
dlg->closeApps() closes or quite applications.
PrintTheFile() gets the file name, and send it to printer
<br />
UINT PrintingThreadFunction(LPVOID lParam)<br />
{<br />
CMyProgDlg *dlg = (CMyProgDlg *) lParam;<br />
bool openapps = true;<br />
dlg->openApps();
while(!stopprinting)
{<br />
if(isprinting == NO)
{ <br />
dlg->PrintWordDoc() ;
}<br />
if(stopprinting == (int)YES || dlg->quite)<br />
break;<br />
} <br />
dlg->closeApps();
}<br />
<br />
<br />
void CMyProgDlg::OnBnClickedPrint()<br />
{<br />
CWinThread *printingThread; <br />
printingThread = AfxBeginThread(PrintingThreadFunction,this);
printingThread->m_bAutoDelete = FALSE;<br />
}<br />
To catch the message sent by printer I used following code.
<br />
LRESULT CMyProgDlg::OnPrinterMsg(WPARAM wParam, LPARAM lParam )<br />
{<br />
.....<br />
.....<br />
case End_DOC:<br />
PrintWordDoc();<br />
}<br />
Opening and closing office applications take 7 secs to open and 7 sec to close. I want to speed up my program by opening those applications once and close it at when user quite the program.
How to just open those applications once and open the document over and over again with exiting application (.doc with msword, .xls with excel, .ppt with powerpoint)?
thank you
|
|
|
|
|
I am trying to start an application on a remote PC with CreateProcess(), but it is executed on the local PC instead. You will see that I just call CreateProcess() putting "\\otherPC" in front of the path of the application. The code is listed below:
PROCESS_INFORMATION processInfo;
STARTUPINFO startupInfo;
GetStartupInfo(&startupInfo);
DWORD processCreationFlag=CREATE_NEW_PROCESS_GROUP|CREATE_SUSPENDED;
startupInfo.dwFlags = STARTF_USESHOWWINDOW;
startupInfo.wShowWindow = SW_SHOWNORMAL; // SW_SHOWMINIMIZED;
strcpy(startupInfo.lpDesktop, "");
startupInfo.lpTitle=NULL;
char *startingFolder=strdup("\\\\otherPC\\C\\DIM\\ImsVisualization\\bin");
char applicationName[512];
sprintf(applicationName, "%s\\iMSVisualization.exe", startingFolder);
if (CreateProcess(applicationName, NULL, NULL, NULL, true, processCreationFlag,//|CREATE_NEW_CONSOLE,
NULL, startingFolder, &startupInfo, &processInfo)==0)
{
printf("Could not start Visualization\n");
}
else printf("Visualization started successfully\n");
return 0;
|
|
|
|
|
You can't use CreateProcess() in this fashion. What you've done is run an application, that resides on another machine, on the local machine. Search CP and MSDN for RPC examples.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi,i am a newer at here.As we all know , "HINSTENCE" and "HWND" are different data types in VC++,there are two datas which defined as each of them,can i send the same value two the two datas,if can , how can i do this ?
Thanks!
|
|
|
|
|
Both HWND and HINSTANCE are handles (void*) and could be assigned the same value!?! Though for the life of me I can't see why
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fuity and sweet. I'm jelly, what am I? - David Williams (Little Britain)
|
|
|
|
|
plz can any one help me in calculating the time, that will be taken in playing the audio file using c or vc++ program.
|
|
|
|
|
Near the beginning of the file is some header information. One of the fields is the average bytes per second (i.e., sampling rate). Divide this into the size of the file to get the approximate play time. For example, the The Microsoft Sound.wav file is 135,876 bytes in size and has a sampling rate of 22.50 kHz, which yields 6.038 seconds. Opening that same file with Sound Recorder shows that it is 6.12 seconds in length. Does that help?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I need to know when a user defined time has elapsed for communication reasons.
The time is typically within the range of 1 to 20 ms.
I am fully aware of windows not being a RTOS, but that is not the problem.
My problem is that I get much better results with a PII 800MHz CPU running WinNT than with a P4 2.4GHz CPU running WinXP.
I have tried both a waitable timer solution and a multimedia timer solution with exactly the same results. There is no difference between setting the mm-timer resolution to 1 or 0.
While trying to nail this down I have created a small app that simply creates a timer and waits for it with WaitFor...() with no other threads involved.
If I set the due time to 10ms I get variations between 9 and 10ms in the PII environment, but in the P4 environment I get variations between 0 and 15ms.
I would understand if the timer event got signaled later than expected in the PII environment but this is not the case, it sometimes gets signaled long before the expected due time. Boosting process or thread priorities doesn't help.
In the original app where I discovered the problem the time differences are measured with independant hardware.
MSDN documentation about waitable timers says something like "the timer accuracy depends on the hardware capability". I just don't understand why "better" hardware performance is worse.
This is how I do it in pseudo-code:
CreateWaitableTimer
QueryPerformanceCounter
SetWaitableTimer
WaitForSingleObject
QueryPerformanceCounter
What's wrong with this picture?
How can "better" hardware and OS perform worse than older?
Is it an OS or BIOS setting I am unaware of?
Any comments are very welcome.
Thanks in advance
--
Rog
|
|
|
|
|
Maye a different crystal oscillating frequency is being used between the two machines. CPU speed is irrelevant.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
This problem is not a processor problem rather a motherboard chipset problem.
PerformanceCounter problems have been reported by other people, and are attributed to problems with certain chipsets. Specifically, some chipsets fail to carry the rollover from bit 23 into bit 24, or do so spuriously, depending on the interval between successive calls to QueryPerformanceCounter.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fuity and sweet. I'm jelly, what am I? - David Williams (Little Britain)
|
|
|
|
|
That's true.
But even if I could be exposed to such a chipset and it could be an error in the measurement method regarding my test application, it doesn't explain why the PII WinNT env. is more accurate when measuring with hardware.
Thanks anyway
--
Rog
|
|
|
|
|
I agree given that it is the same hardware (chipset) you are running the tests on.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fuity and sweet. I'm jelly, what am I? - David Williams (Little Britain)
|
|
|
|
|
HI ,
How can I Create DSN for my Database
That is for database provided with my program to user..
i wanna Create DSN through my Code is it Possible
or some other way
I m using VC++ and Access as Database.
Rely me thanx
|
|
|
|
|
Zeeshan Bilal wrote:
How can I Create DSN...
By using SQLConfigDataSource() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|