|
I deleted some bitmap resources in the project in both local and vss2005.
But everytime when I tried to check in the whole project, it warns that the deleted bitmaps are not valid files.
Any way to fix it?
logics
|
|
|
|
|
hi,
how to develop windows system startup applications (windows recovery consol) ?
exm: checkdisk, O&O defrag boot time tool etc.
thanx.
|
|
|
|
|
Isn't it just a matter of where they are placed in the 'run' area of the registry?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
|
thank you. cp is best. thanks you very much.
|
|
|
|
|
In the OnBeginPrinting function of my view class I am displaying a CFontDialog dialog box. I want the default font to be Arial and the default size to be 8. When the dialog box displays, it a shows default size of 50.
Here is the code. These are the first lines in the OnBeginPrinting function.
ASSERT(pDC->GetMapMode() == MM_TEXT);
LOGFONT lf;
::ZeroMemory(&lf, sizeof(LOGFONT));
lf.lfHeight = -MulDiv(10, pDC->GetDeviceCaps(LOGPIXELSY), 72);
lstrcpy(lf.lfFaceName, _T("Arial"));
CFontDialog dlg(&lf, CF_PRINTERFONTS, pDC);
if (dlg.DoModal() == IDOK)
{
m_strFont = dlg.GetFaceName();
m_nPointSize = dlg.GetSize() / 10;
}
The value returned by pDC->GetDeviceCaps(LOGPIXELSY) is 600.
The computed value for lf.lfHeight when 8 points is used is -67.
The resulting size value in the Select Font dialog is 50.
Why is the Select Font dialog displaying as font size of 50 instead of 8?
Here are the results from some other point sizes.
input dialog box
8 50
10 62
12 75
14 88
20 125
Every example of code I can find looks just like the above. Why is this code not working?
Thanks!
|
|
|
|
|
Why do you think it is not working?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I have found the answer.
lfHeight must be converted from print units to screen units because the CFontDialog class uses screen units. Here is the updated code:
ASSERT(pDC->GetMapMode() == MM_TEXT);
LOGFONT lf;
::ZeroMemory(&lf, sizeof(LOGFONT));
int nPrintDpi = pDC->GetDeviceCaps(LOGPIXELSY);
lf.lfHeight = -MulDiv(10, pDC->GetDeviceCaps(LOGPIXELSY), 72);
HDC hDC = GetDC(m_pView->m_hWnd);
int nScreenDpi = GetDeviceCaps(hDC, LOGPIXELSY);
lf.lfHeight = MulDiv(lf.lfHeight, nScreenDpi, nPrintDpi);
lstrcpy(lf.lfFaceName, _T("Arial"));
CFontDialog dlg(&lf, CF_PRINTERFONTS, pDC);
if (dlg.DoModal() == IDOK)
{
m_strFont = dlg.GetFaceName();
m_nPointSize = dlg.GetSize() / 10;
}
|
|
|
|
|
I have my own Win32 API GUI based on an image etc, and i want to insert
an IDD_FORMVIEW inside a certain area, is this possible?
because if it is it means i can make it frameless and add a menu etc, makes life a bit easier
also if it is, where would i look to find out how its done, i tried google but for this im not sure what im searching for.
|
|
|
|
|
Sarriss wrote: IDD_FORMVIEW
What is a "IDD_FORMVIEW"?
I'll assume you mean a dialog window.
Dialogs are windows (represented by an HWND). You can make a dialog window
a child window just like any other window (except popup style windows).
You can use MoveWindow() to position/size a child window in its parent's client area.
Since you're new to this, you may also want to study Windows Windowing[^]
to understand the fundamentals and the proper terminology.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
cheers mark im doing random bits and bobs here and there lol
learnt a lot though in a short space of time, ill take a look
btw the IDD_FORMVIEW is a resource visual studio thing when you add a new dialog there is a plus arrow and one of the options is that
|
|
|
|
|
|
Heh!
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
joined me in the derby???
|
|
|
|
|
It's all about the fish[^]!
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I have coded application to retrieve any running process's arguments and worked very well in Win32, but falied in 64 bit Windows(x64).
The approache is to use NtQueryInformationProcess to get PROCESS_BASIC_INFORMATION which has the data structure like:
typedef struct _PROCESS_BASIC_INFORMATION {
PVOID Reserved1;
PPEB PebBaseAddress;
PVOID Reserved2[2];
ULONG_PTR UniqueProcessId;
PVOID Reserved3;
} PROCESS_BASIC_INFORMATION;
and then use ReadProcessMemory() to get dwInfoBlockAddress in PEB2, like
struct _PEB2
{
DWORD dwFiller[4];
DWORD dwInfoBlockAddress;
} PEB2;
and so on
Here is the partial sample code:
NtQueryInformationProcess)(hProcess, ProcessBasicInformation,
&pbi, sizeof(pbi), &dwSize);
ReadProcessMemory(hProcess, (LPCVOID)pbi.PebBaseAddress,
&PEB2, sizeof(PEB2), &dwSize);
ReadProcessMemory(hProcess, (LPCVOID) PEB2.dwInfoBlockAddress,
&Block, sizeof(Block), &dwSize);
cmdLine = (TCHAR *) malloc (Block.wMaxLength+10);
ReadProcessMemory(hProcess, (LPCVOID) Block.dwCmdLineAddress,
cmdLine, Block.wMaxLength+10, &dwSize);
It failed in getting dwInfoBlockAddress of PEB2. Can any of you provide some hints/helps. Maybe the memory structures/address are totally different between 32 and 64 bit data models....??? The problem is there is no useful documents I could look at.
Thanks a lot.
Jack Rong
|
|
|
|
|
I am new to device drivers.Can anybody tell me from where it is possible to download
Windows Driver Kit
Windows Logo kit
Windows Driver Framework
I have tried this to download from microsoft websites.But it seems that the link is not there.
https://connect.microsoft.com/directory/
http://www.microsoft.com/whdc/devtools/wdk/wdkpkg.mspx
I tried these.But was unable to find.
With regards
Deepu
|
|
|
|
|
AFAIK there is no longer a separate DDK for Windows driver development. Look for Windows Development Kit 6.1 . That's supposed to have everything you need in it.
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
Thanks for the reply.can u tell me the link to download it
With regards
Deepu.
|
|
|
|
|
|
Windows SDK for Windows Server 2008 and .NET Framework 3.5
Is this i should download.It is about 1.2GB
|
|
|
|
|
AFAIK Microsoft have combined the DDK into the SDK and this is the latest SDK. Yes it's HUGE, that's why it starts off by downloading a special tool for downloading the rest of it. If you're serious about wanting to develop software then the ~$10 worth of bandwidth is probably worth it. The last time I downloaded an SDK over 56K it was 400+MB and took a week to download. Such is life.
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
I started downloading..Thank u
|
|
|
|
|
|