|
I think you got this backwards:
"PostMessage forces events to be dealt with immediately, SendMessage buffers the messages in a queue to be dealt with in FIFO order."
I am pretty sure SendMessage dispatches message into the receiver's message queue immediately and PostMessage will add it to the queue.
|
|
|
|
|
Blake Miller wrote:
I think you got this backwards:
Whoops. Of course you're correct
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts your aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
I have a problem getting CEditView::SerializeRaw() to work whenever I try to use the usual "tricks" to get the WinXP look-n-feel to work (xxx.exe.manifest, or the xxx.rc tricks). It only sends 1 character to the file.
Also, when trying to use the "Find" menu item in a project (and using the above-mentioned "tricks"), I get the dialog to appear but it doesn't interact with my program.
I tried the sample "NPP" example (that comes with MSDN) and it gives the same problems, except I get nothing but [] (square chars. (nulls?)) when I load a text file.
If I remove the "WinXP tricks", then everything works properly as expected, but of course no WinXP look'n'feel.
Anyone have a clue what I need to do to get the WinXP look'n'feel to work properly on the WinXP platform? I am using the Platform SDK 2003 and VC++6 with SP6.
Thanks in advance
|
|
|
|
|
ok so i did some testing and you can randomly select items by holding control or you can select a group by using shift how does one get the random select functionality by just clicking?
thanks
Tyrus
|
|
|
|
|
You have to handle the LVN_ITEMCHANGING and LVN_ITEMCHANGED notifications from the list control.
The default behavior of an unmodified click (no shift or ctrl keys) in the list control is to deselect all selected items, and then select the item clicked on.
You will need to handle the notifications such that you prevent the deselection of items you want to remain selected, and to allow the selection of items you want.
Software Zen: delete this;
|
|
|
|
|
Dear ALL ,
How to issue the mouse_event without "SendInput" and "mouse_event"?
and Cloud you expend "SendInput" how to issue the mouse event to os?
Is it need to use interrupt or someone ?
Thanks in advance.
Aaron
|
|
|
|
|
Hi,
I'm trying to create a project using multiple document templates on a windows CE target. Starting my application the menu line is missing. Why ?
|
|
|
|
|
Hello,
I need to calculate the response time of a http request using a VC++ program.Is there any function MFC classes(CHttpRequest or CInternetSession) that provides response time or should I calculate it manually.
Please help me.
regards and thanks,
John.
Overcome fear,everything is possible.
|
|
|
|
|
I don't think that it provides such a feature. Calculate it manually, that should make things easier.
Don't try it, just do it!
|
|
|
|
|
hello i have a list control and i want it to be multi select but currently the only way to multi select is to hold down shift how does one make it function more like a list box
thanks
Tyrus
|
|
|
|
|
http://www.codeproject.com/combobox/listbox_tut.asp?df=100&forumid=1373&exp=0&select=655474
|
|
|
|
|
im not looking for list boxs im looking for list controls
thanks tho
|
|
|
|
|
In function OnItemchangedListCtrl put:
NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
m_cListCtrl.SetItemState(pNMListView->iItem, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED);
|
|
|
|
|
You'll need to subclass the list control and reflect the L-click message so you can handle (see the list control classes at CP for examples). In the L-click handler, add the item to the list of selected ones by doing:
SetItemState (nItem,
LVIS_SELECTED | LVIS_FOCUSED,
LVIS_SELECTED | LVIS_FOCUSED); /ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hi guys,
Just encountered a small problem with ADO when trying to read data from two tables in a database that have the same variable names. In my example I have table_1 with a variable called "id" and a table_2 which also has a variable called "id". The id's in each table are not related. I then want to execute a mysql query something like this:
select table_1.id, table_1.country, table_2.id, table_2.country \
from table_1,table_2 where table_1.country=table_2.country
In this case I am matching table_1 to table_2 by country. So far so good. The problem comes when I want read back the values using this method:
var_1 = (long *) (_bstr_t)pRecordSet->GetCollect("id");
In this line above, how does ADO know which id value I am referring too?? I tried this:
var_1 = (long *) (_bstr_t)pRecordSet->GetCollect("tablel_1.id");
var_2 = (long *) (_bstr_t)pRecordSet->GetCollect("tablel_2.id");
.. but it didn't like "tablel_1.id" How can I distinguish between the two if tables contain the same variable names? In this case "country" is the same in both tables, so that one doesn't matter, but id dcoes. I can't find any example anywhere in books or the web. All the examples seem to have tables with completely different variables names and hence do not have this problem.
Help anyone?, I would be very grateful.
Graham.
|
|
|
|
|
Try using column aliases. For example your query can be written as:
<code>SELECT</code> table_1.id <code>AS</code> id1, table_1.country, table_2.id <code>AS</code> id2, table_2.country
<code>FROM</code> table_1,table_2
<code>WHERE</code> table_1.country=table_2.country;
and then, try using "id1" and "id2" to retrieve values.
Arsalan Malik
|
|
|
|
|
That's great, thanks!
Graham.
|
|
|
|
|
My MDI app runs in one of 2 modes (detected in the app's InitInstance() ). In "regular" mode, I'd like the mainframe window to use the standard IDR_MAINFRM menu. When the app is in "special" mode, I want it to use an alternate menu (eg: IDR_MAINFRM_SPECIAL ).
It's easy enough to provide conditional menus for my views, since I can just specify the appropriate menu id when I create the MultiDocTemplate s. But how do I switch the mainframe window's menu?
A gentle nudge would greatly help this sleep deprived developer.
PS: Btw, I'm using Bruno's NewMenu[^]
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com.
|
|
|
|
|
|
|
Someone gave me this COM DLL to use in my project (co-worker).
The DLL is written in VB.
After doing the #import, I cannot compile. There are references to a "_ErrObjecPtr" (ErrObject smart ptr).
But the ErrObject doesn't resolve in C++...
Any clues out there?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.santacruznetworks.com">Santa Cruz Networks</A>
|
|
|
|
|
I have set the item in a ListCtrl via the statement:-
m_cListCtrl.SetItemState(m_nSelectItem, LVIS_SELECTED, LVIS_SELECTED | LVIS_FOCUSED);
But how do you arrange for the item to be shown as selected as if it was selected by a mouse click?
grahamfff
|
|
|
|
|
m_cListCtrl.SetItemState
(m_nSelectItem,
LVIS_SELECTED | LVIS_FOCUSED,
LVIS_SELECTED | LVIS_FOCUSED); /ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Did try your suggestion but nothing highlighted.
Are they any additional properties I need to set?
grahamfff
|
|
|
|
|
I did also try and modify the CodeProject sample ListCtrlDemo as floows but no luck:-
void CListCtrlDemoDlg::OnItemSelect() <br />
{<br />
UpdateData(TRUE);<br />
<br />
int nCount = m_cListCtrl.GetItemCount();<br />
if (m_nSelectItem >= nCount)<br />
{<br />
AfxMessageBox(_T("You entered an out of range index."));<br />
m_nSelectItem = 0;<br />
}<br />
else<br />
{<br />
m_cListCtrl.EnsureVisible(m_nSelectItem, FALSE);<br />
m_cListCtrl.SetItemState(m_nSelectItem, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED);<br />
}<br />
UpdateData(FALSE);<br />
<br />
}
grahamfff
|
|
|
|