|
|
Could you check with your email please? I always reply with Email option.
regard,
George
|
|
|
|
|
No I didnt get any mail! except your reply!
|
|
|
|
|
Hi Hamid,
What is your email address? For off topic questions, I would like to discuss you using personal email other than using this forum resource.
regards,
George
|
|
|
|
|
My mail is help_clock@yahoo.com but I suggest if you have any question is better you ask here because you will be get more answer to your question.
|
|
|
|
|
No problem, Hamid!
I have replied your email.
regards,
George
|
|
|
|
|
Yeah I got it.
|
|
|
|
|
Found GetVisibleClipBounds works, testing...
<br />
m_pMemImage=::new Bitmap(cx,cy,PixelFormat32bppARGB);<br />
m_pMemGraphics=::new Graphics(m_pMemImage);<br />
<br />
CMyImage::Draw(Graphics *pG)<br />
coordinates in CMyImage are in percentage, so when I draw it, the total size should be known. It'll be fine to get the size of a Graphics object here, any way?
modified on Thursday, January 17, 2008 3:26:35 AM
|
|
|
|
|
followait wrote: the total size should be known
You need to know the drawing area right?
|
|
|
|
|
|
Normally GetClientRect API will give the window's client area for normal painting. Isn't it enough?
|
|
|
|
|
followait wrote: m_pMemImage=::new Bitmap(cx,cy,PixelFormat32bppARGB);
m_pMemGraphics=::new Graphics(m_pMemImage);
It's the size of the Bitmap...
UINT graphicswidth = m_pMemImage->GetWidth();
UINT graphicsheight = m_pMemImage->GetHeight();
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Yes, it's my last choice.
Because I change the size of the image when the client's size chnages,
I'l like to have less coupling.
|
|
|
|
|
followait wrote: I'l like to have less coupling.
hmm I'm not sure what you mean....if the size changes then
you need a new bitmap as well, right? Your Graphics object, which is essentially
a memory DC, is tightly coupled with its "selected" Bitmap.
Maybe Graphics::GetVisibleClipBounds(...) gives you what you need?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
In my application i have created a new dialog box which has 4 check boxes and 4 static boxes. when the check box is checked the data will be logged into a folder. when its not its says not logged. now i am using GetDlgItem to display whether is logged or not logged using a static control. i m not getting the output properly. what is happening is when i click on the check box the static box displays the correct result and vice versa. but when i click OK button and again open it, if the check box is not checked it would say logged. what can be the reason for that? is the value getting killed once i close the window? if yes then what needs to be done to make it stay on the dialog
|
|
|
|
|
If you are destroying a window, the state of controls will be lost or reset. You have to set the states of controls at startup of the window.
What kind of window is that? How do you show that? Is it a dialog? If so is it an MFC dialog?
|
|
|
|
|
correct. its resetting or lost. i have inserted a dialog using the resource. how do i set the state at startup. how do i hold the previous value when i again open the dialog? its an MFC dialog. i have a button in the tool bar. when i click this button the dialog opens up,
|
|
|
|
|
Are you keeping the dialog object permanant (as member)? Or just using in function scope of toolbar button click?
|
|
|
|
|
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
|
|
|
|