473,811 Members | 2,565 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem With Resource

Hi
I have a unicode program for win2k and win98 in vc7(dotnet). It contains
Dlls.Each Dll has string table resource,menu resource,dialog resource etc.
It successfully run on win2k. When i run it in win98, only string resource
of any dll is loaded, menu and dialog are not loaded.
I use LoadMenuW(handl e of dll module,menuname )
No problem for win2k
Please reply
Thanks in advance
Nov 17 '05 #1
12 1957
> I have a unicode program for win2k and win98 in vc7(dotnet). It contains
Dlls.Each Dll has string table resource,menu resource,dialog resource etc.
It successfully run on win2k. When i run it in win98, only string resource
of any dll is loaded, menu and dialog are not loaded.
I use LoadMenuW(handl e of dll module,menuname )


Presumably you're using Unicows on Win9x?

What does GetLastError (or the ERR pseudo register in the debugger)
tell you about why LoadMenu failed?

Dave
Nov 17 '05 #2
GetLastError and FormatMessage says "operation completed successfully".
LoadMenuW returns 0 and DoModal returns -1.

Nov 17 '05 #3
>GetLastError and FormatMessage says "operation completed successfully".
LoadMenuW returns 0 and DoModal returns -1.


And are you using the Unicows library under Win9x?

Can you reproduce this issue with a small sample project - a console
application that calls LoadMenu(W)?

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
Nov 17 '05 #4
Yes, I'm using unicows library under win98.
Under win98, program load toolbar and resource string of dll when i load
the specified dll. Only menu and dialog box are creating the problem. There
is no problem for win2k at all.
sample code is
HINSTANCE langDLL = NULL;

langDLL = LoadLibraryExW( _T("dllname.dll "),NULL,LOAD_LI BRARY_AS_DATAFI LE);

if(langDLL)

AfxSetResourceH andle(langDLL);

Now for menu

HMENU menu;

menu=LoadMenuW( langDLL,(LPCTST R)IDR_MENU1);

::SetMenu(m_hWn d,menu);

For dialog

dlg.DoModal();

where dlg is object of dialog(IDD_DIAL OG1) class.

Nov 17 '05 #5
> Under win98, program load toolbar and resource string of dll when i load
the specified dll. Only menu and dialog box are creating the problem. There
is no problem for win2k at all.
sample code is HMENU menu;
menu=LoadMenuW (langDLL,(LPCTS TR)IDR_MENU1); dlg.DoModal( );
where dlg is object of dialog(IDD_DIAL OG1) class.


I don't know if this is the issue, but what are the numeric values of
IDR_MENU1 and IDD_DIALOG1 ?

Win9x has problems with resource ID values > 32K.

If this isn't the issue I'm not aware of any problems in this area. I
suggest that you try re-posting your question with as much detail as
possible in the microsoft.publi c.platformsdk.m slayerforunicod e
newsgroup.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
Nov 17 '05 #6
Thanks, If Win98 has problems with resource ID values > 32K then how can i
solve it. For win98, LoadMenuW fail when loading menu of any dll. This not
case with menu of main exe. In this case LoadMenuW success.While all Dlls
and main exe have same menu id IDR_MENU1. I create IDR_MENU1 and put its
copy in all dll.and All dlls have different languages. No problem with
string and toolbar resources of any dll.
Nov 17 '05 #7
>Thanks, If Win98 has problems with resource ID values > 32K then how can i
solve it.


Change the values to be less than 32K.

You've not said what the values actually are though - so what are they
in your DLL?

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
Nov 17 '05 #8
IDR_MENU1 is a menu resource which i added to project. and IDR_DIALOG1 is a
dialog box resource which i add.Then i copy these resources to Dlls.
I think this is the answer of your question. If not then please clear what
you want to ask?
and how to Change the values of these resources to be less than 32K?
Thanks

Nov 17 '05 #9
>IDR_MENU1 is a menu resource which i added to project. and IDR_DIALOG1 is a
dialog box resource which i add.Then i copy these resources to Dlls.
I think this is the answer of your question. If not then please clear what
you want to ask?


Those are the symbolic definitions of the values, what are the
numerical values for these definitions (usually defined in the
resource.h file)?

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
Nov 17 '05 #10

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

Similar topics

8
4515
by: Gert van der Kooij | last post by:
Hi, Running on Windows 2003 Advanced server I tried to configure clustering with DB2 ESE (FP10) with the DB2MSCS utility. Defining the cluster resources seems to be succesfull but the DB2 resource can't be brought online. The following message is displayed: DB21516E DB2MSCS cannot bring resource "0" online. Ensure that the properties of the resource are set correctly.
5
8232
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 of type 'System.ArgumentException' occurred in system.drawing.dll Additional information: 'null' is not a valid value for 'stream'.
7
1758
by: Ken Allen | last post by:
OK, for a number of reasons I have needed to begin experimenting with resources sooner than I had planned (I had avoided it for now). Step 1: I built the 'reseditor' application that is in the SDK sub-directory, as instructed by the MSDN. Step 2: I used the 'reseditor' to create a file named "MyResources.resources" that contains only some string resources. Step 3: I added this resource file to my existing test assembly (does not do
0
2296
by: Rob | last post by:
Hi Visual Studio.NET 2002 v7.0 Windows XP (all service packs up to date) Working on Clearcase MVFS mapped drive. When compiling my ATL control, I always have to hit Rebuild Solution. If I just build, I get a "ExportText fatal error LNK1000: Internal error during ProcessResFiles" error. Setting verbose output on the linker gives the attached output. I have two resource files, One is project specfic and the
10
2140
by: Saso Zagoranski | last post by:
hi, this is not actually a C# problem but since this is the only newsgroup I follow I decided to post my question here (please tell me where to post this next time if you think this post shouldn't be here). I have two design questions: 1. what is the correct (or best) way to include database queries into the code if you plan on
0
2018
by: Kleanthis | last post by:
I have a problem, when deploying multilingual applications using cab files on Compact Framework 2.0. It seems that something is going wrong with compact framework 2.0 Below I have a description of the problem The main Smart Device Application contains 3 resource files under the Properties folder, in order to produce localization satellite asseblies. Those resource files are named Resources.resx (a default empty resource file),...
9
2856
by: Alf P. Steinbach | last post by:
<what to design a C++ solution for> A Windows API /resource/ is data embedded in the executable, accessed via API functions. A resource is completely identified by the quadruple (id, type, language, file), where (1) id is what, for want of a better name, I'll call a /kludgeon/, (2) type is also a kludgeon, (3) language is a small integer identifying a concrete national language or one of a set of pseudo-languages such as the Windows...
0
1775
by: ramesh.nrk | last post by:
Hi, I am developing a windows application which should support different language for this I am using "Resource Manager" default in .net framework. Here I am developing dll for Resource because there are different application which can access one dll avoid duplications. Resource File Name : Resources/MyAppResource.de.resx
5
14819
by: jbenner | last post by:
I have opened a PMR for this with IBM, and am not asking for advice from the DB2 DBA community. I am posting this as an FYI that DB2 Health Monitor, even at the latest version of DB2, still can cause huge problems with slow connect times and heavy resource locking in high concurrency / high transaction volume environments. I have an OLTP with 30-90 transactions per second activity, and start of Health Monitor every 2 hours was crashing our...
0
1624
by: Alejandro Gaio | last post by:
Hello All, I have a problem that appeared with the NEW VERSION of the vb.net compiler (VS 2008). To resume things, I have a project (call it "DocumentAdministrator") with several forms, and two resource files for spanish and english strings. The problem is that when I compile the project in the old VS 2005 the neutral-culture resource that is inside the project IS embedded into the final EXE, but with the new VS 2008 THIS FILE IS NOT...
0
9605
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10651
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10405
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9208
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6893
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5556
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5697
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4342
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3871
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.