|
Unless you have a reason not to, you can put all of the resources in the same .RC file. Just use the LANGUAGE statment in the .RC file.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Ok, in this case I will have 2 String Tables (2 languages), right ??
And how can choose one String Table to load ??
[]'s
|
|
|
|
|
You don't load RC files at runtime, the RC file is just the source (just as you don't run C++ code, you run compiled code). The resource-related APIs all take module handles, which indicates which module to load from. Check out LoadModule() and the resource API docs for more.
--Mike--
Ericahist | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber
Actual sign at the laundromat I go to: "No tinting or dying."
|
|
|
|
|
Hey,
i have the following problem: I made an application with 2 static splitter window...
VERIFY(m_wndSplitter.CreateStatic(this, 1, 2));<br />
VERIFY(m_wndSplitter.CreateView(0,0,RUNTIME_CLASS(CDiaSelectTree),CSize(200,500),pContext));<br />
VERIFY(m_wndSplitter.CreateView(0,1,RUNTIME_CLASS(CTestView),CSize(200,500),pContext));<br />
Now I have a problem with messages. When I select an menu-item the message is only send to my first window. How can I route the message to my second window. I created the same event function in my second-window-class but nothing happend... I'd like to recieve all messages in my 2nd window-class (CTestView).
|
|
|
|
|
You could catch your message in the MainFrame and then redispatch it to the views, by getting the curent document and parsing all its views (CDocument::GetFirstViewPosition / CDocument::GetNextView)
HTH,
K.
Silence Means Death
Stand On Your Feet
Inner Fear
Your Worst Enemy
|
|
|
|
|
I am creating a SDI application that has a TreeView, ListView and a FormView to add data to a database. I am trying to make it as dynamic as possible because it is going to be used in several projects. I have data in XML files that gets read in to fill the Tree View and List View's and then the user enters the data in via the Form View. I have a DLL which has all of the screen resources laid out for the first project and I need to make the Form View display those screen images. The class derived from CFormView has the enum in it with the IDD. I have been looking though the articles here and at codeguru and have come to a choice. I can create a picture box or custom control on the default screen and then have the generic class for the screen shots pick the screen and load it into that rectangle. Does anyone have any other input or suggestions as to how I should go about doing this?
|
|
|
|
|
When I use resizeTo(...) function in Javascript, it resizes the target window. I would like to know what is the event which is generated here which is handled by the Browser to resize the window.
We have a browser in which I have to implement this functionality and I am not able to do it. Our browser window is not getting resized. If anyone of you know how to do this, PLEASE let me know.
Thank you in advance.
|
|
|
|
|
I am trying to declare a CRect m_rect[m][l]; but the program throws an error saying undeclared identifier. I just copied this line from another program. it seems to work fine there. except when i change the variables from m and l to any other variable it gives the same error. why is this? is there any place i have to declare the variables m and l
|
|
|
|
|
If you are using VC++ 6.0, then you will have to do it dynamiclly. I think VC++.Net 2003 will allow this.
Or, you could use a #define or const int m = 4;
I'm just guessing here.
Larry J. Siddens
Cornerstone Communications
TAME THE DOCUMENT MONSTER
www.unifier.biz
|
|
|
|
|
swerajan wrote:
...the program throws an error saying undeclared identifier.
Actually, the compiler is what throws the error, not your program. In any case, the compiler error contains the line and the name of the identifier that it found no declaration for. Declare it and you'll be good to go.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
I'm assuming (yeah, I know what happens when I assume! ) that they were already delcared. Something like this:
int x;
. . .
x = 4;
CRect rect[x];
I don't think the VC++ 6.0 allows this. I know that it was added to the C++ Standard (but don't think MS implemented this yet). If I'm wrong...
Larry J. Siddens
Cornerstone Communications
TAME THE DOCUMENT MONSTER
www.unifier.biz
|
|
|
|
|
I have to do a project working with graphs and the shortest path. It would be cool if I could get my hands on a class that makes a graph from a file and has functions to find the shortest path written in c++.
|
|
|
|
|
Try the boost graph library[^]. It might look a little hairy if your not used to _lots_ of templates, but it comes with plenty of examples
HTH
Ryan
|
|
|
|
|
Excellent, thanks.
|
|
|
|
|
hi. I have a problem:
I have the content of a file read in a BYTE array and i want to open that file with a COM component within my app. The problem is that this COM component only accepts files from a logical disk path.
I can't write it to disk and then tell the COM component to fetch it because i have security issues and it would be very bad.
Is there a way to simulate it or is there a very good way to camuflage a temporary file?(it cant be deleted while the program is in use)
Thanks in advance!!
|
|
|
|
|
Try to use CMemFile MFC class.
|
|
|
|
|
Hi there
I am writing a video capture application using an SDK from the video capture card manufacturer. So far I have been able to display the real time video in a window, my next step is to process single frame information which is stored as a bitmap in a buffer. This buffer is defined as follows:
PVOID pBuffer;
I cannot change this buffer at all as it is part of the SDK. The information stored in the buffer does not need to be changed at all.
I can access the address of the buffer by just using pBuffer, but if I try and de-reference it by using *pBuffer I get an illegal indirection error.
There is no explanation for the PVOID type in the MSDN help apart for "a pointer to any type".
Can anyone help?
Thanks Dave
|
|
|
|
|
A PVOID is simply a void* , so you'll need to cast it in order to do anything with it, e.g. byte* dbuf = (byte*)pBuffer; .
- Mike
|
|
|
|
|
Mike
Ok so dbuf is a pointer to a single byte in your case.
byte* dbuf = (byte*)pBuffer;
Does this not point to the first byte in my pBuffer? How do I access the rest?
In my case the buffer pBuffer contains all of the byte data for a bitmap image the image is size 768 * 576 = 442368 bytes plus any header information etc etc.
Thanks
Dave
|
|
|
|
|
Dave Harper wrote:
How do I access the rest?
Use the pointer like an array: dbuf[0] accesses the first, dbuf[1] accesses the second byte, etc.
- Mike
|
|
|
|
|
Thanks i see now.
One problem is how do I find how many bytes are in pBuffer or dbuf to know how far to increment the array?
I have tryed sizeof(pBuffer) also sizeof(dbuf) problem is it returns 4 as the result do you know of a way i can write the info to a txt file to be able to see whats going on? im using ofstream at the moment it doesnt display byte info correctly.
Thanks
Dave
|
|
|
|
|
Dave Harper wrote:
I have tryed sizeof(pBuffer) also sizeof(dbuf) problem is it returns 4 as the result
That is because pBuffer is a pointer and that pointer is a 32-bit memory address and 32 bits is 4 bytes.
|
|
|
|
|
Dave Harper wrote:
One problem is how do I find how many bytes are in pBuffer or dbuf to know how far to increment the array?
You cannot get this information from the pointer itself; the SDK should provide a way to get the size of the buffer or at least a way for you to calculate it yourself.
Dave Harper wrote:
I have tryed sizeof(pBuffer) also sizeof(dbuf) problem is it returns 4 as the result
When you use sizeof() on a pointer type, the result is the size of the pointer itself -- 4 bytes.
- Mike
|
|
|
|
|
|
Yup I sure do my head is thinking to hard not seeing the light
Thanks
Dave
|
|
|
|