|
Pasy_m wrote: 2) I use VisualStudio 2005 and there I cannot find any "NumberOfCores" at WIN32_processor...??
See here.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Ok. I found it, but that's value I already get with GetSystemInfo(). I still need to get the MWI-objects for all four CPU-cores...
|
|
|
|
|
It seems to be a problem at the window-side. I could test my software on a single-core CPU with Hyperthreading (number of cores = 2) and in this case I got the data for both "cores"...
|
|
|
|
|
Hi friends,
I had tried to stretch a Gif image and unable to do
My code is :
CImage image;
HDC dc = GetWindowDC()->GetSafeHdc();
BYTE *m_buffer;
CFile file;
if( !file.Open( MAKEINTRESOURCE(IDR_GIF1), CFile::modeRead) )
return false;
long m_buffer_size = (long)file.GetLength();
m_buffer = new BYTE[m_buffer_size];
if ( file.Read(m_buffer, m_buffer_size) != m_buffer_size )
return false;
file.Close();
IStream *pIstream;
CreateStreamOnHGlobal(NULL, TRUE, (LPSTREAM*)&pIstream);
ULARGE_INTEGER ulnSize;
ulnSize.QuadPart = m_buffer_size;
pIstream->SetSize(ulnSize);
LARGE_INTEGER lnOffset;
lnOffset.QuadPart = 0; //starting location is 0
pIstream->Seek(lnOffset, STREAM_SEEK_SET, NULL);
ULONG mysize;
pIstream->Write(m_buffer,m_buffer_size,&mysize);
image.Load(pIstream);
CRect rectDest;
rectDest.top = 0;
rectDest.bottom = 50;
rectDest.left = 0;
rectDest.right = 50;
image.StretchBlt(dc, rectDest, PATCOPY);
image.Draw(dc,0,0);
Kindly help me ..
Thanks in Advance..
|
|
|
|
|
Try SRCCOPY rather than PATCOPY?
|
|
|
|
|
Thanks for your kind reply,
I had tried it and doesn't work
i hope the coding itself getting wrong
if you have any other method
kindly send me
Thanks & Regards,
Jeeva
|
|
|
|
|
OK, here's the answer I was going to give you before I realised that PATCOPY doesn't work and SRCCOPY does (by trying it).
You have a whole load of steps - any one of which could be failing. You don't check returned status codes - any one of them could be failing and you don't know. So, try adding some error checking so you know what's going wrong.
Also, what's with the IStream and HGlobal stuff? You don't need that to read a CImage from a file - here's the code I'm using in my OnPaint :
PAINTSTRUCT ps;
CDC * drawDC = BeginPaint(&ps);
CRect rcClient;
GetClientRect(&rcClient);
CImage image;
image.Load(_T(image filename));
image.StretchBlt(*drawDC, rcClient, SRCCOPY);
EndPaint(&ps);
Simpler, no? Simple's good.
|
|
|
|
|
Great it works well,
Thanx for your answer
With regards,
Jeeva
|
|
|
|
|
Hi all,
I have made a dialog based application in vc2008, my problem is while my application is running if i press T it pops up a message from application...
I am not getting why i am getting this problem....
How can i remove this......
|
|
|
|
|
VCProgrammer wrote: if i press T it pops up a message from application...
Which message ? What does it say ?
|
|
|
|
|
hi guys!
I currently need a modeless dialog in wich i need this behavior.
The modeless dialog shows, and then if i click it's parent will bring the parent dialog to top most. But i can not achieve this behavior, i create the modeless dialog but when i click the parent window it becomes active but the modeless child window stay on top.
I tried to use setparent but my app crashes. i am using something like this:
<pre>CMydialog * dialog = new CMydialog();
dialog->Create(IDD_DIALOG);
// dialo->SetParent(this);
dialo->ShowWindow(SW_SHOW);</pre>
but when i uncomment setparent it crashes. Please someone help me, i am a noob in this!
|
|
|
|
|
Try this,
In .h file
......
CMyDialog* dialog;
.....
In .cpp file
.....
if (dialog != NULL)
m_pDlg->SetFocus ();
//
// If the dialog box doesn't already exist, create it.
//
else
{
dialog = new CMyDialog;
dialog->Create (IDD_OPTIONS);
m_pDlg->ShowWindow (SW_SHOW);
}
|
|
|
|
|
Thanks dude!
But i know now how to do what i asked for, is use the desktop window like it's parent
dialog->Create (IDD_OPTIONS, GetDesktopWindow());
and that´s it.
|
|
|
|
|
Hi,,
I have a file abc.reg.I want to install the registry file , but the main point is the RUN dialog as well as the conformation dialog should be hidden to the user. After shell execute the installation should be done silently.
Any help is appriciated.
Regards,
KDevloper
|
|
|
|
|
You must use CreateProcess instead of ShellExecute .
Give the lpCommandLine parameter as Regedit.exe /s <.REG filename>
«_Superman_»
|
|
|
|
|
Hi All
How to know my exe kill through Windows Task Manager?Plz help me
|
|
|
|
|
|
Thanks for reply
But can you tell me how to know through code?
|
|
|
|
|
pls explain did't got it.
|
|
|
|
|
|
Hi,
In my project we are using Visual Studio IDE. My compliler is not doing padding.I have to send one file to another project.That project is using Carbide IDE. That compiler is doing padding.
So I have to do padding and I have to send file.How to do padding using
#Pragma pack().
|
|
|
|
|
#pragma pack(n) where n can be a value of 1, 2, 4, 8 or 16.
«_Superman_»
|
|
|
|
|
hi all,
I have made a dialog based application in vc2008...
my problem is when i run my application sometimes it gives an error
Window has triggered a breakpoint in program.
This may be corruption of the heap, which indicates a bug in program or any of the dll it has loaded....
This may also be due to user pressing F12 while Program is in focus.
The output window may have more diagnostic information...
and sometimes it runs fine....
my application runs in release mode so can't debug it....
how can i resolve my problem...
|
|
|
|
|
Why cant you run it in debug?
|
|
|
|
|
Run the application in debug mode and read here[^]
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|