|
To set screen resolution, you've to use ChangeDisplaySettings(). For that this[^] will help you. May need to have a look at this[^] too. And I think you can dig out better how to use them.
|
|
|
|
|
Please try with
SystemParametersInfo() with SPI_SETWORKAREA
Regards
Radhakrishnan G.
|
|
|
|
|
Hi All !
I'm running an application that spwans several processes and threads, it runs on Windows 2003 Server OS and using 8 cpu's machine(Xeon).
We are considering the use of SetProcessAffinityMask to allocate heavy processing jobs to a spcific cpu. My question therfore is this:
Using SetProcessAffinityMask, is it possible to tell the OS that I want my process to be the only one using that cpu (i.e. no other process, mine or the OS's, is allowed to run on it) ? is it possible ?
We wish to get deteministic results when system is working for long periods of time.
thanks,
Amit
|
|
|
|
|
AmitCohen222 wrote: no other process, mine or the OS's, is allowed to run on it) ? is it possible ?
I don't believe so.
You may want to use SetThreadAffinityMask to distribute threads among processors,
but there's no guarantee the system will actually use your suggestions.
Try it and test it thoroughly to see if you're actually getting any benefit -
from my experience, on XP and above, the OS thread scheduler does a pretty good
job without intervention.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
HI,
I want to pass argument for my application.My application is dialog based.so Please help me i have no idea how to do it.
Thanks
mailto: anubhava.prodata@gmail.com
|
|
|
|
|
|
If you wish to pass command line arguments in IDE go to "Project | Properties | Debugging | Command Arguments". Here you can specify your command line arguments.
Hope this will help you.
Thanks,
Paresh.
|
|
|
|
|
But how to check the passed arguments value at the initilization of application.
Best Regard
Anubhava Dimri
mailto: anubhava.prodata@gmail.com
|
|
|
|
|
In CWinApp::InitInstance .
Please have a look at CWinApp::m_lpCmdLine .
Hope this will serve your purpose.
Regards,
Paresh.
|
|
|
|
|
It's very helpful for me.
Very -2 Thanks
Best Regard
Anubhava Dimri
mailto: anubhava.prodata@gmail.com
|
|
|
|
|
|
i have 1 dialog application.my dialog
application is sending some messages to other appication.i want to save these
messages into xml file and so that later it can be executed.means i neeed to implement
to create,read n write to xml file.
thanks in advance
|
|
|
|
|
|
|
Download the Microsoft XML Parser SDK and dig through the documentation. You'll probably find that using smart pointers and the DOM approach to be adequate for most scenarios.
|
|
|
|
|
Hi all,
i m draw a rectangle with this.
CRect rectrect;
CDC* pDC;
pDC->Rectangle(rectrect.left,rectrect.top,rectrect.right,rectrect.bottom);
here the sides of rectangle appears very light ,i want to make it dark.
please tell me how can i do this.
thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
The Rectangle function draw the border with the currently selected pen. So to get a dark border, before calling Rectangle, select a pen with dark color as show below
CPen DarkPen( PS_SOLID,1, RGB(0,0,0));
pDC->SelectObject( &DarkPen );
pDC->Rectangle(rectrect.left,rectrect.top,rectrect.right,rectrect.bottom);
|
|
|
|
|
Thanks its done.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Hello All,
I am doing an SDI application in MFC(.Net 2008 platform). In my project, when i click on any button, i have to create a child window in the mainframe window. This child window having no caption, title bar, system menu. i want only border for that window. This child window will always be displayed on the Mainframe window, even i click anywhere on the mainframe window.
I have created window using CreateEx() function and Set its position using SetWindowsPos() function. as follwing;
Problem is that, when i minimize the Mainframe window, child window always be there on the screen. i want to change this child window size along with Mainframe window. How can i do this. Please give me any hint with the help of code.
Which flag i have to set while creating the window or in the SetWindowPos() function.?
Thanks in advance.
|
|
|
|
|
I am writing an application using C++ and MFC. Is there a way for my application to know how many cores/CPUs are on the machine? The reason I am asking is that it is multi-threaded and I would like to have one worker thread for every core/CPU on the machine. Any ideas?
Thanks
Bob
|
|
|
|
|
|
If you need this to work on NT or 2000 then you can use...
SYSTEM_INFO sysInfo={0};
::GetSystemInfo(&sysInfo);
TRACE("Number of Processors = %d\n",sysInfo.dwNumberOfProcessors);
|
|
|
|
|
First, I want to thank to two individuals that responded to me.
This second solution seems simpler and better then the first answer. I believe it will work on XP and Vista also. Please correct me if I am wrong about this. Is there any reason to prefer the first solution to the second?
Thanks
Bob
|
|
|
|
|
BobInNJ wrote: I believe it will work on XP and Vista also
Thats my understanding. I believe I tested it once on my home laptop (Vista) with a multi-core cpu. I walked away from that test satisfied that the function detected multiple CPU's. However, I've not done an exhaustive test with non-intel chips and such.
|
|
|
|
|
Hi!
my file looks like:
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdexcept>
#include <iostream>
#include <eo>
#include <ga.h>
using namespace std;
and then remains of FirstBitGA.cpp file of tutorial-lesson1 of EO project (http://eodev.sourceforge.net/,I don't know whether it matters).
I run it in Visual C++ Express Edition (MS Visual Studio 2005, Version 8.0.50727.762 (SP.050727-7600),Microsoft .NET Framework Version 2.0.50727 SP1)
During linking it throws errors:
FirstBitGA.obj : error LNK2019: unresolved external symbol "class std::basic_ostream<char,struct> > & __cdecl operator<<(class std::basic_ostream<char,struct> > &,class eoPrintable const &)" (??6@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AAV01@ABVeoPrintable@@@Z) referenced in function "void __cdecl main_function(int,char * *)" (?main_function@@YAXHPAPAD@Z)
FirstBitGA.obj : error LNK2001: unresolved external symbol "class eoRng eo::rng" (?rng@eo@@3VeoRng@@A)
FirstBitGA.obj : error LNK2001: unresolved external symbol "private: static int const eoRng::N" (?N@eoRng@@0HB)
FirstBitGA.obj : error LNK2001: unresolved external symbol "private: static unsigned long const eoRng::K" (?K@eoRng@@0KB)
FirstBitGA.obj : error LNK2001: unresolved external symbol "private: static int const eoRng::M" (?M@eoRng@@0HB)
\Projects\eo2\Debug\eo2.exe : fatal error LNK1120: 5 unresolved externals
I sought couple of days on the net and tried plenty of solutions but didn't find any working one. Please help, I would be very pleased. Thanks for your time.
|
|
|
|