|
I think you didn't google it
Well just refer this article [^]
Величие не Бога может быть недооценена.
|
|
|
|
|
|
Here you go, it may not compile just yet though.
char *answerForumQuestion(char *requestString, bool isUrgent)
{
if (isUrgent)
if (rand() % 2)
return NULL;
else return ptrToRequestStringErrorMessage;
if (isClear(requestString) && effortShown(requestString))
{
if (forumReaderUnderstands(requestString))
return formulateAnswer(requestString);
}
return NULL;
}
|
|
|
|
|
You forgot the case for which this is the third (or more) times that the OP asks the question and completely ignores the replies he received...
|
|
|
|
|
Hi Eswar,
This is Carlo.
Looks like you keep ignoring received answers to previous requests about the same argument. Do you realize this attitude is a serious obstacle on your way to success?
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]
|
|
|
|
|
Hi,
I want to create one applciaiton which displays as banner in the top of desktop,when i press the buttons in banner i will get my views as seperate window.
When i start the EXE only that banner willget displayed in desktop and it changes display of items in desktop.Like My Computer,My documents will realigned and displayed below my banner.
I do not know how to get start.
So please help me to give some idea to start and also if there article is there.Pls forward the link.
'I dont know how to add images to this post,otherwise i will attach sample page here'
Anu
|
|
|
|
|
Anu_Bala wrote: I do not know how to get start.
This is quite a complex project and the above comment suggests you are just starting out. Do you know how to create a simple Windows program with menu, toolbar etc?
|
|
|
|
|
Hi All
i need a c++ code to disable keyboard and mouse input. can any body help me. I didn't find much help on net. Thank u all in advance.
Cheers,
Sus.
|
|
|
|
|
If you want to block the Key board and mouse input reaching your application then use BlockInput API [^]
Величие не Бога может быть недооценена.
|
|
|
|
|
Thank u very much for the reply.
can i use this methode it in consol based c++ application?
|
|
|
|
|
So you want to block the keyboard and mouse input of that console application?
Величие не Бога может быть недооценена.
|
|
|
|
|
yes. Is it possible? or i shd go 4 dialogue based application.?
|
|
|
|
|
Yess 100% possible
you need to include these files is needed
#include <afx.h>
#include <winable.h>
But i cannot understand the purpose of doing so.
Величие не Бога может быть недооценена.
|
|
|
|
|
i wrote like this
#include <iostream>
#include <windows.h>
#include <winable.h>
using namespace std;
int main()
{
BlockInput(true);
Sleep(5000);
return 0;
}
its working fine for 5000ms only. but my motto is to unlock the system while i press esc key. how to do this? plz help.
|
|
|
|
|
BlockInput itself is done to block any keyboard event till some action is over. So how can it be possible to click of ESC to work?
Величие не Бога может быть недооценена.
|
|
|
|
|
I new at C++ but i can't seem to figure out whats wrong with my code.
//Specification: Display a menu
//Find Errors in this program
#include <<iostream>>
int main ()
{
cout << "Choose From Martha's Menu:/n";
cout << "1 - Dinner" cout << endln << 2 - "Lunch: ";
cout << endln << "3 - Breakfast";
cout << "Enter a number:"
int Choice = 0;
cin >> choice;
cout << "\n You Choose " << choice;
return 0;
}
|
|
|
|
|
PLease try to learn the usage of syntax of C++. The syntax used in your code is wrong.
Syntax related error can be cleared only working with it.
Which you have do
I prefer you to study with Learning C++ A hands On Approach by Eric Nagler. [^]
Well your case firstly #include <iostream>
you didn't specified the namespace.
Either use
using namespace std
std::cout
and next is related endln, actually that is endl.
Please learn using the text, it is better for you.
Величие не Бога может быть недооценена.
|
|
|
|
|
halestorm 222 wrote: i can't seem to figure out whats wrong with my code.
How do you know something is wrong?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I have calling Initialize function with these parameters
Initialize(this->GetDC(),200,200);
Unhandled exception occurred at: m_pBitmap->CreateCompatibleBitmap(pInputDC,width,height);
void Initialize(CDC* pInputDC,int width, int height)
{
CDC *m_pDC;
CBitmap* m_pBitmap;
m_pDC->CreateCompatibleDC(pInputDC);
m_pBitmap->CreateCompatibleBitmap(pInputDC, width, height);
m_pDC->SelectObject(m_pBitmap);
m_pDC->Rectangle(0,0,width,height);
}
This is shown in call stack when exception occurred:
mfc80ud.dll!CGdiObject::Attach(void * hObject=0xb90510f0) Line 1157 + 0x3 bytes
mfc80ud.dll!CBitmap::CreateCompatibleBitmap(CDC * pDC=0x004bf954, int nWidth=336, int nHeight=189) Line 251 + 0x25 bytes
AxGraph.ocx!CGraphCtrl::Initialize(CDC * pInputDC=0x004bf954, int width=336, int height=189) Line 27
I could not understand why is this happening. Help to resolve the issue.
|
|
|
|
|
Did you allocated memory for of CBitmap* and CDC* using new?
Величие не Бога может быть недооценена.
|
|
|
|
|
Thanks. I forgot to allocate memory. After allocating memory its working.
Thanks again
K.Masood
|
|
|
|
|
Hi,
Usually I instantiate my CDialog based classes in my view class. Then CMyView class typically creates a modal dialog and then launches a function on OK from which I can easily access the dialog variables.
Unfortunately, the wizard implementation of CPropertySheet has no default constructor. So you are forced to construct it in the view function that is called from a toolbar menu or similar. Then the property page variables have to be duplicated in CMyView class and copied. I have 2 books that show it done this way.
Here is the wizard CPropertySheet constructor code-
CMyDlg::CMyDlg(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage)
:CPropertySheet(nIDCaption, pParentWnd, iSelectPage)
{
}
CMyDlg::CMyDlg(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage)
:CPropertySheet(pszCaption, pParentWnd, iSelectPage)
{
And the constructor in CMyView looks like -
CMyDlg CMyDlg(_T(" "),this);
or
CMyDlg CMyDlg(_T(" "));
if (CMyDlg.DoModal() == IDOK){
(both verified to work)
If I now add the appropriate default constructors to the PropertySheet .h and .cpp files -
CMyDlg();
CMyDlg::CMyDlg():CPropertySheet()
{
}
I then instantiate CMyDlg in the view class instead of constructing it in the menu function.
I don't get any compile errors but the dialog (property page) does not display when DoModal is called even though there is no run time error.
I suppose I should admit defeat and call the constructor as designed.
modified on Friday, October 30, 2009 12:55 AM
|
|
|
|
|
HI all,
I have written some code about changing Modification Time and Access Time in File.
My code tries to change both time every one minute.
But, sometimes, Modification Time is not changed by _utime() with 'NO ERROR' after running few hours. (but, Access time is changed.)
Below is the code used to changed times.
if anyone know why the problem is appeared and how i can solve,
Please, let me know
Thanks.
+++++++++++++++++++++++++++++++++++++++++++++++
BOOL SetModificationTime( time_t t )
{
struct _utimbuf uti;
uti.actime = t;
uti.modtime = t;
if (_utime(szPath, &uti))
{
OutputDebugString("Error : Faid to change time");
return FALSE;
}
}
--------------------------------------------------
|
|
|
|
|
|
Thank you for answer~
But, SetFileInformationByHandle need at least Windows Vista OS.
My Program's minimum supported client is Windows 2000. T.T
is There any other way to solve?
Please Let me know.
Thanks.
|
|
|
|