>>u facing this problem even if you try to add resource using resource-id ??
Not clear to me
What it does mean?
btw what is the solution ?
Main Topics
Browse All Topics
Hi
I am trying to add html pages from one application-myModifierApp to myReaderApp
using UpdateResource functions.
myReaderApp's view class is derived from CHTMLView class.
With it are included some pages which run quite fine.
Problem 1
THe problem is when I am adding html say price.html from myModifierApp to myReaderApp
all the existing resources of myReaderApp are deleted and only price pages is added.
Problem 2
Then the reader application does not run. Show me the Msg as "Unrecognised Document Format"
Problem 3
I have modifed the myReaderApp to read price.html page
on its OnInitialUpdate Function
as
void my1stAppView::OnInitialUpd
{
CHtmlView::OnInitialUpdate
// TODO: This code navigates to a popular spot on the web.
LoadFromResource ("PRICE");
}
Show me the Msg as "Unrecognised Document Format"
What is the solution.?
Below is the code to add html resouces
--------------------------
void CMod2Dlg::OnButton1()
{
// TODO: Add your control notification handler code here
HANDLE hFile;
DWORD dwFileSize,dwBytesRead;
LPBYTE lpBuffer;
hFile = CreateFile("C:\\price.html
FILE_SHARE_READ,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
NULL);
if (hFile != INVALID_HANDLE_VALUE)
{
// GET FILE SIZE
dwFileSize=GetFileSize(hFi
// GET THE BUFFET SIZE
lpBuffer= new BYTE[dwFileSize];
// READ FILE INTO tTHE BUFFER
if(ReadFile(hFile,lpBuffer
{
}
//relase the file
CloseHandle(hFile);
}
//Add the File to FirstApp
HANDLE hWnd;
hWnd=BeginUpdateResource("
if (hWnd!=NULL)
{
if( UpdateResource(hWnd,RT_HTM
{
EndUpdateResource(hWnd, FALSE);
}
else
{
MessageBox("Failed to Add The File");
}
}
}
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Hi
It it not happening with makeintresource(130) macro in updateResource instead of "PRICE"
From my First Application ie myReader can read it
LoadFromResource (130);
But problem is
as the user will add any numbers of pages surely my Reader will not know what are the IDs .
SO there should have some way to know the Id from myreader appl which will be added my modifier application ?
How can I come out of this problem?
any idea?
any alternative?
looking forward to your kind help
best regards
Business Accounts
Answer for Membership
by: mahesh1402Posted on 2005-12-27 at 05:27:23ID: 15555400
>THe problem is when I am adding html say price.html from myModifierApp to myReaderApp all the existing resources of myReaderApp are deleted and only price pages is added.
u facing this problem even if you try to add resource using resource-id ??
MAHESH