|
You must to use Ole Automation.
Is Easy, you only must to open the file, and then make a SaveAs in HTML Format...
Best Regards
Carlos Antollini.
Pi Five[^]Creator
Sonork ID 100.10529 cantollini
|
|
|
|
|
Thank You for your reply.
I want do it without user-interact(run-time), therefore I can't use way "SaveAs in HTML Format".
I'm right? If not, please, explain me, how do it.
Regards.
Thak You.
|
|
|
|
|
No Problem, The save As doesn't display a dialog, only is a method where you inform the name and the type of the file....
Best Regards
Carlos Antollini.
Pi Five[^]Creator
Sonork ID 100.10529 cantollini
|
|
|
|
|
Thanks, Carlos.
I'll try it.
Regards.
|
|
|
|
|
Hi Guys,
I created a simple dialog based application in VC++ 6 via application wizard.
The dialog class is derived from CDialog. But here i want to use multiple inheritance.
I want my dialog class to be derived from one more class CStringParser i.e:
class CTestDlg : public CDialog, private CStringParser
{
public:
CTest123Dlg(CWnd* pParent = NULL);
private:
int ProcessCommand(
const std::String &inputBuffer);
}
CStringParser class provided a pure virtual function interface
int ProcessCommand(<br />
const std::String &inputBuffer)=0; that i needed to implement inside dialog class.
Every think working fine, but when i run application, an error occured. The error dialog
show me that "Exception Break Point occur"
Can any one tell me how can i get rid of this error ????
|
|
|
|
|
Already runned your app in debug mode ? What caused the exception to happen ?
~RaGE();
|
|
|
|
|
hi,
if i have an application, using windows explorer style(consist of left pane and right pane), i want to create a button in the toolbar that delete a selected/highlighted item in either left pane or right pane(can't delete both at the same time).. can this be done? or should i just use 2 buttons instead(one button for deleting items in leftpane and another one for deleting items in right pane).. thx in advance!
|
|
|
|
|
You only need one button (think about the copy/cut/paste button in windows explorer, they may be used in both left and right panes).
I do not know much about MDI (since I've developped only few such app till now), but with GetActiveView , you should be able to grab the view whith the item currently selected when hitting your remove button.
~RaGE();
|
|
|
|
|
Is there a way to create a wizard like the installation wizard that you see for commercial programs?
|
|
|
|
|
Yep. Throw an eye on the CPropertySheet and CPropertyPage classes, these can be customized to appear like a wizard.
~RaGE();
|
|
|
|
|
Thanks a lot a should do that
freezing like hell this morning, hate when it snows...
|
|
|
|
|
use CPropertySheetEx and CPropertyPageEx
that will help you to create office 97 type wizard..perfect look !!!
~CodeTheDreams~
|
|
|
|
|
This is the code that I use in order to backup the little documents used by my programs into a 3 1/2 floppy.
It's placed in a separate thread in order to avoid the hanging effect that produces a long operation and it works perfect while the floppy disk is in the drive.
The problems appear when somebody takes out the floppy disk while the copy operation is taking place.
Here's the code that I use (if you want you can take a look at it in order to see what I can have missed)
ireturn = CopyFile(csFullPathSource, csFullPathDestination, FALSE);
if (ireturn == 0)
{
iErrors++;
csAuxiliar += " : registrado error en éste proceso";
bTrobatError = true;
}
dwFileSize = GetFileSize(hLog,NULL);
SetFilePointer (hLog, dwFileSize, NULL, FILE_BEGIN);
WriteFile(hLog,
csLog,
strlen(csLog),
&dwNBWritten,
NULL);
CloseHandle(hLog);
csLog.ReleaseBuffer(0);
Thank you in advance.
|
|
|
|
|
If you get an exception when the user removes the floppy, just intercept it in a try{} catch{} routine.
~RaGE();
|
|
|
|
|
I'm not sure what you're trying to say. Does CopyFile return an error code when the disk is removed whilst it's being written to, or are you saying that no error is recieved?
One problem may be that you don't seem to have any error checking on the part that writes the log file to disk (as this will obviously fail if there is no disk in the drive)
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
What´s the definition of hLog´? i´m trying to test it...;)
|
|
|
|
|
HANDLE hLog = NULL;
DWORD dwFileSize = 0;
DWORD dwNBWritten = 0;
DWORD dwErrorCopia = 0
Here you have it...
Thank you for your interest...
|
|
|
|
|
Thanks I will try it
|
|
|
|
|
Hi!!
I have written an application which uses a pointer variable being imported from a dll. The problem is that while debugging there is no problem but when I try to execute the application from command line, it gives invalid memory access error when the imported variable from the dll is accessed. Can any body tell me why this is happening?
Thanks in advance
Shaunak
|
|
|
|
|
Hi,
I am trying to use the static library which is having 4 to 5 functions.In
project settings-link tab i gave the library name and i included the header
files also.In spite of that it is giving this linker error.
What to do next.pl help
IPAddr.obj : error LNK2001: unresolved external symbol "struct value_pair *
__cdecl get_data(char * *,int)" (?get_data@@YAPAUvalue_pair@@PAPADH@Z)
|
|
|
|
|
Try to add the following declaration:
extern struct value_pair * __cdecl get_data(char * *,int);
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
suresh_sathya wrote:
What to do next.pl
I'm sorry, but this isn't a perl forum.
As for your linker error: the linker clearly states it can't find a definition of the (C++ linkage) function. Just a guess, but the lib is a C lib, and the header file declaring this function is missing the needed extern "C" declaration?
#ifdef __cplusplus
extern "C" {
#endif
...
#ifdef __cplusplus
} /* extern "C" */
#endif
|
|
|
|
|
I am playing around the Rectanle object.First I am playing horizontally then vertically.How to increase the speed of Emf files play? I am sending small piece of code.
for(j=1;j<=i;j++)
{
SetRect( &rect1,a,c,a+ezpn_frame_edge,c+ezpn_frame_edge);
// Draw the picture.
pDC->SetStretchBltMode(COLORONCOLOR );
pDC->PlayMetaFile(hemf,&rect1);
SetRect( &rect1,a,d,a+ezpn_frame_edge,d+ezpn_frame_edge);
// Draw the picture.
pDC->SetStretchBltMode(COLORONCOLOR );
pDC->PlayMetaFile(hemf,&rect1);
a+=(ezpn_frame_edge);
a+=ezpn_frame_space;
a-=1;
}
|
|
|
|
|
Hi, everyone!
I am reading a simple class (less than 3K) that encapsulates
WIN32 thread API, I have attached the source codes
as the attachment of the post.
Such are my questions:
1. in function _Entry, what is the function of
the statement? I have known the usage of TLS but
do not know why the class use TLS here.
--------
TlsSetValue(sThreadStorageIndex, theThread)
--------
in function GetCurrent, what is the function of
the statement?
--------
TlsGetValue(sThreadStorageIndex)
--------
2. How to use this class? Can you give me a sample?
Thanks in advance,
George
|
|
|
|
|
Source codes:
class OSThread
{
public:
//
// Call before calling any other OSThread function
static void Initialize();
OSThread();
virtual ~OSThread();
//
// Derived classes must implement their own entry function
virtual void Entry() = 0;
void Start();
static void ThreadYield();
static void Sleep(UInt32 inMsec);
void Join();
void SendStopRequest() { fStopRequested = true; }
Bool16 IsStopRequested() { return fStopRequested; }
void StopAndWaitForThread();
void* GetThreadData() { return fThreadData; }
void SetThreadData(void* inThreadData) { fThreadData = inThreadData; }
// As a convienence to higher levels, each thread has its own date buffer
DateBuffer* GetDateBuffer() { return &fDateBuffer; }
static void* GetMainThreadData() { return sMainThreadData; }
static void SetMainThreadData(void* inData) { sMainThreadData = inData; }
static OSThread* GetCurrent();
private:
static DWORD sThreadStorageIndex;
Bool16 fStopRequested;
Bool16 fJoined;
HANDLE fThreadID;
static unsigned int WINAPI _Entry(LPVOID inThread);
};
void* OSThread::sMainThreadData = NULL;
DWORD OSThread::sThreadStorageIndex = 0;
void OSThread::Initialize()
{
sThreadStorageIndex = ::TlsAlloc();
Assert(sThreadStorageIndex >= 0);
}
OSThread::OSThread()
: fStopRequested(false),
fJoined(false),
fThreadData(NULL)
{
}
OSThread::~OSThread()
{
this->StopAndWaitForThread();
}
void OSThread::Start()
{
unsigned int theId = 0; // We don't care about the identifier
fThreadID = (HANDLE)_beginthreadex( NULL, // Inherit security
0, // Inherit stack size
_Entry, // Entry function
(void*)this, // Entry arg
0, // Begin executing immediately
&theId );
Assert(fThreadID != NULL);
}
void OSThread::StopAndWaitForThread()
{
fStopRequested = true;
if (!fJoined)
Join();
}
void OSThread::Join()
{
// What we're trying to do is allow the thread we want to delete to complete
// running. So we wait for it to stop.
Assert(!fJoined);
fJoined = true;
DWORD theErr = ::WaitForSingleObject(fThreadID, INFINITE);
Assert(theErr == WAIT_OBJECT_0);
}
void OSThread::Sleep(UInt32 inMsec)
{
::Sleep(inMsec);
}
unsigned int WINAPI OSThread::_Entry(LPVOID inThread)
{
OSThread* theThread = (OSThread*)inThread;
bool theErr = ::TlsSetValue(sThreadStorageIndex, theThread);
Assert(theErr == TRUE);
// Run the thread
theThread->Entry();
return NULL;
}
OSThread* OSThread::GetCurrent()
{
return (OSThread *)::TlsGetValue(sThreadStorageIndex);
}
|
|
|
|