[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.2

UpdateResource fucntion

Asked by makctg in Windows MFC Programming

Tags: updateresource

I have two appl
--my1stApp
--my2ndApp


From my2ndApp , I am adding a html file ( price.htm) to my my1stApp ( see the code below) .
all I need to have the resouce ID as "PRICE" insead of numeric value

can I add  writting -----

UpdateResource(hWnd,RT_HTML,"PRICE", MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),lpBuffer,dwFileSize) != FALSE)

What should I write here for having the resource id as "PRICE"

from   My first Application my1stApp- which view class is derived from CHTMLView

I want to  read the html resource from its onInitialUpdate
void my1stAppView::OnInitialUpdate()
{
      CHtmlView::OnInitialUpdate();

      // TODO: This code navigates to a popular spot on the web.

      
        LoadFromResource ("PRICE");


}

Right now it not working , what should I do



code :adding a html file ( price.htm) to my my1stApp
----------------------------------------------------
HANDLE hFile;
DWORD dwFileSize,dwBytesRead;
LPBYTE lpBuffer;


hFile = CreateFile("C:\\price.html", GENERIC_READ,
                   FILE_SHARE_READ,  
                   NULL,
                   OPEN_EXISTING,
                   FILE_ATTRIBUTE_NORMAL,
                   NULL);
 
      if (hFile != INVALID_HANDLE_VALUE)
      {
// GET FILE SIZE
                        
                  dwFileSize=GetFileSize(hFile,NULL);
                  // GET THE BUFFET SIZE
                  lpBuffer= new BYTE[dwFileSize];

                        // READ FILE INTO tTHE BUFFER
                  if(ReadFile(hFile,lpBuffer,dwFileSize,&dwBytesRead,NULL)!=NULL)
                  {


                  }

                  //relase the file
                  CloseHandle(hFile);


                  }


//Add the File to FirstApp
HANDLE hWnd;

hWnd=BeginUpdateResource("E:\\VC\\Ebook\\Debug\\Ebook.exe",FALSE);

if (hWnd==NULL)
{

      if( UpdateResource(hWnd,RT_HTML,"PRICE", MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),lpBuffer,dwFileSize) != FALSE)
            {
                  EndUpdateResource(hWnd, FALSE);
            }
      else

      {
            MessageBox("Failed to Add The File");
      }
}
[+][-]12/26/05 02:37 AM, ID: 15550342Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Windows MFC Programming
Tags: updateresource
Sign Up Now!
Solution Provided By: mahesh1402
Participating Experts: 1
Solution Grade: A
 
[+][-]12/25/05 12:45 AM, ID: 15548644Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/25/05 12:47 AM, ID: 15548646Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/25/05 12:54 AM, ID: 15548656Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/25/05 03:19 AM, ID: 15548771Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/25/05 04:46 AM, ID: 15548833Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/25/05 06:02 AM, ID: 15548877Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/25/05 06:18 AM, ID: 15548906Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/25/05 06:21 AM, ID: 15548911Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/25/05 06:25 AM, ID: 15548924Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/25/05 06:30 AM, ID: 15548956Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/25/05 06:41 AM, ID: 15548998Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/25/05 06:53 AM, ID: 15549031Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/25/05 06:54 AM, ID: 15549039Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/25/05 06:59 AM, ID: 15549050Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/25/05 10:30 AM, ID: 15549286Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/25/05 08:03 PM, ID: 15549909Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/25/05 09:48 PM, ID: 15550027Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/25/05 09:55 PM, ID: 15550037Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/25/05 10:14 PM, ID: 15550056Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/25/05 10:32 PM, ID: 15550070Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/25/05 11:55 PM, ID: 15550158Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/26/05 10:04 AM, ID: 15551501Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92