|
Does anyone know where can i get an example to make a good IRC Client? i put this on the request code but noone answer me, pls, answer here
|
|
|
|
|
|
Thanks man, now i can begin the construcction of my own software , really thank you so much
|
|
|
|
|
hi everyone!
how should I tell a multiline edit control, which has more text than is viewable, to scroll down so the text at the end is always visible?
the text is frequently changing, and every time I want the control scrolled automatically to the bottom. what do you think?
thanks,
Jake
*****
Jake Palmer
www.duke.edu/~jp6
|
|
|
|
|
int l_nMin, l_nMax;
m_YourCEdit.GetScrollRange(SB_VERT, &l_nMin, &l_nMax);
m_YourCEdit.SetScrollPos(SB_VERT, l_nMax);
Name: STR
BTW: for some of you that wished for CodeProject irc server
I create a channle on DalNet called "#CodeProject"
|
|
|
|
|
I have two threads one used to send data to COM1 buffer, the other used to
monitor COM1 events. I want to know whether the corresponding event is received when I send a byte in the first thread. so I have to debug the two threads parellely, but how can i ? help me.
I am a fish swimming in the sea of c++.
|
|
|
|
|
Hi,
set a breakpoint in the appropriate WaitCommEvent() event type result evaluation. This is usually switch( EvtMask) where you determine the type of event. Run the debuggee. When the debugger breaks on the specified event type, simply suspend the other threads.
"Debug" -> "Threads" ... "suspend" all by looking at "location" where the functions are listed that each thread executed (before break).
By doing this you save yourself from hassle that is when single stepping thru one thread you end up in another thread and so on (of course its multithreaded).
Hope this helps.
A. Focht.
|
|
|
|
|
|
A good answer! thanks a lot.
I am a fish swimming in the sea of c++.
|
|
|
|
|
I'm creating a simple budget type program that simply displays my budget over 6 months.
It's rather small consisting of only a few types like rent and credit card etc.. i think 6 in total.
I went with dialog based in appwizard to keep the code really simple. And added in the microsoft flexgrid control,
got that idea from a book.
As I'm new to this ofcourse I don't fully understand where my errors are. I did however manage to get 1 of the names to appear but not any others.
Anyone here know how to control where stuff goes in the grid?
|
|
|
|
|
It's not too late to save yourself a world of hurt. The Flexgrid docs are sparse and all for VB. Get Chris Maunders excellent grid control from this site instead.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
While I agree that Chris' grid control is the better way to go, I think that what you are after is
SetTextMatrix(long Row, long Col, LPCTSTR lpszNewValue);
alternatively you can move to a cell and then write eg
SetRow(long nNewValue);
SetCol(long nNewValue);
SetText(LPCTSTR lpszNewValue);
Paul Hooper
If you spend your whole life looking over your shoulder, they will get you from the front instead.
|
|
|
|
|
|
I'm starting a modeless dialog box from my main (dialog-based) app, but it's
always on top when I run the program. I can change focus back to the main
dialog box, but I can't bring it to the front. I've tried SetForegroundWindow()
and a couple of other functions, but no luck.
Any suggestions appreciated.
Details:
- Visual C++ 6.0
- MFC Dialog-based app
- Child dialog boxes created with Create() function
Gary Rathbun
|
|
|
|
|
SetWindowsPos();
Good Luck!!!!
Carlos Antollini.
|
|
|
|
|
Thanks, Carlos, but when I try to use that function, the compiler gives an error,
saying it doesn't have 7 arguments. The documentation says it does, and it
has 7 in WINUSER.H, where it's declared. In CONTROL.H, it has 4, but none
of them refer to height or Z-order positioning.
I also tried BringWindowToTop(). It compiled, but didn't bring the main dialog to the
top--the child dialog was still on top...
Any more ideas, I'd be glad to try them!
Gary R.
|
|
|
|
|
You are using MFC?
in that case is
CWnd::SetWindowPos
BOOL SetWindowPos( const CWnd* pWndInsertAfter,
int x,
int y,
int cx,
int cy,
UINT nFlags );
For Example
SetWindowPos(&wndTopMost, 0, 0, 0, 0,SWP_NOSIZE);<br />
If you not are using MFC is
BOOL SetWindowPos( HWND hWnd,
HWND hWndInsertAfter,
int X,
int Y,
int cx,
int cy,
UINT uFlags
For example
<br />
SetWindowPos(m_hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE);<br />
in this case you need to include the winuser.h file.
Cheers...
Carlos Antollini.
|
|
|
|
|
The debug version of my program works like a charm. The release build gives an access violation as soon as I double click on the exe. So....since I really can't "debug" the release version, I could use a lil help.
Any ideas?
|
|
|
|
|
You probably have an uninitialized variable. Try using AfxMessageBox() to trace through your program.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
I just found out you CAN debug your release build. Under MSDN help, under index, look up "release build" and under that is "fixing problemss" (yes 2 s's). Click on "Turn on Generation of Debug Information for the Release Build" to find out how. So, I did that, and I am now debugging the release build, and I find out that my "Access violation" error comes before the first line of InitInstance. What on gods planet would cause this? The call stack just shows "0064ed69()".
|
|
|
|
|
Sounds like you have a member variable that is blowing up as it's being created.
|
|
|
|
|
Well, I don't hear any explosions ;D. On a serious note, could you elaborate on this variable "blowing up"?
|
|
|
|
|
I hope this equation works here
Quick Answer + time + thought = better answer
Try setting a breakpoint in the constructor of any class member classes. For example, you have a class CDoSomething which is declared as a member variable of CMyGreatClass. Notice I said class not pointer to a class. As a part of the construction of CMyGreatClass, it has to create CDoSomething. If there is a problem creating CDoSomething, CMyGreatClass will not even get created before an error occurs.
Good Luck
Brad
|
|
|
|
|
I thought that the very very very first thing that gets called is CMyApp::InitInstance(). I attempt to "run to cursor" to that function with my release build, and it doesn't make it. Do the constructors of the other classes get called before reaching the InitInstance function....? ( I also tried your suggestion, without success.
|
|
|
|
|
The constructor gets called first! Try setting a breakpoint there.
Brad
|
|
|
|