|
what does this have to do with C++ ?
|
|
|
|
|
I did search and try this section of code; but the cursor did not change?
BeginWaitCursor(); // display the hourglass cursor
// do some lengthy processing
EndWaitCursor(); // remove the hourglass cursor
This was for a Visual Studio 2005 MFC C++ Dialog application.
I just want an hourglass for a few minutes while some processing is taken place.
Many thanks,
Andy.
|
|
|
|
|
I think it should work can you paste your code here ?
Also try using LoadCursor(...)
Rinu Raj
|
|
|
|
|
BeginWaitCursor();<br />
while (!g_pRecordset->GetadoEOF() )<br />
{<br />
g_TheValue = g_pRecordset->Fields->GetItem ("MessageDisplayName")->Value;<br />
g_szMessageDisplayName.Format("%s", (char *)_bstr_t(g_TheValue));<br />
j++;<br />
ProcessMessages();<br />
} <br />
EndWaitCursor();<br />
output.AppendFile(g_szFileName, m_lineData);
Nothing happens with the cursor, I use ProcessMessages() to pump the message queue so that I can update a listView that is being populated.
Any suggestions?
|
|
|
|
|
Is there any reason not going for CWaitCursor ?
You code would be modified like this,
CWaitCursor wait;
while (!g_pRecordset->GetadoEOF() )
{
g_TheValue = g_pRecordset->Fields->GetItem ("MessageDisplayName")->Value;
g_szMessageDisplayName.Format("%s", (char *)_bstr_t(g_TheValue));
j++;
ProcessMessages();
}
output.AppendFile(g_szFileName, m_lineData);
You only need to construct its object.
|
|
|
|
|
Although this code may well work, it's also possible that the ProcessMessages() call could cause the cursor to return to the standard arrow.
If that is happening, add a
wait.restore();
after the ProcessMessages() call.
Hope that helps.
-- modified at 8:43 Friday 22nd September, 2006
Karl - WK5M
PP-ASEL-IA (N43CS)
<kmedcalf@ev1.net>
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
krmed wrote: Although this code may well work, it's also possible that the ProcessMessages() call could cause the cursor to return to the standard arrow.
If that is happening, add a
wait.restore;
after the ProcessMessages() call.
I wanted to add this in my post,too. Which is mentioned in MSDN standard example.
But avoided, for sake of confusion.
Yes, you can always restore wait cursor with Restore call.
|
|
|
|
|
Andy202 wrote: but the cursor did not change?
SetCursor(...);
You can also change the cursor with your methodology. Did you check whether the lines of code that lie with in the
BeginWaitCursor();
// Some code here.. Take some time here
EndWaitCursor ();
Block are consuming that much of time for you to see the effect on your screen.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Did you try LoadCursor();SetCursor ?
|
|
|
|
|
I did one small VISUAL c++ project.
I got problem with VSS. My project is not asking the login screen when i tried to open the sln file in the project. How to solve this problem.
Please any one let me know,
Thank you.
Nice talking to you.
If you judge people, you have no time to love them. -- Mother Teresa
|
|
|
|
|
Hi guys
I have been trying to make an app that takes simple user input then modifies the memory of some process acording to what the user typed using the writeprocesssomething method but the prob is that i need to modify an array for that as well. Lemme give an example:
I have made a CEdit variable and called it m_bytes(which contains the number of bytes to be written) next i made another variable and called it m_writetoprocess(contains the stuff to patch).
The dialog looks like this:
Bytes: 3
Patch with: 90908D
so now the array that i have made in the code will look like this:
array[3] = {90908D};
but u cant modify the memory that way so how do i change the user input so that it looks like this:
array[3] = {0x90, 0x90, 0x8D};
And one more thing is it possible to read binary data using readprocessmemory then display it in ASM code for ex if i used readprocessmemory like this:
ReadProcessMemory(hProcess, (VOID*)0x12A0D856, &memoryread, 4, 0};
then, lets say, that the memoryread variable contains this binary memory code: 74653298 now how do i change this code to ASM so that it looks like this: JMP 893256 ?
Please help me with this as i have been looking for an answer for ages now without success!
Thanks in advance
Cyclone
|
|
|
|
|
While getting the input, haldleWM_CHAR and store the individual key press into the i.e : array[i]; i++ .
Or read the chars one by one in the CString and store it in the array.CString::Mid(start,count) usefull for you.
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[ ]--
[My Current Status]
Link2006 wrote:Let's take it outside of CP
Jeremy : Please don't.I would love to see this.I'm making the popcorn already.
|
|
|
|
|
Hiya fellow cpain's..
Just looking at the member list for CListCtrl but cant find anything to do hide a row using CListCtrl. I was looking for SetRowHeight or something similar. Am i missing something?
|
|
|
|
|
flippydeflippydebop wrote: but cant find anything to do hide a row using CList
Row in a list ctrl cannot be made hidden. Only way is to delete it.
nave
|
|
|
|
|
I dont try it but I think if you derived CListCtrl when you want to write items you can skip of this item
|
|
|
|
|
|
can u explain more? I dont understand what u need?
nave
|
|
|
|
|
I guess you need to check a thing,right?
|
|
|
|
|
Do you need to CListCtrl::FindItem ?
|
|
|
|
|
hi,
Given a window handle, is there any way we can know what it consists of
like child windows, Window title, menu items etc.
It would be very helpful if anyone can point to the API s or the MSDN documentaion, so that i can the use them in my win32 application.
Thanks in Advance,
Pvvr
|
|
|
|
|
Vissu89 wrote: Given a window handle, is there any way we can know what it consists of
like child windows, Window title, menu items etc.
See EnumChildWindows(...)
Also:
typedef struct {
DWORD cbSize;
RECT rcWindow;
RECT rcClient;
DWORD dwStyle;
DWORD dwExStyle;
DWORD dwWindowStatus;
UINT cxWindowBorders;
UINT cyWindowBorders;
ATOM atomWindowType;
WORD wCreatorVersion;
} WINDOWINFO, *PWINDOWINFO, *LPWINDOWINFO;
GetWindowInfo(...)
This gives some information about a window's handle that you have.....
Do not know whether this would suit your needs or not exactly?
-- modified at 2:42 Friday 22nd September, 2006
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Thanks you very much, i will try this.
Pvvr
|
|
|
|
|
and passing the application's HWND to GetWindowText() would retun you the window caption(title).
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[ ]--
[My Current Status]
Link2006 wrote:Let's take it outside of CP
Jeremy : Please don't.I would love to see this.I'm making the popcorn already.
|
|
|
|
|
Hello everyone on forum,
Is it possible to convert a cstring to a char pointer
if yes then how
basically i have a cstring and i want to use one function which takes char * parameters now i want to pass the value that is in cstring to this function how can i do that
Thanx.
|
|
|
|
|
for this purpose you can use
strcpy(char *,CString)
It will help you.
The secret of life is not enjoyment
but education through experience.
- Swami Vivekananda.
|
|
|
|