|
Hello,
First of all thank you for your answer, it has explained me other thing that I didn't know, but after removing the inline , it makes the more or less the same:
1. I can't debug the function properly (some times I can debug it (the compiler stops at the breakpoint) and sometimes not and the function is being called (I'm sure about that last part)).
2. The functions involved (there are various functions placed in the header file) continue without appearing in the ClassView...
Could you tell me what's happening?
As always, thank you in advance...
|
|
|
|
|
1. I think this is a problem with the debugger and template member functions (I've experienced similar strange things in the past). One way (not tested myself) to make sure the debugger always stops is as follows:
template<typename T> void CMyClass::Whatever()
{
DebuggerStopper();
...
}
void CMyClass::DebuggerStopper()
{
} 2. The class viewer is crap, I don't know any fix for that.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Well, thank you, I've tested it and it worked OK, I'll be able to detect errors in those functions now.
Talking about the other thing... I think I'll be able to live with it... moreover when I'll place that code inside a DLL for further use of it.
as always, thank you very much.
|
|
|
|
|
inline might be your culprit...
-=jarl=-
|
|
|
|
|
Hello,
First of all thank you for your answer, but after removing the inline, it makes the same:
1. I can't debug the function properly (some times I can debug it (the compiler stops at the breakpoint) and sometimes not and the function is being called (I'm sure about that last part)).
2. The funtions involved (there are various functions placed in the header file) continue without appearing in the ClassView...
thank you in advance...
|
|
|
|
|
HI guys
I'm really newbie coding printing and I have the following doubt.
I'm doing calculations and depending of the result I have to print or not.
If the result is 0 the page doesn't have to be printed in any other case yes.
But if I'm not wrong , the number of pages has to be fixed in OnPreparePrinting and then... what do you suggest to me to do to avoid print blank pages when the result is 0.
I hope do you understand my question.
Best Regards and thank you.
Doctor pi
|
|
|
|
|
From MSDN:
Another example is the case in which the length of the document is not known until it is printed. In this situation, the view class tests for the end of the document each time a page is printed. When the end is reached, the view class sets the m_bContinuePrinting member of CPrintInfo to FALSE; this informs the framework to stop the print loop
Look up the CPrintInfo structure for additional info.
Roger Allen
Sonork 100.10016
WHats brown and sticky?
A stick or some smelly stuff!
|
|
|
|
|
How can I simulate a toolbar press, not just the PressButton function since this does not call the function, but the actuall calling of the function related to the toolbar button.
Cheers
Asim
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
Can you not just send yourself the correct WM_COMMAND message?
AfxGetApp()->SendMessage(WM_COMMAND, ID_TOOLBAR_BUTTON, 0);
Roger Allen
Sonork 100.10016
WHats brown and sticky?
A stick or some smelly stuff!
|
|
|
|
|
Thanks...
Just figured that one out for myself.. i was using AfxGetApp()->SendMessage(ID_TOOLBAR_BUTTON, 0, 0);
and wondering why it wasn't working?!?!?!?
Thanks again...
Asim.
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
Dear all,
I have written a program and try to run it but get this Dos
screen and message
" Program too big to fit into meemory"
Anybody pls help!!!
thanks you
|
|
|
|
|
what do you do in the program?
[]D [] []D []
|
|
|
|
|
Operating sytem? (Dos 3.1?)
How big is your program?
Do you have any global static arrays?
|
|
|
|
|
Well, i add a few clines for helps files in my project, and complie no problem, but when exe, the message appears
Any expert can solve this problem???
btw,the system i used is p2 500mhz, os win2000 pro ram 256MB
thanks
|
|
|
|
|
Are you using 98 with > 512MB of memory? I seem to remember a friend getting these error messages when he upgraded his PC. There is a "system feature" with 98. i.e. you can't have > 512MB of memory.
It is always worth trying the prog on another PC.
If I have seen further it is by standing on the shoulders of Giants. - Isaac Newton 1676
|
|
|
|
|
Does anyone know a good unique Encrypting technique to encrypt a string? or a article to read about it?
[]D [] []D []
|
|
|
|
|
|
Hola Willem:
Yo tengo dos alternativas:
1. Uso
CString stFrase;
stFrase.Replace("e", " ");
...
//Esto reemplaza la letra "e" por un espacio, lo hago varias veces con varias letras y al final queda encriptado.
Nos vemos
Saludos desde el Caribe Mexicano
|
|
|
|
|
Hi
I'm trying to create a CSplitterWnd within a CFrameWnd, but I have some problems with that... or MFC. I'm creating the CFrameWnd by calling the Create function, and passing a NULL to the pContext parameter because i don't know how to fill the CCreateContext with valid data.
But my problems starts in the OnCreateClient of the CFrameWnd, when i'm trying to create the CSplitterWnd.
Doing something like this:
<br />
BOOL CMyFrameWnd::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)<br />
{<br />
<br />
<br />
m_MySplitterWnd.CreateStatic (this, 2, 1);<br />
<br />
m_MySplitterWnd.CreateView (0, 0, RUNTIME_CLASS(CMyView), CSize(100,100), pContext);<br />
m_MySplitterWnd.CreateView (1, 0, RUNTIME_CLASS(CMyView), CSize(100,100), pContext);<br />
<br />
<br />
return TRUE;<br />
}<br />
As expected, the pContex is NULL and apparently i'm not allowed to call CreateView and pass NULL to the pContext. CreateView returns FALSE, and after that i'm getting a bunch of assertions and an access violation. So what am i supposed to do to get this to work?
|
|
|
|
|
I guess you create frame wnd from parents OnCreate() method. If so, you should be able to obtain CCreateContext from LPCREATESTRUCT:
CCreateContext* pContext = (CCreateContext*)lpCreateStruct->lpCreateParams;
|
|
|
|
|
Well, I'm doing a MDI app so that would work if I create the CFrameWnd from the MDI child window. But I want to create the window before any MDI child window i created... and the lpCreateStruct->lpCreateParams == NULL in the OnCreate() of the MainFrame for some reason. Any other idea?
|
|
|
|
|
Hi,
I'm using CRegKey to read a value from the registry. It's the name of the Citrix ICA Client:
HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\ICA Client
and the key is ClientName.
I use the following:
CRegKey regKey;<br />
LONG Errr = regKey.Open(HKEY_LOCAL_MACHINE, "Software\\Citrix\\ICA Client", KEY_READ);<br />
ASSERT(ERROR_SUCCESS == Errr);<br />
<br />
CString csValue;<br />
LPTSTR lpBuf = csValue.GetBufferSetLength(MAX_PATH);<br />
ULONG length = MAX_PATH;<br />
<br />
Errr = regKey.QueryValue(lpBuf,"ClientName", &length);<br />
ASSERT(ERROR_SUCCESS == Errr);<br />
<br />
csValue.ReleaseBuffer();<br />
MessageBox(csValue);
And the messagebox displays an empty string!
What am I doing wrong?
Thanks,
-- narada
|
|
|
|
|
Forget about this, it works perfect!
I mistyped the name of the key!
Sorry!
-- naradaji
|
|
|
|
|
Basically I want a pointer to a bmp that has the graded shades of gray in it, and is to be of a certain number of rows and columns of pixels.
How do I generate such a pointer? Are there any links to creating a thing like this in code? I dont have the bmp already...I need to generate it in code.
Appreciate your help,
ns
|
|
|
|
|
I've had to do something similar to this, and it isn't too hard. (I'm recalling from memory here.) You need to look at creating a BITMAPINFO structure, with BITMAPINFOHEADER and color table. These define the dimensions in x and y, and specify your color depth, etc. If you use 8-bit depth and a palette, you can add a color table, which is an array of RGBQuad structures (defining the red, green, and blue components) and then each pixel in the bitmap has the value of the corresponding index into the color table.
If you use more than an 8-bit color depth, then each pixel is not an index to a color table, but the actual RGB triple. Then, allocate enough memory to hold the X-by-Y pixel data for the given color depth. Fill the allocated array with whatever pattern you want (rainbow, stripes, concentric circles, repetitive squares, etc), and you can fwrite the header and the contents of the array to a .bmp file.
It's not too different from creating a DIB in a memory DC. I can probably dig out some code samples if absolutely necessary, but this may be enough to help out (?).
Good luck,
Dave
"You can say that again." -- Dept. of Redundancy Dept.
|
|
|
|