473,383 Members | 1,922 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Loading resources problem

Hello,

I have two resource files( text files). I've added them like custrom
resourses.
Then I want to load the first file:

HMODULE plugin = GetModuleHandle( MY_MODULE );
TCHAR sRestype[13] = _T("GridFormulas");
HRSRC resHndl = FindResource( plugin,
MAKEINTRESOURCE(IDR_GRIDFORMULAS1), sRestype );
HGLOBAL hGlbl = LoadResource( plugin, resHndl );
char* res =( char* ) LockResource( hGlbl );

But res consists from the first's file data *AND* the second's files
data, plus several strange characters.

I've tried to make these two resources of different types, but it
didn't help.

May be the problem is that I'm now using VS2005, because in 2003 it
worked fine.

Please help.
Thanks.

Dec 27 '06 #1
2 1715

Lu***@bk.ru wrote:
Hello,

I have two resource files( text files). I've added them like custrom
resourses.
Then I want to load the first file:

HMODULE plugin = GetModuleHandle( MY_MODULE );
TCHAR sRestype[13] = _T("GridFormulas");
HRSRC resHndl = FindResource( plugin,
MAKEINTRESOURCE(IDR_GRIDFORMULAS1), sRestype );
HGLOBAL hGlbl = LoadResource( plugin, resHndl );
char* res =( char* ) LockResource( hGlbl );

But res consists from the first's file data *AND* the second's files
data, plus several strange characters.

I've tried to make these two resources of different types, but it
didn't help.

May be the problem is that I'm now using VS2005, because in 2003 it
worked fine.

Please help.
Thanks.
The above is not C++ in any shape or form.
Consult:
[5.9] Which newsgroup should I post my questions?
http://www.parashift.com/c++-faq-lite/how-to-post.html

Dec 27 '06 #2
"Salt_Peter" <pj*****@yahoo.comwrote in message
news:11*********************@48g2000cwx.googlegrou ps.com...
>
Lu***@bk.ru wrote:
>Hello,

I have two resource files( text files). I've added them like custrom
resourses.
Then I want to load the first file:

HMODULE plugin = GetModuleHandle( MY_MODULE );
TCHAR sRestype[13] = _T("GridFormulas");
HRSRC resHndl = FindResource( plugin,
MAKEINTRESOURCE(IDR_GRIDFORMULAS1), sRestype );
HGLOBAL hGlbl = LoadResource( plugin, resHndl );
char* res =( char* ) LockResource( hGlbl );

But res consists from the first's file data *AND* the second's files
data, plus several strange characters.

I've tried to make these two resources of different types, but it
didn't help.

May be the problem is that I'm now using VS2005, because in 2003 it
worked fine.

Please help.
Thanks.

The above is not C++ in any shape or form.
Not true, it is C++, using the C subset, but the function calls and
variables are not part of the standard, so the OP needs to ask in an
appropriate newsgroup.
Consult:
[5.9] Which newsgroup should I post my questions?
http://www.parashift.com/c++-faq-lite/how-to-post.html

Dec 28 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Drew | last post by:
Assembly asm = Assembly.GetExecutingAssembly(); me = new Bitmap(asm.GetManifestResourceStream("me.gif")); I have used this before without any problem, but now I get: An unhandled exception...
6
by: nadeem_far | last post by:
Hello All, I am working on a .Net desktop application and I am having problem displaying a form. I am using C# and version 1.1 of the framework. here is how the code looks likes and I will...
2
by: JC Carette | last post by:
Hello I am experiencing extremely long time for loading a windows form in my Visual C++ .NET project This Windows form has just 40 labels, 4 checkBoxes, 2 buttons and 11 numericUpDown. It takes...
0
by: Jason | last post by:
I am loading a resource manager object (Resources.ResourceManager.CreateFileBasedResourceManager (resourceName, ".", Nothing) ) and there are no problems. However, when I try to access a key...
3
by: Holmes | last post by:
Hello Ran into a bit of a problem here and have now exhausted my resources to getting this working What I am trying to do is load and show a simple vb form with a listbox in it Dim...
1
by: Luca Beretta | last post by:
I think this a simple question but i'm breaking my brain without results. I've a datagridview bounded to a datatable, with an imagecolumn that should contain a different bitmap depending from a...
6
by: Pieter | last post by:
Hi, I developed an Outlook Add In (VB.NET 2005, for Outlook 2003) that sometimes suddenly stops loading. I've put everywhere in the code Exception Handlers, but no Exception is catched. it...
8
by: John Dunn | last post by:
Since currently we aren't allowed to have compiled XAML files embedded in C++ apps I'm using Markup::XamlReader::Load to dynamically load XAML files. This works perfectly fine with external files...
5
by: Bill Q | last post by:
Hello, this may not be the correct group for the post although I am using c# to follow one of the code4fun directx tutorial. Anyway the author is loading a texture file using the following ...
5
by: Danny | last post by:
Hi, we have just uploaded our first APS.NET webpage some days ago. Now we had to notice that it takes soo long until the page is shown. About 15 seconds. First we thought, maybe it's...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.