|
i am keeping the dialog object permanantly.
modified on Thursday, January 17, 2008 3:12:40 AM
|
|
|
|
|
If so you just create control variable (of value type) of the check box. MFC framework will store and load the check box status for you.
|
|
|
|
|
First of all let state that I come from a MainFrame Background as that reflects my understandings windows apps
While reading a Windows Internals Book I have seen the Term Address space refered to as in "The application Address Space"
My question when DLLis loaded either Staticlly by refering to an exported function or Dynamically via a LoadLibrary
IS that DLL too in the Same Address Space of the app/exe (e.g using the same Data Segment Register hope that wasn't something stupid I said)
Or can DLL's be acessed by any application in Windows
Could there by two types of DLL's those running in the application address space and printer type DLL's which can be accessed by any Windows Application
Thankx
|
|
|
|
|
See if this helps.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
Partly u r right. Dll will be mapped to the calling application's address space. When the other application loads the dll (either implicitly or explicitly), again the dll will be mapped to the corresponding process/application/exe. It means dll can be accessed by 'n' number of processes at the same time.
Come online at:-
jubinc@skype
|
|
|
|
|
I have a dialog box with an Edit control. Can I forbid the Paste action for that field?
In VC6++ pleasae ...
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
Just intercept the WM_PASTE message and don't pass it along to the default handler.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
How? Can you give an example?
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
The same way you would any other Windows (WM_xxx ) message. If you are using MFC, use ClassWizard (Ctrl+W) to provide a handler for that message.
Here is another resource:
http://www.mser.net/microsoft-developer-network/43/visual-c++-programming-430579.shtm[^]
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hey,
how can I change (dynamic) the view from e.g. CView to CFormView? I know I have to do it in mainfrm but how?
|
|
|
|
|
|
|
Hey,
i've made some good controls and dialogs for me. From that time on, i'd copied all my files and resources to my new projects. Now I decided to make an DLL. So I started the project assistant and created a extended MFC-Dll and added my custem files and resources. So i build my DLL...
OK, but now (after linking to my new projects) I have probleme with my resources. Is there any to way to split resources or better use separate resources (one resource for application, one for dll).
Thank you for helping me....
|
|
|
|
|
AnTri wrote: I have probleme with my resources.
What problems?
AnTri wrote: Is there any to way to split resources or better use separate resources (one resource for application, one for dll).
The resources are separate for the DLL and the EXE. It's mostly a matter of
loading from the right module.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
When I link my (control) dll I'll get a lot of compiler-warnings: resource already defined, duplicated resource ...
e.g. in dll is a dialog with edit-control ID: IDC_EDIT1 = 1001
when I link the dll to my application e.g. Dialog with the same ID for edit-control I can't open the dialog! It seems that there is only one resource-list for the application an my dll!
|
|
|
|
|
MFC maintains a list of modules with resources, and loads them from wherever it can.
The simple solution is to make sure your resource IDs don;t overlap.
If you do a search for Anna Jane Metcalfe, she wrote an article with a utility to make reorganising resources much easier.
If you can't find it on CP, go look at her site: www.riverblade.co.uk, and prod around there. It wasn't hard to find.
Iain.
|
|
|
|
|
This should be a simple problem, but I am unable to solve it! My environment is VStudio 2005 and MFC.
The issue is printing text onto a DC. Should be simple enough, but here are some constraints:
1. The text may be rotated 0, 90, 180, 270 degrees.
2. The text may need reformatted within the bounding rectangle, meaning word-breaks.
3. The text will need to be aligned horizantally and vertically within the bounding rectangle - left, right, and center horizontally, top, center, bottom vertically.
Rotating text is not a problem.
Normally, I could use DrawText to print the text, but on rotated fonts, DrawText seems to choke. I tried TextOut and ExtTextOut. These rotate and position just fine, but can't seem to do word-wrap.
Is there an API call or setup that I am missing? Or do I need to draw to a memory DC and somehow rotate it to fit?
Or can someone please point me to some code that will accomplish this easily?
Thank you for your time
|
|
|
|
|
It might be Q&D, but what about drawing the text onto an in-memory bitmap/surface and then rotating it, and then blitting it to the target bitmap/surface?
Other than that, maybe the GDI+ libraries have something to offer?
Peace!
-=- James Please rate this message - let me know if I helped or not!<hr></hr> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Unfortunately, I am out of options at this point... In-Memory bitmap and rotate would have to be the answer. I was kind of hoping some built-in API.
|
|
|
|
|
Stephen,
I am not familiar with the World Transform functions, so I will have to go through the sections to pick up on them, but thank you for pointing me at them. From the initial look I had, they do look promising.
Santanu
|
|
|
|
|
Stephen,
Your suggestion was exactly what I needed. I used the SetWorldTransform API to rotate and align text along the required axes and let DrawText do the wordwrap part.
Thank you very much.
|
|
|
|
|
How do you reverse the action on a Spin control? Currently, down makes the number go up, and clicking the up arrow makes the value go down. How do you reverse the control, so the up arrow increases the number, and down decreases it?
|
|
|
|
|
littleGreenDude wrote: How do you reverse the action on a Spin control? Currently, down makes the number go up, and clicking the up arrow makes the value go down. How do you reverse the control, so the up arrow increases the number, and down decreases it?
They hide that information in the documentation[^]
led mike
|
|
|
|
|
A more useful response...
Set the range to anything other than the default 0 to 100 and the control behaves normally.
m_Spin1.SetRange(0, 52);
The up-down control is a victim of Windows' reversed y-axis.
Mathematically, the (0, 0) coordinate should be at the bottom left corner of the screen, with y increasing as you move up the screen. Windows, on the other hand, puts the (0, 0) coordinate at the upper left corner, with y increasing as you move down the screen.
|
|
|
|