Hi, I would like to capture the event of a button being pressed down (CButton control class). Windows only sends a command message when the button is released if using OnClickButton().
If you could help out that would be great. Thanks !
Put CButton cButton; in the header file of the view you want the button in, not the MDI frame as you mentioned.
Put the following code in the OnInitialUpdate()of the view you want the button in:
CRect cRect(5, 5, 100, 50);
cButton.Create("My Button", BS_DEFPUSHBUTTON,cRect,this...
Thanks, it worked. I don't need to set the cchTextMax to set an item in a list control but I need to set it to get an item. Doesn't make sense to me but ok.
Thanks again.
...Here's what I have to first set the header then try and read the header:
HDITEM HeaderItem;
CListCtrl& ListCtrl = GetListCtrl();
CHeaderCtrl* pHdrCtrl = ListCtrl.GetHeaderCtrl();
// get header strings
HeaderItem.mask = HDI_TEXT | HDI_FORMAT ;
HeaderItem.fmt = HDF_CENTER | HDF_STRING...
LPCSTR is 32 bit pointer to a constant character string.
This should work:
LPCSTR pText = textBox6->Text;
WritePrivateProfileString("el33t", "textBox6", pText, "C:el33t.ini");
Or you can try typecasting:
WritePrivateProfileString("el33t"...
...output only using ios::out and deletes it's contents when opened. If I wanted to append I would use ios::app.
ofstream TextFile;
char *cSaveFilePath = "Debug.xls";
TextFile.open(cSaveFilePath, ios::out);
if(TextFile.fail()){
// check for file open errors
CString...
Dal, you are listening on a UDP socket. UDP is connectionless.
I'm a hardcore sockets programmer as I work for a VoIP company and create 700 virtual phones on one PC to exercise the system. I have developed an MFC dialog application that allows me to create UDP or TCP sockets, connect...
On some machines I have problems calling CDocTemplate::CreateNewFrame(NULL,NULL). It works fine on most machines but causes and exception two machines. Operating systems are the same. I've narrowed it down to CRichEditView being the problems because I use it in two templates that are causing...
Quick and easy way to open a link the users default browser:
int pHinst = (int)ShellExecute(NULL,
"open",
"www.rjcsoftware.ca", // link
NULL,
NULL,
SW_SHOWNORMAL);
Cheers,
Brother C
I recomment The Visual C++ 6.0 Bible. Takes you through everything from Dialog, SDI, and MDI applications. Covers menus, toolbars, status bars, etc, with examples to boot. You won't regret reading it.
Brother C
...to. This address can be retrieve by calling GetAddress() as show below.
/////////////////////////////
//
// Using CBindAddress
//
CBindAddress* pBindAddress = new CBindAddress;
pBindAddress->DoModal();
CString local = pBindAddress->GetAddress();
delete pBindAddress...
Sorry about my previous reply. It was for another topic not this one.
On this topic now, you should defenetly be using CWinThread and AfxBeginThread( ) to start your threads for many reasons if your using VC++. MSDN library explains these reasons and answers all the questions you've asked...
It sounds like this is what you're doing:
Receiving data and updating the dialogs from your receive thread if any dlgs are open using a pointer to each dlg. Only problem is you terminate the app and the receive thread terminates last and still trys to update a dlg that has been destroyed but...
It sounds like this is what you're doing:
Receiving data and updating the dialogs from your receive thread if any dlgs are open using a pointer to each dlg. Only problem is you terminate the app and the receive thread terminates last and still trys to update a dlg that has been destroyed but...
Hi,
In my MDI app I would like to remove the close button from the system menu in all my view frames and just have the maximize and minimize button. Can't seem to do it. I can disable the close button using CMenu but I would like it removed.
Is this possible? I noticed in the CDialog...
Hi,
I would like to create a professional looking icon for my application. Any one know how to do this. I need a little more then the editor VC give you. Something that you could import a bmp or something into, shrink it, and create an icon. I'm sure something like this must exist.
Cheers...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.