|
The best way is to add a control variable to your combo box and call m_Combo.EnableWindow(FALSE);
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
It looks a lot like he's using Win32 rather than MFC...
But your point is correct!
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
Yes, I am using win32. Is there a way do do it without resorting to MFC? Thanks
|
|
|
|
|
The frame work is not the issue. Rajesh's point is that you should keep the window handle to the created combobox.
Whether you do that with a HWND in Win32, or a CWnd / CComboBox in MFC is not really the issue.
If it is created as part of a dialog, then that's a bit harder.
I'd turn to spy++ and see what is different on the control in the two scenarios you describe.
I really don;t see the problem with:
HWND hCombo = GetDlgItem (hDlg, IDC_MYCOMBO);
if (hCombo) EnableWindow (hCombo, FALSE);
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
Thanks for your help. Actually, the problem was pretty stupid. I'm new to win32 programming... I had invoked WM_CREATE on my own, effectively creating 2 instances of each child window. I didn't realize that WM_CREATE was called by the window's manager upon client creation, my bad. Again, thanks for answering my question.
|
|
|
|
|
I am still futzing with my simple two-pane splitter – left pane displays tree control and the right pane displays the views selected in the tree control – parent node and some children nodes( one AVI stream and four selected frames from the AVI).
The children nodes are bitmaps - pages in tab control. The different bitmap HBITMAP structures are in the associated document attached via popup menu. Sound complicated – but that is not the issue.
Here is my dilemma – I can display only single tab bitmap. As long as I have “selected “ only one I am OK. As soon as I select another one the first one won’t display again when the tab is selected.( The bitmap selections are different frames from AVI steam).
I do verify the actual width of the attached bitmap / frame and it is OK.
Please ignore the "->" is is correct in the code just not here!
m_bmpInfo = m_CCCC_ParserDoc->m_bmpInfo[m_BitmapIndex];
VERIFY(m_bmpInfo->bmWidth > 0);
I do draw (stretch) the bitmap and it returns OK, but no bitmap in view!
if(!pDC->StretchBlt(0,00,rect.right,rect.bottom,&dcMemory ,
0,0,bmpInfo->bmWidth,bmpInfo->bmHeight,SRCCOPY /*WHITENESS */ ))
TRACE("\n Failed pDC->StretchBlt");
else
{
TRACE("\n Draw Bitmap OK ");
I tried MoveWindow – I had some issues with it when deleting views in splitter frame, but it did not do the trick.
I tried ShowWindow – no luck.
The bottom line is – the bitmap structure is correct, the bitmap draws but does not show.
I am not looking for solution, just an advice what else I should try to find out where are these bitmaps.
Any constructive suggestion is as always appreciated.
|
|
|
|
|
Vaclav_Sal wrote: Please ignore the "->" is is correct in the code just not here!
Please use the code formatting tags on your message, and then we will be able to understand better what your code is trying to do.
|
|
|
|
|
I am using all the formatting options and do not understand why this is happening with my text. Besides it is not that important in this case to resolve this issue. It is not my syntax which is the problem.
Thanks anyway for replying. Appreciate that.
|
|
|
|
|
Hi,
I was making a tests and i need to change my computer date and time ...
After return it to the correct date my compiling allways compile all C++ programs ...
When I start a program directly without compiling i receive a message informating that is out of date ...
How can correct this ... ?
Tanks for help ...
|
|
|
|
|
Chances are you have one or more project files whose time are set to the future. Find out which ones they are and "touch" them or set their times to be the present and then one more build should have everything up to date.
|
|
|
|
|
MAPIResolveName() returns 0x80004005 when called under Windows 7. The same code is working on Vista and XP. The mail client doesn't seem to matter as I get the same error from both Outlook 2007 and Windows Live Mail. Anyone got any ideas what has changed in Windows 7?
|
|
|
|
|
Hi Steve,
Stephen Griffin[^] over at Microsoft has a tool called MFCMAPI [^]. You should probably check and see if his application exhibits the same behavior. If not check his source code[^] and see what hes doing differently.
Best Wishes,
-David Delaune
|
|
|
|
|
I'm pretty sure that's extended MAPI but I'll check just in case. Thanks for the suggestion.
|
|
|
|
|
I need auto-update software.
My tcp/ip program will be heavily accessed (many many clients).
I don't want client detects file info on website (download place), because the process is slow or causes domain suspended (shared server), and software update rarely happens.
I decide to do this:
Save newly software info in database, when user logs on, client obtains the info from database - it is very fast.
Then client compares the info with actual files installed on harddist to see if any differences - download if yes.
But it is too hard to make decision what kind file info I should save to database.
At this stage, I save file size in database then client compares file size with actual installed files on harddisk.
I quite suspect about myself: is it trusted for auto-update by comparing file size?
I may add file-modified-time as comparing info - not sure.
It is too hard to make decision about this.
I need your suggestion.
Thanks
|
|
|
|
|
includeh10 wrote: quite suspect about myself: is it trusted for auto-update by comparing file size?
I may add file-modified-time as comparing info - not sure.
I used version information on an application level (only update when newer version available), plus modification time on a per file basis (only replace binaries with a newer date). If you plan to update multiple files, make sure they will be replaced together (to avoid dependency issues).
Cheers, M
|
|
|
|
|
The file size may not work - what if new file size == old file size? The modified timestamp may not work if user copies files, etc. The version info is good, but only applies to exe and dll files.
Maybe you should include a "versions.dat" file with your software, that has the version numbers of all software components, including non-exe and non-dll files. Then you could compare version numbers in versions.dat with version numbers from your server. This will remove "guesswork".
You can make this as complicated as necessary - e.g., use encryption on versions.dat file, add crc, etc., to make sure user doesn't mess with it.
|
|
|
|
|
Thanks for both of you.
File version is not suitable in my case, because file lists are not fixed, some files may be added or removed in the future.
a dat file is possibly a good idea, but things will be more complicated, let me think around ...
|
|
|
|
|
hi everyone
when i login some web site after input username and password
i also need to input the image of authentication code
picture show below:
http://ptlogin2.qq.com/getimage?aid=15000102&0.6606817924136001[^]
now i want to get this images and show in picturecontrol
i don't know how to implement it ,
help me thank you
|
|
|
|
|
it's hard ?
or you not understand what i say ?
|
|
|
|
|
How can I be notified when the selection changes in a list ctrl with multiple selection? And if many items are selected, how can I know where the focused item is? That would correspond to the punctured rectangle (if that doesn't make sense try moving the selection with ctrl+up/ctrl+down, *not* up/down).
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
modified on Monday, September 28, 2009 11:18 AM
|
|
|
|
|
Have you looked at the LVN_ITEMCHANGED and LVN_ODSTATECHANGED notifications?
"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
|
|
|
|
|
What is the difference between LVN_ITEMCHANGED and LVN_ODSTATECHANGED? Also can you give me some help on using those functions?
void CMyDialog::OnOdstatechangedListFilenames(NMHDR* pNMHDR, LRESULT* pResult)
{
NMLVODSTATECHANGE* pStateChanged = (NMLVODSTATECHANGE*)pNMHDR;
*pResult = 0;
}
void CMyDialog::OnItemchangedListFilenames(NMHDR* pNMHDR, LRESULT* pResult)
{
NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
*pResult = 0;
}
I have trouble figuring out how what those NM_LISTVIEW and NMLVODSTATECHANGE structures contain and how to glean from them whether an item has been selected/deselected.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
sashoalm wrote: What is the difference between LVN_ITEMCHANGED and LVN_ODSTATECHANGED?
The former is sent when an item has changed. The latter is sent when the state of an item or range of items has changed.
sashoalm wrote:
I have trouble figuring out how what those NM_LISTVIEW and NMLVODSTATECHANGE structures contain and how to glean from them whether an item has been selected/deselected.
MSDN is your friend.
"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
|
|
|
|
|
Are there MAKEQWORD() , HIDWORD() , and LODWORD() macros in VS2005? I can make my own easy enough, but I wanted to use any standard/official ones if they existed.
"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
|
|
|
|
|
DavidCrow wrote: Are there MAKEQWORD(), HIDWORD(), and LODWORD() macros in VS2005?
Not any that I know of.
So now you can create and publish it.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|