|
Hi
How can I add an message handler for a item I added dynamically in an application's menu. Please help
|
|
|
|
|
Use the ON_COMMAND macro in the message map, like:
ON_COMMAND(IDC_NEW_MENU_ITEM, OnNewMenuItem)
And the function prototype is:
afx_msg void OnNewMenuItem();
|
|
|
|
|
Hi,
I'm writting a FTP Client, using CSocket. And i have problem with the reply format of LIST command.
I tried on some different kinds of FTP server (UNIX, WINDOWS, DOS model), and saw it not the same. Tried to guess the format, but failed.
Who can help me out of this? every suggestion would be appreciated.
Trieu Hai Nguyen
haitrieu@glassegg.com
|
|
|
|
|
Hi,
I too have tried deciphering the result of the LIST command for an FTP client. I even downloaded the latest FTP standard, and guess what, the response to the LIST command is not standard.
My current thought is just to write the data (whatever they send) to a log file that the end user can view. Then the end user can determine if the 'SEND' was successful or not.
If anyone else has a better answer, I'm all ears...
Jeff
|
|
|
|
|
Hi,
how can i add a horizontal scrollbar to the dropdown list of my combobox ?
SetHorizontalExtend() won't do anything, although i have added the style WS_HSCROLL.
Any idea?
TIA Chris
|
|
|
|
|
Hi Chris,
I think SetHorizontalExtent() works only with a combobox in edit+listbox mode, not a drop-down combo.
The problem is that a combobox is actually two controls together and you should set the WS_HSCROLL style of the listbox inside the combobox, which is not simple.
I can't help you more than this, sorry
Cheers,
Paolo.
|
|
|
|
|
Hello,
I've got a question regarding setup. I need to create a setup for my application and the application is using a SQL server to log some data. How do I install support for the SQL server (if required) and the DSN?
I would appreceate any tips or links to some documentation.
Matthias
|
|
|
|
|
hi,
see in the registery how the DSN is registered and in your install application, add the registery entries to your install application.......
hope this helps ya,
yaron
|
|
|
|
|
Now i want to open dialog for open many files , so i
'm programming that
char filter[] = "Contact Outlook(*.contact)|*.contact||";
CFileDialog fd(TRUE,NULL,NULL,OFN_ALLOWMULTISELECT | OFN_HIDEREADONLY,filter);
After that i will get name of file that i select by coding
if(fd.DoModal() == IDOK){
POSITION p;
p = fd.GetStartPosition();
CString path;
do{
path = fd.GetNextPathName(p);
}while (path != "");
}
But it is error on run time , this program will pop up error-dialog when the program
do line => "path = fd.GetNextPathName(p);"
I think because when fd.GetNextPathName(p) got name of file finished and when it got agin
it does not return NULL but it can't call "fd.GetNextPathName(p)"
I worry about thing very much , Please help me .
Thank you for your help
|
|
|
|
|
I think that the problem comes from your use of the POSITION variable. You should use it like this:
POSITION p = fd.GetStartPosition();
CString path;
while(p){
path = fd.GetNextPathName(p);
...
}
It works like a CObList, for example...
HTH.
K.
|
|
|
|
|
Hi,
I want to set to the font and fontsize for my button and label without MFC. Can anyone pls tell me how to do it
|
|
|
|
|
Here's an example that makes the font bold. This is untested, and it's 3:25 AM, so please test before checking the code in.
HFONT hCurrFont, hNewFont;
LOGFONT lf;
hCurrFont = (HFONT) SendDlgItemMessage ( hMyDlg, IDC_MY_BUTTON, WM_GETFONT, 0, 0 );
GetObject ( hCurrFont, sizeof(LOGFONT), &lf );
lf.lfWeight = FW_BOLD;
hNewFont = CreateFontIndirect ( &lf );
SendDlgItemMessage ( hMyDlg, IDC_MY_BUTTON, WM_SETFONT, (WPARAM) hNewFont, TRUE );
|
|
|
|
|
Hi,
I want to set to the font and fontsize for my button and label without MFC. Can anyone pls tell me how to do it
|
|
|
|
|
I've noticed the question asked around a lot
but no one seems to answer it, but I'll ask here
There are many packet sniffer and Firewalls for windows, but no free source ones to look at to see how it works
Does anyone have any idea, or tips they would like to share on how one would go by developing one
Thanks for any replies
|
|
|
|
|
Can anyone give me a general idea how I can programatically read various physical numbers from the motherboards Winbond chip. Thinks like cpu temp. or mobo temp.? Or perhaps someone knows where I can get this info.
Thanks.
|
|
|
|
|
HI,
I wonder when a DLL unloads from PHYSICAL memory...
I found that each process which attach a DLL has a
referrence count for use of it..
And when the count becomes zero it is detached from
process and removed from process's VIRTUAL memory
address..
THEN,.....When exactly a loaded DLL unloads?
(I mean when = which state that satisfies its
unloading condition)
Does it unload itself?
OR
Windows OS unloads it?
Thanks in advance..
-Ray
|
|
|
|
|
I think a DLL unloads from physical memory when this memory it's needed. As when Windows loads a DLL, it only reserves the virtual memory and maps it to the DLL. If the DLL was not loaded, when the process access it, it causes a page fault, and automatically Windows loads it into physical memory. I suppose the it's the same process when unloading: removing the DLL from memory if RAM it's not needed is a silly task, as maybe Windows must reload the DLL after removing it. I suppose the RAM pages containing the DLL will be marked as they can be used, but if anybody uses this pages, 'reloading' the DLL into physical memory will be a little effort. If I find more information I'll post another message, or if anybody can assure this or correct me, will be pleased!!!
|
|
|
|
|
Hi all,
I found following snippet in \vc98\mfc\src\afximpl.h, which looks very interesting:
#define VERSION_WIN4 MAKELONG(0, 4)
#define VERSION_IE3 MAKELONG(70, 4)
#define VERSION_IE4 MAKELONG(71, 4)
#define VERSION_IE401 MAKELONG(72, 4)
extern int _afxComCtlVersion;
DWORD AFXAPI _AfxGetComCtlVersion(); No more determing COMCTL's file version? Instead simply call:
if (_AfxGetComCtlVersion() >= VERSION_IE3)
{
} Or do I misaccept something? Can anybody comment on this?
Thanks in advance,
Thömmi
|
|
|
|
|
That's pretty sweet! I'd say you're right on the money.
|
|
|
|
|
I am making a small application that has an system tray icon. I have created two menu one dynamically and another from resource. But I can't connect the two menu's to the tray icon. The problem is when I move the mouse over the icon without even clicking the menu from resource is popping up. I am using TrackPopupMenu(). Can you help
|
|
|
|
|
You're not checking the event that happened over your tray icon. You should display your menu only if the mouse event was WM_RBUTTONUP, ie:
case WM_TRAYICONCALLBACK:
{
if ( MY_TRAY_ICON_ID == wParam &&
<font color=red>WM_RBUTTONUP == lParam</font> )
{
}
}
break;
|
|
|
|
|
How to get the domain name.
I think there must be somthing like ::GetComputerName but I cant find it.
Thank you
|
|
|
|
|
|
HI
Can someone tell me how to add an sub-item to the main-menu runtime. Some short samples would be excellent.
regards, KNEI
|
|
|
|
|
Hello,
I am using InfoZip library to one of my application(zipdll.dll and unzdll.dll). I want to list out all the files in a zipped file without unzipping. Please let me know how to get this.
Thanks in advance.
Regards,
Murugesh.S
|
|
|
|