|
|
I agree with you, but unfortunately the programmers at Digital Anvil didn't think so when they made Freelancer Freelancer stores all the text information in a number of resource-only dlls, and I'm the maker of a mod manager program for Freelancer (FLMM). I'm wanting to let mods easily add new string/html resources to a dll for Freelancer to use.
I looked at that documentation, but it seems awfully complicated Do you know if there is any (free) code out there that would do what I want to do?
Thanks
|
|
|
|
|
I'd go the easier route - compile a bare-bones DLL and put that in your app, maybe stick it in as a binary resource. Then when you need to create a new DLL, use that bare-bones one as starting point and use the *UpdateResource() APIs to modify the resources (as long as you can require your users to have some flavor of NT).
--Mike--
THERE IS NO THERE IS NO BUT THERE IS
MAGIC PIXIE DUST BUSINESS GENIE CODE PROJECT
Homepage | RightClick-Encrypt | 1ClickPicGrabber
"You have Erica on the brain" - Jon Sagara to me
|
|
|
|
|
That is EXACTLY what I was looking for; thanks!
I need to be able to work with Win98 and ME, though, so that might present a problem. I was looking at the MSDN documentation on UpdateResource(), and it said the following at the end:
"Windows 95/98/Me: UpdateResourceW is supported by the Microsoft® Layer for Unicode (MSLU). To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems."
Does that mean that the unicode version works with 98/ME?
|
|
|
|
|
IGx89 wrote:
Does that mean that the unicode version works with 98/ME?
It might, you'd just have to try it out (or search the net for someone else who's tried it and posted the results)
--Mike--
THERE IS NO THERE IS NO BUT THERE IS
MAGIC PIXIE DUST BUSINESS GENIE CODE PROJECT
Homepage | RightClick-Encrypt | 1ClickPicGrabber
"You have Erica on the brain" - Jon Sagara to me
|
|
|
|
|
I use an older version of MSLU and it works just fine. The hardest part is getting it setup the first time. But once you get the linking process done properly, everything works great.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Copy empty resource dll and "UpdateResource" it.
It works!
Brian
|
|
|
|
|
I am new to this group so forgive me if I should have looked somewhere else...
In a modal dialog I have a checkbox and an edit fbox. If the checkbox is 'On', the edit field should be enabled. If the checkbox is 'Off', the edit box should be disabled. I have seen this technique in several applications.
Can anyone point me to some code that uses this technique. THe obvious search strings have not turned anything up for me.
Thanks
Tel Monks
|
|
|
|
|
You have to handle the "clicked" event for the checkbox, and then enable/disable the edit box accordingly:
m_Edit.EnableWindow( m_CheckBox.GetCheck() );
There are 10 kinds of people - those that get binary and those that don't.
|
|
|
|
|
You can use the class wizard to automagically generate the message handler Miszuo mentioned above. In the class wizard, select the control, then in the window on the right, select WM_CLICK (i think that's what it is... )
This will map that message to an OnClickYourControl() function. That's where you put the aforementioned code.
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
Thanks to both.
The remaining problem is that I can't set the EnableWindow when the dialog comes up. That is to say that if the checkbox is not to be "on" (via a Message variable) the EditBox should come up disabled...
See what I mean?
Is there a hook that will allow me to disable the editbox if the checkbox is off?
Tel
|
|
|
|
|
You need to initialize the dialog in the OnInitDialog function, by handling the WM_INITDIALOG message. Add this handler with the class wizard that Nitron was talking about.
There are 10 kinds of people - those that get binary and those that don't.
|
|
|
|
|
Perfect! That took care of the last thing.
Thanks to both of you, my spam detection program is in great shape. If anyone is interested in testing, write to tel@telgo.m
|
|
|
|
|
Glad to be of service!
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
I launch a modeless dialog that's created with new , and then after the dialog is destroyed, I delete it. Well, all of a sudden, I get debug assertion failures now (i never got them before) note: all in debug mode BTW.
should I not be deleting the dialogs after I destroy them? does CDialog::OnNcDestroy() do this for me?
[edit] No errors in release mode BTW [/edit]
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
You should do a delete this in PostNcDestroy()
void CModelessDlg::PostNcDestroy() <br />
{<br />
delete this;<br />
}
John
|
|
|
|
|
same problem.
Details:
File: dbgheap.c
Line: 1084
Expression: pHead->nBlockUse == nBlockUse
Any ideas?
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
Hmm.....
From that file:
I'll look into it. Thanks for your reply.
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
I tracked it down to a library I'm linking to. (It was built with MFC in a shared DLL)
If I remove the library (i'm not using it yet), everything works fine. If I put it back in, I get linker messages saying mfc42.lib conflicts with another library, use /nodefaultlib:LIB .
If I run the app anyway, that's when I get the assertion failures. If I build in release mode (with the same library), all is good.
So i'm thinking it's something with my library. Any ideas from y'all are still anticipated...
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
CMyModelessDlg* pDlg = new CMyModelessDlg();
ASSERT (pDlg != NULL);
pDlg->Create (...);
pDlg->ShowWindow (SW_SHOW);
...
pDlg->DestroyWindow();
delete pDlg; /ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
That's what I'm doing except for ASSERT (pDlg != NULL); What will that do for me? If pDlg was NULL, would I even be able to create it and show it? (which the app does just fine)
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
ASSERT s are good programming practice - it's just a way of asserting conditions that must be true. ASSERT s only work in debug builds. It seems you're doing the right thing - there are likely other problems in your code.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Getting compiler errors for this:
#include "stdafx.h"
#using <mscorlib.dll>
#using <System.dll>
#using <System.Windows.Forms.dll>
__gc public class CppForm : public Form {
public:
CppForm(){}
};
#include <tchar.h>
using namespace System;
using namespace System::ComponentModel;
using namespace System::Windows::Forms;
int _tmain(void)
{
Console::WriteLine(S"forms World");
Application::Run(new CppForm());
return 0;
}
e:\vc7practice\CppForm\CppForm.cpp(10): error C2504: 'Form' : base class undefined
and
e:\vc7practice\CppForm\CppForm.cpp(25): error C2665: 'System::Windows::Forms::Application::Run' : none of the 3 overloads can convert parameter 1 from type 'CppForm __gc *'
What am I doing wrong?
Thanks!
Appreciate your help,
ns
|
|
|
|
|
Can't help you but just to make things clear, this code is not VC7. It is VC++.NET made with studio.NET. We use VC7 to mean VC++ MFC7 which is also made with studio.NET by selecting a different project option.
Art
|
|
|
|
|
Hi,
I'm looking for information on how to create interesting
non-rectangular GUI. Something that could look like windows media players V.9. I believe that it's not something easy and I just want some reference on a book or a tutorial that could help me.
Thanks
Regards
Mykel
Everything's beautiful if you look at it long enough...
|
|
|
|