|
if you want to compare two images a way is that isnt very good you can use of CImage class you make two loops for height and width and use of GetPixel for check color of pixel on each images but this way is a problem and its slow but I think on the codeproject is other ways.
|
|
|
|
|
Hi,
Can you help me how to "synchronize" .NET DateTime.Tick and C++ time (CTime, LPSYSTEMTIME, t_time doesn't matter which one) . I need to write certain time to file (using .NET C# -> write Ticks value) and than read it in C++ == create time structure (constructor with !same! ticks or something...) . I'm using old VS 6 C++ !!!
thanx
|
|
|
|
|
Please help me. I'm looking for DFP and Newton optimization methods. They may be written in C, Java or C++. And I don't want Newton Raphson method.
|
|
|
|
|
Hi
I am trying the change the default font of the menu.
I have used code from http://www.codeproject.com/menu/menuch.asp.
In the App file,there are AppendMenu(),DrawItem() overriden functions.
Under drawItem(),I have written the code to change the default
font of the Menu.I have declared objects like m_FileMenu, m_EditMenu
of type App class in the Mainframe header file and through these variables
I have called AppendMenu() from within the constructor of Mainframe class.
Like m_FileMenu.CreatePopupMenu();
m_FileMenu.AppendMenu(MF_ENABLED,ID_MYFILE_NEW,"&New\tCtrl+N");
m_FileMenu.AppendMenu(MF_ENABLED,ID_FILE_OPEN,"&Open\tCtrl+O");
Similarly, I have called AppendMenu()for m_EditMenu object also.
Next,Under CreateMenu()which has been called from OnCreate handler,I have
taken the pointer of CMenu through GetMenu(), and all the default items of
menu have been removed through RemoveMenu().
Like pMenu->RemoveMenu(0,MF_BYPOSITION);
Then,through that CMenu pointer,I have called InsertMenu() through which all
the appended items are getting inserted in the menu.
Like
pMenu->InsertMenu(0,MF_BYPOSITION|MF_POPUP,
(UINT)m_FileMenu.m_hMenu,"&File");
pMenu->InsertMenu(1,MF_BYPOSITION|MF_POPUP,
(UINT)m_EditMenu.m_hMenu,"&Edit");
Now,the problem is that although the font of all the submenu items are getting changed as per my given font in the drawitem(), but the font of menu items like "File" and "Edit" are not getting changed.
If possible Can you please tell me what could be the reason behind it and what should I do to solve it?
-- modified at 5:23 Monday 23rd April, 2007
With Regards
Neeraj Sinha
Netstudio
Pune
|
|
|
|
|
Menu will be drawn as per the system font settings.
You can try with Owner-Drawn menu
Search CP to find more articles on it.
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
Thanks for your reply
I have tried with Owner-Drawn menu.The menu items font didn't change.Only the submenu items font got changed.I have used code from the CP itself:
http://www.codeproject.com/menu/menuch.asp.
With Regards
Neeraj Sinha
Netstudio
Pune
|
|
|
|
|
I made one dialog box in VS2005(mfc) it is not running in Vist(OS) system, is there any way to run mfc application in vista?
|
|
|
|
|
Please refer this[^].
Regards,
Paresh.
|
|
|
|
|
Dear sir
Thank you for your replay
But i am getting earror is "application has filed to start because its side-by-side configaration is incorrect................."
I am checking my (MFC)application in "Vist home basic"
|
|
|
|
|
mahe_uma wrote: application has filed to start because its side-by-side configaration is incorrect
You need to install the MFC 8 DLLs, vcredist_x86.exe.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
|
|
|
|
|
dear sir
thank you for you replay
already i installed vcredist_x86.exe still i got this problem i think Actually problem is in VS2007
thank you
|
|
|
|
|
Hi friends,
how to get the system date and time in visualc++??
i know we need to use ctime include file..
but afterthat how to get??
any example code ??
waiting for your valuable reply..
with regards,
karthi..
|
|
|
|
|
CTime::GetCurrentTime
--
======
Arman
|
|
|
|
|
Hi,
You can use Win32 API's GetSystemTime()/GetLocalTime()..
Here is the sample code..
SYSTEMTIME st;
GetLocalTime(&st);
Cheers,
Suresh
|
|
|
|
|
mkmut wrote: how to get the system date and time in visualc++??
Use GetLocalTime API.
|
|
|
|
|
Please refer below code.
CTime time = CTime::GetCurrentTime();<br />
<br />
int day = time.GetDay();
int month = time.GetMonth();
int yearlong = time.GetYear();
<br />
int hour24 = time.GetHour();
int min = time.GetMinute();
int sec = time.GetSecond();
Regards,
Paresh.
|
|
|
|
|
|
I want to check whether the system, in which my application will run is connected in Network or not? How can I do that?
|
|
|
|
|
Aryan S wrote: I want to check whether the system, in which my application will run is connected in Network or not
Use...
IsNetworkAlive
|
|
|
|
|
See here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi ! I want to development a file system filter driver, in VC++. Can it be developed using DDK kit? or I will have to purchase the IFS kit? Plz specify what needs to be installed for file system filter development? Would be the DDK enough? Can I develop it in VC++ using the DDK?
|
|
|
|
|
Can any body help me to convert std::string to char * ?
Thanks in advance.I am working on win32(UNICODE)api in vs2005.
"Success lies not in the result , But in the efforts !!!!!"
Amit Mistry - petlad -Gujarat-India
|
|
|
|
|
Use the c_str() member function:
std::string strMyString = "Test";
char* pTemp = strMyString.c_str();
|
|
|
|
|
amitmistry_petlad wrote: Can any body help me to convert std::string to char * ?
Use string::c_str .
e.g
std::string sTest("Test");
const char* ptest = sd.c_str();
Prasad
MS MVP - VC++
|
|
|
|
|
prasad_som wrote: const char* ptest = sd.c_str();
of course should be sTest.c_str() .
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.
|
|
|
|