|
hi all,
how can i get information (in run time) about the machine which run the code,
i.e how can i know the processor model and the RAM and OS of the PC that runs the code.
so please any one knows an API or any thing like this please tell.
Note: i tried "getsysteminfo" but it gives very low level informations which i don't need.
thanks in advance
|
|
|
|
|
khalouda wrote:
i.e how can i know the processor model and the RAM and OS of the PC that runs the code.
1) HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0 registry key
2) See here
3) GetVersionEx()
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Hi
Im trying to draw a rectangle with rounded corners, using GDI and Win32, I can't use MFC.
But, in the parts that nothing should be drawed I still can see the image, but in pink :S
Any sugestions?
The code I'm using is
// Draw the mask
bmp = LoadBitmap(hInst,MAKEINTRESOURCE(IDB_MASKPRUEBA));
hbmold = (HBITMAP) SelectObject(memdc, bmp);
BitBlt(hdc, 0, 0, 536, 300, memdc, 0, 0, SRCAND);
DeleteObject(bmp);
//Draw the picture
hbmold = (HBITMAP) SelectObject(memdc, bmp);
BitBlt(hdc, 0, 0, 536, 300, memdc, 0, 0, SRCPAINT);
Thanks in advance
-- modified at 14:45 Friday 23rd September, 2005
|
|
|
|
|
|
I can't use that function
Im writting #define WINVER 0x500
but nothing, all I get is
error LNK2001: unresolved external symbol __imp__TransparentBlt@44
|
|
|
|
|
link with msimg32.lib
or, you might take a look at article Q79212 in the MSDN, if you just need to make a single color transparent.
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
Thanks so much, that solved my problem
|
|
|
|
|
I have a desktop application that must authenticate each user.
I am not allowed to have my own password file, nor to store
passwords in a database.
The application needs to work on XP and Win2K, and
will be written in VC6++.
LogonUser looks perfect, because it lets me authenticate
the passwords the same way that Windows does when users
log in every day.
It works fine on XP. It fails on Win2K, of course, because
SE_TCB_NAME is not granted to user accounts.
Any suggestions for something similar? I do NOT
need the token that is normally generated by
LogonUser, as I'm not starting a service or
impersonating a user. I only need the BOOL that
tells me the password is valid or not.
|
|
|
|
|
mmmm... I wouldn`t like to log on on an application using my windows password... I never know what are you going to do with it.
I think you need to look for another approach.
If you need login in an application you will need an encripted passwords file.
|
|
|
|
|
Company IT policy doesn't allow me to keep
my own password file, even if it is encrypted.
We thought of using the Windows password because
it is an authenticaion system already available
in the company.
|
|
|
|
|
if the user is logged in and is using your program then they are already authenticated. If you are doing this over a network then you could use named pipes and check the user at the other end..
james
http://www.catch22.net
|
|
|
|
|
I also argued the position that logging into Windows should suffice.
After all, Office works this way. We use Outlook here, and you
need not provide a seperate password for that.
The local powers here were unconvinced, so I have been looking
for a way to do it.
Thanks.
|
|
|
|
|
|
Hi all,
How can i make my application to choose a printer other than the default printer programmatically?
thanks
kleser
|
|
|
|
|
Call:
OpenPrinter()
StartDoc()
StartPage()
EndPage()
EndDoc()
ClosePrinter()
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
thanks for your reply, this works with MFC?
thanks
|
|
|
|
|
Kleser wrote:
thanks for your reply, this works with MFC?
Yes. You can try CPrintDialog.
Danny
|
|
|
|
|
Kleser wrote:
this works with MFC?
Yes. You'll also want to check out the CDC class as it has most of these as member functions.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Search MSDN for SetPrinterDevice - there is function you can write in CApp to change app current printer by name. Then default MFC printing routine will use it. Contact me in private, if you will not find it - I will send it to you.
Igor Green
http://www.grigsoft.com/
Compare It! + Synchronize It! - files and folders comparison never was easier!
|
|
|
|
|
Message when clicking on a Edit Box with the mouse
--------------------------------------------------------------------------------
How can i get a message when i click on a Edit Box with the mouse? Many thanks in advance. Serj.
|
|
|
|
|
Create a handler for the WM_LBUTTONDOWN message and then call MessageBox() . Is that at all what you were looking for?
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
I've got problems to get the handler with the edit box. My code is:
void CSubtitlesDlg::OnLButtonDown(UINT nFlags, CPoint point)
{
CEdit* pW = NULL;
pW= (CEdit*) GetDlgItem(IDC_EDIT_SUBTITLES_LIST);
GotoDlgCtrl(pW);
AfxMessageBox("Click sobre la lista de subtítulos");
SetFocus();
}
|
|
|
|
|
I would suggest getting out of the habit of using GetDlgItem() and use member variables instead. Create a CEdit member variable in your CSubtitlesDlg class and then do:
void CSubtitlesDlg::OnLButtonDown(UINT nFlags, CPoint point)
{
GotoDlgCtrl(&m_editSubtitles);
AfxMessageBox("Click sobre la lista de subtítulos");
SetFocus();
}
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
see if the OnFocus() event handler don't work better...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
(using VS.net 2003 and boundschecker 7.2 )
I have a weird behaviour with bounschecker and my simple statically linked MFC application.
I created a basic MFC application from VS.net wizard; then, I selected in the project settings to "Use MFC in a Static Library".
when running the application I get "allocation conflicts" when closing a the document ( when closing the application ) telling me that in the method void CView::PostNcDestroy() the line that contains delete this; I have a conflict (for example ) :
"Allocation Conflict: Attempting to call CObject::operator delete on 0x027D7CA0; pointer was allocated by _malloc_dbg."
If I use the "Use MFC in a Shared DLL" I have no such allocation conflict.
Do I have to set another project setting somewhere ?
Anyone have an Idea before trying to contact compuware ?
thanks.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|