|
Isn't there a sample called donut in the SDK ?
|
|
|
|
|
I want to add text into this view without using a CHtmlEditDoc. This is what I have tried in my class which is derived from CHtmlEditView(Note the Uppercase HTML):
void CHTMLEditView::SetHTML(CString sHTML)
{
SetWindowText(sHTML);
}
Everything runs fine but the text does not show up. This function is called before I show the view. Any suggestions would be appreciated.
Matt (Padawan Learner)
|
|
|
|
|
SetWindowText has a different purpose than adding html content in the view.
Even calling SetWindowText on a CView is doubtful since there is no caption in a CView.
|
|
|
|
|
I went back to see if I could get any text into my newly created view like so:
sHTML = "this is a test";
MessageBox( sHTML );
SetDocumentHTML( sHTML );
It only updates the view if I have MessageBox( sHTML ); in there, so I need to get my view to do whatever the msg box does.
I saw a post where someone had the same problem, but I can't find it now.
Matt (Padawan Learner)
|
|
|
|
|
Tell me, please, how to make such a thing with a CListCtrl like:
I inserted some columns in my List control and you know that it is possible to change column width by a mouse. how to disable this style of list control?
|
|
|
|
|
|
Hey, I'm trying to make an Internet Explorer Toolbar but I'm having trouble installing the software I need, the ATL Object Wizard/Deskband(http://www.codeproject.com/atl/rbdeskband.asp)
I installed it to the correct directory but there is no extra menu item in the Insert menu (its supposed to be New ATL Object). I think the problem is that there is a second part to the installation instructions that I don't understand. (I also installed CWindowImpl ATL Object Wizard but I assumed that worked because it had an installer.)
The second part says "Run the RegSvr32.exe from a command prompt on RBDeskband.dll. RegSvr32 RBDeskBand" After about an hour of fooling around I finally figured out that you have to run an MS-Dos Prompt and type "Regsvr32 RBDeskBand". The thing is that to get it to work they have to be in the same folder. There is no Regsvr32 in the folder that DeskBand is installed to. I searched for Regsvr32 on my computer but I have 4 of them.
Could someone please tell me which one I use and where do I put it?? Thanks for any help!
|
|
|
|
|
Put RBDeskBand where ever you want.. Find the full path to regsvr32.. then drop to a dos prompt or run this from the start->run area (example) "c:\winnt\system32\regsvr32 c:\mypath\RBDeskBand" you may have to use a switch at the end like /i "c:\winnt\system32\regsvr32 c:\mypath\RBDeskBand /i"
Rob
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
I tried that but it still doesn't work. I placed RBDeskBand.dll in the Windows\System folder and then typed (in DOS):
Regsvr32.exe RBDeskBand.dll
Then there is a popup that says: "DLLRegisterServer in RBDeskBand.dll succeeded." The problem is that if I then double click on RegSvr32.exe it says "No DLL Specified" and there is no extra menu in VC++. I am doing this to the RegSvr32 in my Windows\System folder, is this the correct one??
|
|
|
|
|
DuFF wrote:
DLLRegisterServer in RBDeskBand.dll succeeded
That means it worked. RegSvr32 is a utility program that "registers" and "unregisters" COM/ActiveX objects by calling standard functions provided in the object DLL.
If no extra menu appears in VC++, then you've probably missed some other part of the installation process. Consult the original article, or maybe e-mail the author.
Software Zen: delete this;
|
|
|
|
|
OK, I guess it worked but the thing is that I've never been able to use the ATL Object Wizard. For some reason it is disabled on my computer. I have all the files that are used in it, anyone know why I can't use it?
|
|
|
|
|
Hi,
I have a Dialog Based appl made in VC6 and i'd like to detect the Windows Version of the computer where my appl is running... How can i do that.
Thank u very much,
Dirso.
|
|
|
|
|
|
|
How do I delete a directory and its contents? I've tried DeleteFile and SHFileOperation, but with no luck
|
|
|
|
|
|
|
bool SHCopyFile(CString ExistingFile,CString NewFile)<br />
{<br />
bool RetVal = false;<br />
SHFILEOPSTRUCT FileOp;<br />
ZeroMemory ( &FileOp, sizeof ( FileOp ) );<br />
FileOp.hwnd = theDlg->m_hWnd;<br />
FileOp.wFunc = FO_COPY;<br />
<br />
FileOp.pFrom = new char[300];<br />
strcpy((char*)FileOp.pFrom,ExistingFile.GetBuffer());<br />
ExistingFile.ReleaseBuffer();<br />
<br />
FileOp.pTo = new char[300];<br />
strcpy((char*)FileOp.pTo,NewFile.GetBuffer());<br />
NewFile.ReleaseBuffer();<br />
<br />
if(SHFileOperation(&FileOp) == 0)<br />
RetVal = true;<br />
else<br />
RetVal = false;<br />
<br />
delete FileOp.pFrom;<br />
delete FileOp.pTo;<br />
return RetVal;<br />
}
This is the copy code, but the delete code is just like it (except for wFunc and pTo). Actually, I can't get this function to work, either; am I doing something wrong with allocating pFrom and pTo?
|
|
|
|
|
|
If I do FileOp.pFrom = "d:\\testdir", it works, but if I do FileOp.pFrom = Dir.GetBuffer() it doesn't work, even though Dir=d:\testdir!
Also, I've been fiddling with the copy operation:
bool SHCopyFile(CString ExistingFile,CString NewFile)<br />
{<br />
bool RetBool = false;<br />
SHFILEOPSTRUCT FileOp;<br />
ZeroMemory ( &FileOp, sizeof ( FileOp ) );<br />
if(theDlg != NULL)<br />
FileOp.hwnd = theDlg->m_hWnd;<br />
FileOp.wFunc = FO_COPY;<br />
<br />
FileOp.pFrom = "d:\\test.zip";
ExistingFile.ReleaseBuffer();<br />
<br />
FileOp.pTo = NewFile.GetBuffer();<br />
NewFile.ReleaseBuffer();<br />
<br />
int RetVal = SHFileOperation(&FileOp);<br />
if(RetVal == 0)<br />
RetBool = true;<br />
else<br />
RetBool = false;<br />
<br />
return RetBool;<br />
}
If FileOp.pFrom ="d:\\test.zip", it works, but if I use ExistingFile, it doesn't. It works fine with FileOp.pTo = NewFile.GetBuffer(), though, if pFrom = "d:\\test.zip"!
|
|
|
|
|
Read the SHFileOperation() docs carefully, pFrom and pTo have to be double null terminated strings. Fill the arrays you allocate for pFrom and pTo with zeros.
--Mike--
THERE IS NO THERE IS NO BUT THERE IS
MAGIC PIXIE DUST BUSINESS GENIE CODE PROJECT
Homepage | RightClick-Encrypt | 1ClickPicGrabber
"Which comes first, the bug or the stress?" -- Chris Maunder
|
|
|
|
|
Ok, that works, but now I can't call delete on anything because of "HEAP[FLModManager.exe]: Heap block at 003F2CB8 modified at 003F2E10 past requested size of 150"
My code:
bool SHCopyFile(CString ExistingFile,CString NewFile)<br />
{<br />
bool RetBool = false;<br />
SHFILEOPSTRUCT FileOp;<br />
ZeroMemory ( &FileOp, sizeof ( FileOp ) );<br />
if(theDlg != NULL)<br />
FileOp.hwnd = theDlg->m_hWnd;<br />
FileOp.wFunc = FO_COPY;<br />
<br />
FileOp.pFrom = new char[300];<br />
strset((char*)FileOp.pFrom,0);<br />
strcpy((char*)FileOp.pFrom,ExistingFile.GetBuffer());<br />
ExistingFile.ReleaseBuffer();<br />
<br />
FileOp.pTo = new char[300];<br />
strset((char*)FileOp.pTo,0);<br />
strcpy((char*)FileOp.pTo,NewFile.GetBuffer());<br />
NewFile.ReleaseBuffer();<br />
<br />
int RetVal = SHFileOperation(&FileOp);<br />
if(RetVal == 0)<br />
RetBool = true;<br />
else<br />
RetBool = false;<br />
<br />
return RetBool;<br />
}
|
|
|
|
|
Use memset() instead of strset()
--Mike--
THERE IS NO THERE IS NO BUT THERE IS
MAGIC PIXIE DUST BUSINESS GENIE CODE PROJECT
Homepage | RightClick-Encrypt | 1ClickPicGrabber
"Which comes first, the bug or the stress?" -- Chris Maunder
|
|
|
|
|
|
why????????
|
|
|
|