|
Thanks a lot for your concern.
But i don't want to change the dialog size. The dialog size should be fixed.
The button and Listbox together should work similar to a combo box.
So the Listbox here should extend below the dialog as in the case of listbox of a combo box.
I am planning put the list box inside a popup dialog and invoke it on click of the button. But then i had to use a dialog resource only to show the listbox.
Please help me out if there is any alternative.
once again thanks a lot.
|
|
|
|
|
harsha u wrote: The button and Listbox together should work similar to a combo box.
Hmmm - OK.
In that case, I would think you should look up how the various combobox-articles[^] here on code project manage the drawing of their drop-down box. And learn how they do it.
This probably involves creating a borderless window, and maybe the listbox-ctrl itself is enough for that. Or maybe you need to draw a window yourself and place the listbox-ctrl on top of it.
But I never did a thing like that.
Failure is not an option - it's built right in.
|
|
|
|
|
harsha u wrote: How can we show the whole list box even when the bottom of the list box is greater than the bottom of the dialog?
Yes make this list box a child of the desktop window but read this[^] before proceeding.
You will also need SetCapture and ReleaseCapture to close your listbox to when clicked outside listbox area.
|
|
|
|
|
Hai...
i am developing application like chat. In this i have added font styles like(bold,Italic,underline and size.) if i chose some of the styles and typing in my richeditbox so the respective styles font s are coming. now i want to send the text with same style fonts in chat history richedit box.
but now it is sending without styles only.
how to do that...
|
|
|
|
|
I can't give you a solution but maybe an idea. Insteads of sending the message from richedit, send a struct. The struct contains a BYTE or WORD (depending on size) with flasgs of bold, underscored and so on, and the other member the message itself. Then on the other client you recieve the packet, create the font according to flags and show the message, freeing resources.
All this is because I'm not sure if the parameters of the CFont are sent, it should but...
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
|
I want to make a particular color of a Modeless Child dialog transparent.
I searched the net but everywhere the solution was for a WS_POPUP style child dialog. If i change the style of the dialog to WS_CHILD, then the transparency alogrithm stops working.
Can anybody help me with this issue...
Regards
Meenu
|
|
|
|
|
Use SetLayeredWindowAttributes.
|
|
|
|
|
Hi Aji,
I used that only but the problem is if my dialog style is WS_CHILD then its doesn't work.
If the style is WS_POPUP then it works..!
I want it to work in WS_CHILD style also...if u have any solution then please share.
Regards
|
|
|
|
|
Hi there,
Please guide me with various methods for consuming a Web Service in VC++ (native and Visual Studio 6 only -- VS2003 and 2005 does provide tools for generating proxy class but I am looking for a method from within VS 6.0)
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|
|
did you have a look for using SOAP to consume Web Services?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Do you mean SOAP Toolkit available from Microsoft website? If yes, then they mention that it's been deprecated. Any thoughts?
modified 21-Apr-21 21:01pm.
|
|
|
|
|
For SOAP web services (what else could you mean?), gSOAP[^] works very good.
Failure is not an option - it's built right in.
|
|
|
|
|
Thanks. I'll download gSoap and give it a try
S o h a i l K a d i w a l a
To Err Is Human; to Debug, Divine
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Hi All,
I try to find WIN32 API that i can create environment variables in run-time.
All what i can find is function that create environment variables only that is local to the current process.
Someone can help me ?
Thanks for any help.
|
|
|
|
|
|
Update registry using RegSetValueEx and broad cast message as given below.
::SendMessage( HWND_BROADCAST,WM_SETTINGCHANGE, 0, (LPARAM) "Environment");
|
|
|
|
|
CListCtrl was used to display file list with icon.
via user click a button 'AddFile' to do this.
via display a CFileDialog for user choose file.
and use SHGetFileInfo to get file attributes, contains icon.
Most of the time, it works correct. but sometimes, icon was missed
while we add file to CListCtrl. after lost icon in CListCtrl.
The CFileDialog shown files just text, but lost icon too.
Anyone meet it before?
|
|
|
|
|
How do you add icons to listctrl?
|
|
|
|
|
hImglist = (HIMAGELIST)SHGetFileInfo(_T("C:\\"), NULL, &rInfo, sizeof(SHFILEINFO), SHGFI_SYSICONINDEX | SHGFI_SMALLICON);// SHGFI_SYSICONINDEX);
m_imgList.m_hImageList = hImglist;
...
rItem.mask = LVIF_IMAGE | LVIF_TEXT | LVIF_PARAM;
m_lstSubmitFileList.InsertItem( &rItem );
...
|
|
|
|
|
This isn't going to work well.
You're getting an index to an icon in the system imagelist. Every time you get a new icon the
previous index becomes invalid.
From the docs for SHGetFileInfo()/SHGFI_SYSICONINDEX:
"Only those images whose indices are successfully copied to iIcon are valid. Attempting to access
other images in the system image list will result in undefined behavior."
You need to copy the icon to your own image list which the listview control uses.
Something like this maybe:
HICON hIcon = 0;
SHFILEINFO shfi;
memset(&shfi, 0, sizeof(shfi));
if (SHGetFileInfo(pszPathname,
FILE_ATTRIBUTE_NORMAL,
&shfi,
sizeof(shfi),
SHGFI_ICON | SHGFI_SMALLICON))
{
hIcon = shfi.hIcon;
}
if (hIcon == 0)
{
LPTSTR pszExtension = PathFindExtension(pszPathname);
CString DummyFileName;
DummyFileName = _T("dummyfile");
if (pszExtension[0] == _T('.'))
DummyFileName += pszExtension;
else
DummyFileName += _T(".");
SHFILEINFO shfi;
memset(&shfi, 0, sizeof(shfi));
if (SHGetFileInfo(DummyFileName,
FILE_ATTRIBUTE_NORMAL,
&shfi,
sizeof(shfi),
SHGFI_ICON | SHGFI_SMALLICON | SHGFI_USEFILEATTRIBUTES))
{
hIcon = shfi.hIcon;
}
}
if (hIcon)
{
rItem.iImage = m_imgList.Add(hIcon);
rItem.mask = LVIF_IMAGE | LVIF_TEXT | LVIF_PARAM;
m_lstSubmitFileList.InsertItem( &rItem );
DestroyIcon(hIcon);
}
Mark Salsbery
Microsoft MVP - Visual C++
This episode brought to you by the number 3
|
|
|
|
|
Thanks for your reply.
That seems my colleague fixed this bug ~~
|
|
|
|
|
Hi,
I am trying to run my code in a different system, which is working on my system. But it gives me this error. I checked the path for afxhelp.hm...its correct and is fine...
Can anybody help me with this error please....
Here is the entire copied error message.............
*****************************************************************
Copying contents file...
1 file(s) copied.
Making help include file...
Making help file...
hlp\OperationTool.hpj(1) : error:
Microsoft (R) Help Compiler
HCRTF 4.03.0002
Copyright (c) Microsoft Corp 1990 - 1995. All rights reserved.
operationtool.hpj
HC3037: Warning: D:\Sridhar\Official\NGN\NGN_3\kcj\ngn\OperationTool\hlp\OperationTool.hm :
The map value for "HIDD_SYSTEMCONFIGURATION" is the same as the map value for "HIDR_CSMENU".
HC3025: Warning: topic #3 of D:\Sridhar\Official\NGN\NGN_3\kcj\ngn\OperationTool\hlp\.\afxcore.rtf :
Jump to undefined Topic ID: "HID_OLE_INSERT_NEW".
HC1010: Note:
The following mapped Topic IDs were not used in any topic:
AFX_HIDP_UNREG_DONE
HID_CONNECTION_CONNECT
HID_TOOLS_EMT_LOGSAVE_ON
HID_SYSTEM_USER_STATUS
HID_TOOLS_EMT_LOGSAVE_OFF
...// so on..i have removed them here
...
...
HID_CLOSE
...
...
OperationTool.exe - 1 error(s), 15 warning(s)
Please respond soon.
Thanks,
Sridhar
|
|
|
|
|
Hi
Does anyone know APIs used for monitoring CD and DVD writing. Whenever i write files to CD or DVD i should get some notification
|
|
|
|
|
I'm not sure, but you might look into the IDiscMasterProgressEvents interface.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|