Has anybody found a good JAVA discussion board site. Kind of what CodeProject.com is to VC++. But for JAVA.
User 3512
Posts
-
JAVA Discusion board site. -
JListI wish to add items to a JList after it has been constructed. I can do this: Stringp[] strArray ={"Jack", "Jill", "Mary"); JList peopleList = new JList(strArray); But now how do I added more names to the list????
-
Writing a text file.I want to write a text file for windows notepad to read. I do not want the Unicode character in the file. Any suggestions?
-
syntax errorNever mind. I got it. I though Java would give me a default constructor. Apperently, I had to specify one. Thanks people.
-
syntax errorThis is my entire class. The compiler keeps saying 'Illegal start of type on the "for" loop. My question is, what is wrong? import java.util.*; public class wordsNoun extends wordsArrayClass { final int nounMax = 4; final String noun[] = {"boy", "girl", "dog", "town", "car"}; for( int i = 0; i <= nounMax; i++) { addElement(noun[i]); } }
-
Postmessage to radio controlI would like to post a message to a radio control. The radio group consist of three radio buttons. I would like to something like this; myRadioControl.PostMessage(Click button 2, 0, 0); I would appreciate a little help on the syntax. Thanks. pmcga61201@aol.com
-
I want the full path name.The following code will give me a dialog box that will allow a user to choose a directroy. It does return me the directory name, but I also need the full path to the directory. How do I get the full path to the directory?????? Thanks in advance. void CSwapObjectsView::DoDirectoryDialog(CString& strDir) { char szDisplayName[MAX_PATH] = ""; char szTitle[] = "Choose a directory"; BROWSEINFO x; memset(&x, NULL, sizeof(BROWSEINFO)); x.hwndOwner = this->m_hWnd; x.pszDisplayName = szDisplayName; x.lpszTitle = szTitle; x.ulFlags = BIF_RETURNONLYFSDIRS ; SHBrowseForFolder(&x);
-
VB Copy and Paste API'sThank you. Your response to my clipboard question was very helpful.
-
macrosI have inherited some source that contains a large number of very complicated macros. Is there a why I can print out what those macros expand to when compiled? Thanks
-
COM & EventSink and IDispatchI have used the class wizard to generate a wrapper class from the type library of an in process server. I can access the methods and properties by creating a dispatch like this one for both. if(((*(COleDispatchDriver*)(&m_IMCSClientEvents))).m_lpDispatch==NULL){ //UCS_MCSSERVER.EXE if (!(m_IMCSClientEvents.CreateDispatch("MCSObject.MCSObject.1", &oe))) { But how do I capture the events. Do you create a dispatch for events? If so how do you capture them? I'm confused. I suspect the answer is use the EVENTSINK_MAP. But that would require an IDC value. Since I am late binding I do not have an IDC value I am not sure how to use the EVENTSINK_MAP. Thanks in advance.
-
COM works in VB but not VC.Here is a VB test app. It is not very complex or clever, but it works. Dim WithEvents mcs As MCSClient mcs.Initialize "MyString" where MCSClient is a com object added to the VB environment by adding a reference. Not a component, but a reference. I would like an equivalent VC app to this VB app. So I wrote some code like this. I use the Wizard to generate a wrapper class over the same dll the VB referenced and in my header I define a variable of the wrapper type as such. IMCSClient m_IMCSClient; Then in my code I successfully create the dispatch like so. if(((*(COleDispatchDriver*)(&m_IMCSClient))).m_lpDispatch==NULL){ if (!(m_IMCSClient.CreateDispatch("4E51E425-021E-11D2-B759-0020AFF84106", &oe))) { } } I can also use the progid in creating the dispatch, either way works. Here comes the problem, I want to perform the Initialze method. (Just like VB did.) m_IMCSClient.Initialize("MyString); When, this code excutes it will throw the following exception. DISP_E_MEMBERNOTFOUND I am not sure what it means. Is anyone familar enough with VB to know what WithEvents means? Can anyone suggest a different course of action.
-
RegisterWindowsMessageI’ve been reading your submission on registerwindowmessage at the codeguru.com web site. Your information in addition to some other sources, sure seems simple enough. The only problem is I just can not get it to work. This is what I have done. Can you suggest where I am going wrong? Maybe it is the way I send the message? I want to send a message from one dialog-based exe to another. Both exe’s have this message defined. #define TESTMSG "TESTMSG" Both exe’s get the message id like this, and the debugger shows both get the same value. int gnStartMsg = RegisterWindowMessage(TESTMSG); The sending exe then sends a message like this. SendMessage(gnStartMsg, 0, 0); The receiving exe has this message map and member function. BEGIN_MESSAGE_MAP(CRegToDlg, CDialog) //{{AFX_MSG_MAP(CRegToDlg) ON_WM_SYSCOMMAND() ON_WM_PAINT() ON_WM_QUERYDRAGICON() //}}AFX_MSG_MAP ON_REGISTERED_MESSAGE(gnStartMsg, OnMsgTest) void CRegToDlg::OnMsgTest() { AfxMessageBox("I made it"); } The messagebox is never displayed. PMCGA61201@AOL.COM Thank you.