|
Nope, the pointer in question is about as far from the COM stuff as it can get.
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Can you put the breakpoint and check what's in m_pObject? Is it a valid pointer?
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|
|
It is a valid pointer (not NULL, and not 0Xcdcdcdcd).
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Well, in such case it's best to 'Rebuild All', but I'm sure you've already done this
Is this a debug version without any optimizations?
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|
|
Yeah...
Wierd problem, eh?
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote:
Wierd problem, eh?
It is. All you can do now is to step into disassembly at the beginning of the function and proceed instruction by instruction
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|
|
I read somewhere you shouldn't use CoInitialize with either MFC or dll's, can't remember which. Try using AfxOleInit()
Joel Lucsy (jjlucsy@ameritech.net)
|
|
|
|
|
Hi there does anybody now how i can make a text string in a label scroll from left to right and vice versa?????
Please someone lend a hand
ThankS!!!
The meek shall inherit the earth.....but they wont get the ball...
|
|
|
|
|
I'm sure there are controls on CP for that, but basically you need to set up a timer and move the text when the timer goes off.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?!
- Jon Hulatt, 22/3/2002
|
|
|
|
|
I want to add debug information to my release build. The obvious thing to do is enable debug info in my link. However, instead of getting just a few 100 bytes added to my DLL for the reference to the PDB, I am getting 20-30k. This is contrary to what the MS minidump article states.
So obviously I am doing something wrong. All I want to do is create a PDB file with the basic symbols contained in the DLL much like MS does with their symbol files.
Anybody have any clues?
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
Can you have a look at your .dll with dumpbin? You'll be able to check which section actually grows.
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|
|
oooh, good idea. Will look at that.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
Just FYI, "Hello World" console app on my VC6 SP5 gets from 40K to 44K after enabling debug info in release configuration.
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|
|
Hi,
Here is my code:
In StdAfx.h:
struct LOCK_TABLE
{
CWinThread* CurrentThread;
int Lock;
std::vector<WAITQUEUE_STRUCT> WaitQueue;
};
extern std::vector<LOCK_TABLE> LockTable;
In StdAfx.cpp:
std::vector<LOCK_TABLE> LockTable;
In my ...Dlg.cpp
LockTable.resize(NumOfDBObject);
for (int i=0; i<NumOfDBObject; i++)
{
LockTable[i].CurrentThread = NULL;
LockTable[i].Lock = 0;
LockTable[i].WaitQueue.resize(1);
}
Why I get this error message??????
"error C2039: 'Lock' : is not a member of 'LOCK_TABLE'"
What happened???????????????????????????????????
|
|
|
|
|
Try Project -> Rebuild all. It's kind of magical sometimes.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Oh.........yes....
thanks.......hahahahaha
|
|
|
|
|
Hi,
I have a question about:
When using socket, threads (clients), each send a buffer to the server (another thread), the server accepts the socket and everything is fine. But, do those threads lineup to access the server??
In my case, it works absolutely fine when just a single client (one thread) deals with the server. But, problem occurs with more than one client. It seems like they do not lineup and execute in a strange sequence. For example, when there are 2 clients trying to send multiple buffers to the server, it executes like they are in strange sequence. As the result, the last few returns (supposes to be returns) from the server aren't really sent from server.
Can anyone help me??
Thank you!
|
|
|
|
|
You are right, they line up, because only one thread is there to process requests.
Usually, you use one thread to accept() incoming requests, but dispatches it to another thread to respond, giving it the socket handle returned by accept() . This allow the clients requests to be processed simultaneously (at least it looks like).
Michel
If I am wrong or said something stupid, I apologize in advance
|
|
|
|
|
I'm just starting with MFC and i want to write some text to a window each time my program performs an action. That means i want have a log window of all actions the program has performed. I try this with the base class CScrollView and the member function DrawText. I get the program to work correctly as long as the output isn't bigger than the client window. Can somebody explain to me how, where and when i use the member function SetScrollSizes and the best way to draw formated text to a client window.
Thanks,
Remco.
|
|
|
|
|
Keep it simpler. Use a CListBox , a CListCtrl ,or if you need a CView -derived, use its sibling CListView , to get automatic scrolling.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I have a couple of combo boxes that I've added to various toolbars in my app and the font of the text in the dropdowns is pretty rough. I tried using the SetFont function of the CComboBox object since it inherits that function from CWnd but no dice. I was wondering if there was something special that I needed to do to get the font to change for me so that the text in the dropdown isn't so sh*tty looking.
|
|
|
|
|
Are you keeping the CFont object during for the entire lifetime of the comboboxes? It does not suffice to create a CFont , use it with SetFont and forget about it. The object should be kept (usually as a member of the parent dialog) as long as the comboboxes are around.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I'm working with figures that will range from 0.00 to 999999999.00 that are entered in a dialog, these will always be monitary values. Whats the easiest way to deal with inputting this type of data to avoid constant conversions? Switching from CString to real to do calculations and then switching back seems like a waste sort of, and im not sure the best way to convert from cstring to real without writing a bunch of code..
I've seen money entering boxes in msmoney which were pretty cool..
any suggestions?
thanks!
-dz
|
|
|
|
|
In general, it is a good idea to store currency values entered by a user as pennies (i.e. assuming a decimal currency system is used) which are nothing but unsigned integers.
When filling an edit or text control, separate the last 2 digits with a period. You can do this using the / and % operators, but it's more efficient to just reformat the displayed string with an embedded decimal point.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
are you saying that when the user enters the values there should be a foced period in it, such that they would type 6 numbers with no periods, but the text control displays '1234.56'? and if so, how do i edit what a textbox displays realtime?
When i get the value as CString will i just take out the 3rd position('.') everytime? And once I have the value in as pennies in a cstring how do i convert that to a real (1234.56) value?
thanks in advance!
-dz
|
|
|
|