|
Get Data of win back with GetBitmapBits and create bitmap from it with SetBitmapBits .
then save bitmap to file .
Then read the bitmap with CBitmap::LoadBitmap and display it in win .
|
|
|
|
|
Hi,
I am using this kinds of TextOut in my application to display some text.
pDC.TextOut(110,145,"ON ");
pDC.TextOut(175,282,(CString)sTime ).......
..........
But if i chnaged my system resolution,totally the texts are displayed very closely with out any space and text are goes to top.My resolution is 800/600 pixels,I coded my application with this resolution.When i changed resolution to 1024/786 pixels then it dislays closely that is its get compressed.
|
|
|
|
|
your problem is when you change resolution from 800 to 1024,yes or no?
whitesky
|
|
|
|
|
I feel rather than hardcoding the values make it relative to the value you get from :-
int GetSystemMetrics(<br />
int nIndex<br />
);
or
int GetDeviceCaps(<br />
HDC hdc,
int nIndex
);
Regards,
FarPointer
Blog:FARPOINTER
|
|
|
|
|
Ask a problem,about template
i write template class
<<<<<<<<<class.h>>>>>>>>
#pragma once
template <class t=""> class Tem
{
public:
T rxg(T a);
};
<<<<<<<<<class.cpp>>>>>>>>
#include "stdafx.h"
#include "class.h"
template<class t="">T Tem<t>::rxg(T a)
{
return a;
}
<<<<<<<<<<<dialog.cpp>>>>>>>>>
#include "Class.h"
................................
Tem<int> moral;
int a=moral.rxg(10);
Error:
Test.obj : error LNK2019: unresolved external symbol "public: int __thiscall Tem<int>::rxg(int)" (?rxg@?$Tem@H@@QAEHH@Z) referenced in function "public: void __thiscall CAboutDlg::OnBnClickedOk(void)" (?OnBnClickedOk@CAboutDlg@@QAEXXZ)
thank
|
|
|
|
|
|
thank you FarPointer
|
|
|
|
|
ive seen alot of info on getting ip's and things like that but how do you get the throughput of a modem up and down? and time connected?
-- modified at 1:36 Saturday 15th July, 2006
|
|
|
|
|
Hi All,
I have Created an Window Using MFC_SDI, and I have Done some Drawing On it.
I have to Save this Window,and retrieve back.
can any one give the code,to get rid of this problem.
Thanks in advance
|
|
|
|
|
Do you need to save drawing?
whitesky
|
|
|
|
|
Yes
that is my task to save drawing too & retrieve back.
Nagaraju
|
|
|
|
|
|
Why dont u draw it to a bitmap and then display it in the Ondraw so that later you can use that bitmap.
Regards,
FarPointer
Blog:FARPOINTER
|
|
|
|
|
In some case, I would like my application to hide its dialog as soon as my application start. I post message "WM_HIDEWINDOW" to the main dialog self in OnInitDialog, but there is a flash in screen before the dialog was realy hidden. Is there any other good idea to prevent or reduce the flash?
Nothing impossible, Nothing sure
|
|
|
|
|
Is it a Modal Dialog then the hiding of the dialog will make the application looked hanged .
And as far as hiding the dialog is dont send a WM_HIDEWINDOW .
do dlg.ShowWindow(False) before you do a DoModal.
Regards,
FarPointer
Blog:FARPOINTER
|
|
|
|
|
I am trying to create a pattern brush from a bitmap and print.
It is fine on the screen, however on the printer shows up as solid
gray (difference in screen and printer resolution).
How to handle this problem?
rj
|
|
|
|
|
Now i have 2 files ,one is .inf file,other is DLL file.but how can I use setup api functions to make a driver installation programme?
My idea is;
1) copy DLL and inf file to system disk.
CopyFile() and SetupCopyOEMInf()
2)use SetupInstallFilesFromInfSection() to change REGEDIT.
However,I have not succeeded.Who have the samples to refer?
Thanks in advance!
study to old!
|
|
|
|
|
i am designing a paintbrush and i want to use texture i have one combobox in which i am showing my texture/images i want to implent it on my second image as a texture. i already include all image in combobox as a texture but now i dont know how to implement it selected images/texture on it plzz any one give me idea how to implement texture on second image or anythink else
syed imran azmat
|
|
|
|
|
... reading "No programming questions in the Lounge".
Marc
Pensieve
Some people believe what the bible says. Literally. At least [with Wikipedia] you have the chance to correct the wiki -- Jörgen Sigvardsson
People are just notoriously impossible. --DavidCrow
|
|
|
|
|
Interstate traffic does not yeild to merging traffic from on ramps in every state I have lived it. Yet so many drivers insist on braking and yeilding. It seems that simple concepts are the hardest to grasp. Is it more polite to yeild to one person or to not back-up traffic for hundreds?
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
I have a simple MFC program to do FFT. It works fine to read an array of waveform data and does fft and output results.
Now I got a console program consisting a function (subroutine) and a few header files. I want to integrate this console program to MFC. But I found a lots problems to built, such as "unexpected end of file while looking for precompiled header directive."
You may have experience for such integration, please give me some advice on this.
Thanks
|
|
|
|
|
mrby123 wrote: "unexpected end of file while looking for precompiled header directive."
Uncheck "using precompiled librares" option in the project setting.
From you described, there shouldn't be big problems. Post the errors you have got.
Best,
Jun
|
|
|
|
|
Or include stdafx in every implementation file.
You only have to change output methods ( cin, cout, printf etc) to dialogs and messageboxes.
Also, the main() function is no longer needed (..you'll have to rename it and call it when a user presses a button or something)
|
|
|
|
|
I tried to create a simple function that would display values on a progress bar. The compiler is returning:
c:\Documents and Settings\Jon\My Documents\Visual Studio Projects\IAD Practice and Assignment\C++ - Assignment\C++ - Assignment\01 - Primes\Primes\PrimesDlg.cpp(75): error C2228: left of '.SetPos' must have class/struct/union type
Any idea how to set the variable to point to the progress control bar control variable?
Function:
void setProgress(int uLowerBound, int uUpperBound, CProgressCtrl *progCtrlVar)
{ int iCountPrimes = 0;
for (int iCount = uLowerBound; iCount <= uUpperBound; iCount++)
{ if (isPrime(iCount) == true)
{iCountPrimes ++;}
}
progCtrlVar.SetPos(iCountPrimes * 0.1);
}
Calling example:
setProgress(1, 1000, m_Progress1);
Jon
|
|
|
|
|
progCtrlVar is declared as a pointer to a CProgressCtrl. Use
progCtrlVar->SetPos
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|