|
Is IsSQLKeyword() called often?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
preeti sharma wrote: how can i create a toolbar on a dialog box in MFC.
By performing a basic google search[^]
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Hi to all!
In my code I call 'AfxBeginThread' in which I fetch data from Database. I use 'theApp.DoWaitCuscor(1)' within thread to display hourglass cursor and 'theApp.DoWaitCuscor(-1)' to remove it when I'm done.
But this don't happens. Why?
P.S.
Thanks for all help
|
|
|
|
|
Don't do that inside the worker thread. Post a message from the worker thread to the GUI one and let the latter do the job.
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
|
|
|
|
|
Thanks for help, I post two messages one at the beginning of thread and one when all the work is done. My 'PreTranslateMessage' loks like this:
BOOL CUsageAccView::PreTranslateMessage(MSG* pMsg) <br />
{<br />
if(pMsg->message == WMU_WORK_START)<br />
{<br />
::SetCursor(LoadCursor(NULL,IDC_WAIT));<br />
}<br />
else if(pMsg->message == WMU_WORK_END)<br />
{<br />
::SetCursor(LoadCursor(NULL,IDC_ARROW));<br />
}<br />
return cdxCDynamicFormView::PreTranslateMessage(pMsg);<br />
}<br />
This works fine if I don't move mouse, but when I do cursor restores it self!
Why?
|
|
|
|
|
From MSDN , SetCursor reference
If your application must set the cursor while it is in a window, make sure the class cursor for the specified window's class is set to NULL. If the class cursor is not NULL, the system restores the class cursor each time the mouse is moved.
you may also change the class cursor of your window:
SetClassLong( hWnd, GCL_HCURSOR, (LONG)LoadCursor(NULL, IDC_ARROW));
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
|
|
|
|
|
Another thanks man!
Where do you suppose I include this line of code, in 'OnInitialUpdate' of my view?
Thanks.
P.S.
I included this line:
SetClassLong( this->m_hWnd, GCL_HCURSOR, (LONG)LoadCursor(NULL, IDC_ARROW));
at my view-s OnInitialUpdata and still no change, my cursor still reset from hourglass to arrow when I move the mouse!
modified on Tuesday, March 18, 2008 12:08 PM
|
|
|
|
|
josip cagalj wrote: Where do you suppose I include this line of code, in 'OnInitialUpdate' of my view?
Thanks.
Nope. You need to change your SetCursor(... lines with corrensponding SetClassLong(... ones.
Good luck.
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
|
|
|
|
|
Hi
i have one c++ source code.This code was good compiling in windows XP (The output of the code was return value '0')
and then i was changed into windows Vista its also compiling but it gives the return value '255'..
i am using the compiler visual studio 2005
i dont know not much of idea this problem ...
*****THANKS N ADVANCE****
Mathen.K
(I WILL TRY MY LEVEL BEST )
|
|
|
|
|
What function returns you '0' or '255'?
Maxwell Chen
|
|
|
|
|
Thanks to your replay ...
HRESULT datatype function retun in 0 (in XP) and 255(in vista)
*****THANKS N ADVANCE****
Mathen.K
(I WILL TRY MY LEVEL BEST )
|
|
|
|
|
You have two different options:
1. Hard-code your function to return 0 always.
(or)
2. Let us know what is the 'function' that you are talking about, why should it return 0 and not 255, show us any relevent piece of code, why would you still want to continue programming, etc.,
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Hi this is my sample code .
STDMETHODIMP CFileIO::VerifyUser(SAFEARRAY* userCredential, SAFEARRAY* appCredential, BYTE* result)<br />
{<br />
*result = (BYTE)false;
try<br />
{<br />
validateCredential(appCredential);<br />
validateUser(userCredential);
*result = (BYTE)true;<br />
}<br />
catch (std::exception& e)<br />
{<br />
log("Verify User", e.what(), EVENTLOG_ERROR_TYPE);<br />
}<br />
return S_OK;<br />
}
#define S_OK ((HRESULT)0x00000000L)//winerror.h
#define S_FALSE ((HRESULT)0x00000001L)//winerror.h
return S_OK ;
return S_FALSE;
this is perfectly running in windows XP and it gives return value '0'but in vista it running good but it gives the retun value 255.
whats the problem about that?
*****THANKS N ADVANCE****
Mathen.K
(I WILL TRY MY LEVEL BEST )
|
|
|
|
|
rowdy_vc++ wrote: whats the problem about that?
The problem is that you are not showing what function is returning 255. VerifyUser() returns either 0 or 1.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Actually in Windows Xp in this source code successfully compiled with return value '0'.But in vista its successfully compiled but it gives return value '255'.This is the problem.
*****THANKS N ADVANCE****
Mathen.K
(I WILL TRY MY LEVEL BEST )
|
|
|
|
|
Actually in Windows Xp in this source code successfully compiled with return value '0'.But in vista its successfully compiled but it gives return value '255'.This is the problem.
how to solve it
*****THANKS N ADVANCE****
Mathen.K
(I WILL TRY MY LEVEL BEST )
|
|
|
|
|
rowdy_vc++ wrote: This is the problem.
Indeed, since you have not shown any code that returns a value of 255.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
1. I have created a MFC single dialog based project
2. I have inserted Microsoft WebBrowser Control Activex
3. I am now able to open any web pages
But i can't suppress the javascript error. I have seen after inserting this activex control it has created a class CEXplorer1.
On VB i can set a property name suppressScript error but i can't find any property when i am using VC++ and MFC.
I am using visual studio 2005in windows XP with service pack 2 and have internet explorer 6.0
I have seen some tutorial they are saying i have to implement IOLECOMMANDTARGET::EXEC()
i want some simple solution if possible.
|
|
|
|
|
|
Hi,
I would like to use the RAS implementation in Win XP to make a dial up to my ISP and to establish the PPP link between my laptop and PDA phone.
I cannot use RASDial as the phone is not recognized by Win XP as a hardware connected even though the 2 devices are linked using Bluetooth.
I read that using RasCustomScriptExecute allows me to dial out through a specific com port. I would like to seek for assistance on some samples to get me started, as the MSDN examples are not enough for my understanding.
Thanks and regards,
PS
|
|
|
|
|
Hi,
Anyone know whether Open button in a MS office Open file dialog is a "BUTTON" or not. Why the spy++ is also not identifying it as a window? . And if it is a button it implements all button messages such as BN_CLICK etc.
thanks
Nitheesh
|
|
|
|
|
Hi,
I have a function in which I am passing to a character pointer (char *) by reference e.g. make_num(char *& str)
the first data variable I declare in my Function is a 255 byte character array e.g. char hold_area[255}
So my my code looks like this
Make_num(char *& str)
{
char hold_area[255]
When I refrence the address of the begining of thiis area e.g. &hold_area[0] it seems to be off by 4 bytes meaning when I look at the actual address in code hold_area[0 - 3] has some value maybe a pointer where my actual data starts in hold_area[4] ???
I prototype make_num( char *&); ???
A compiler glitch ???
thankx
|
|
|
|
|
ForNow wrote: Make_num(char *& str)
{
char hold_area[255]
How do you copy str to hold_area ?
Maxwell Chen
|
|
|
|
|
Its a = assignment e,g,
if ((char *) dtr >= 0x30 || (char) *str <= 0x39)
hold_area[i] = (char) *str
Hey just had a thought when I looked at the assembly code this data was referenced by the ESP reg
If I am calling by reference then there is no need to push to variable on the stack
maybe I should declare make_num with stdcall (I think ??) I am going to have to test this out
thankx
|
|
|
|