|
hi. any body knows a way to bind GDIPLUS.DLL or something to include this file to .EXE project file ?
thnx
-=Ehsan-de-Burge=-
|
|
|
|
|
Hi,
I use a MonthCalendar but the date isn't correct when I read the value.
anyone can help me for that or a link.
Best Regards
youssef
|
|
|
|
|
hello, could anyone help me?
I need a static control with a mechanism to notify parent window when mouse cursor runs over it.
thanks in advance.
|
|
|
|
|
I have a CListCtrl list which uses the SetExtendedStyle( LVS_EX_GRIDLINES | LVS_EX_FULLROWSELECT | LVS_REPORT ) to display a list control with gridlines. What I need to do is to show multiple columns that contain "editable" editboxes for several. So far, the closest example I have been able to find will only display editboxes when a listcontrol subitem is clicked. I need to display the editboxes all the time. And, they should not be affected by hor. or vertical listctrl sliders.
Thanks..
|
|
|
|
|
Personally for this type of input I use a GridControl.
This one here[^] is probably the best one around.
Michael
The avalanche has started, it's too late for the pebbles to vote.
|
|
|
|
|
Has anyone tried creating a project in Visual Studio .net that uses two separate resource files that share the same symbol header file? What I want to do is have the project's both resource files to show up simultaneously in the Resource View pane so I can edit them at the same time.
As far as I know, they only way this can be done is by adding both resource files under the corresponding branch of the project's tree in the Solution Explorer. However, doing this has a very interesting side-effect: even though the project builds fine when doing a full build, compiling a modified source file and re-linking seems to be impossible as the linker throws an exception and crashes. This is the output I get:
Compiling...
MainFrm.cpp
Linking...
MainFrm.obj : fatal error LNK1000: Internal error during Pass2
Version 7.00.9466
ExceptionCode = C0000005
ExceptionFlags = 00000000
ExceptionAddress = 004715DC (00400000) "C:\Program Files\Microsoft Visual Studio .NET\Vc7\bin\link.exe"
NumberParameters = 00000002
ExceptionInformation[ 0] = 00000001
ExceptionInformation[ 1] = 00000001
CONTEXT:
Eax = 401AF86C Esp = 0012F2E4
Ebx = 1032E800 Ebp = 3FFF0000
Ecx = 00000000 Esi = 401AF7C4
Edx = 00000001 Edi = 400062A4
Eip = 004715DC EFlags = 00010246
SegCs = 0000001B SegDs = 00000023
SegSs = 00000023 SegEs = 00000023
SegFs = 00000038 SegGs = 00000000
Dr0 = 0012F2E4 Dr3 = 1032E800
Dr1 = 3FFF0000 Dr6 = 00000000
Dr2 = 00000000 Dr7 = 00000000
Since this doesn't happen when doing a full build, I assume it has something to do with the incremental linking option. Is this supposed to happen or is it one of the new Visual Studio's many bugs?
The only workaround I've found (after trying a zillion combinations of splitting and/or glueing resource and header files together) was to include the second resource file in the compile-time directives of the first one, replacing the .rc2 file that the Application Wizzard created, and have it appear in the Solution Explorer as a separate solution item, so that I can double-click on it and open it for editing. Anyone has any ideas for a more elegant solution?
Thanks.
|
|
|
|
|
Hi everyone,
I'm using VS C++ 6.0 I have an application that does file i/o. More specifically I'm reading in a binary file. My problem lies in a release build. when I build a release version, the eof(STREAM *) function never finds the end of file marker in my file. When built in debug mode, it easily runs without a problem, and returns 0 when finding the end of file marker.
Anyone know anything about this? I think I've found a bug in the multithreaded release library, but I don't know for sure. Anyone?? Any takers?? Thanks
Dan Willis
|
|
|
|
|
Post the line that checks the stream for eof. I do know that C++'s iostream objects have access it eof().
inFile.eof();
Kuphryn
|
|
|
|
|
Here's the line:
FILE *fp;
fp = GetScannerConfigFilePointer("rb");
....
do {
/Do my stuff
........
} while (!feof(fp));
What do you mean by access it eof() ??
Dan Willis
|
|
|
|
|
The chance of there being a problem with feof is VERY VERY slim. Your program has bugs in it that is either causing feof to not work properly (memory corruption) or feof is never called.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Yup, that's what I'm thinking, I just haven't found it yet :=/ Just thought I'd ask. My guess I'm overwriting memory somewhere, and I just haven't found where yet. :-/
I've use feof() many times before and haven't had a problem. :-/
Dan Willis
|
|
|
|
|
i did a test for using CRichEditCtrl with following code:
//class RichEdit is a sub-class of CRichEditCtrl
//the user-function is called by a button click
void RichEdit::StreamIn()
{
EDITSTREAM es;
es.dwCookie =0;
es.pfnCallback =Pro_StreamIn;
UINT uIn=SF_TEXT;
CRichEditCtrl::StreamIn(uIn,es);
}
//static class member
DWORD CALLBACK RichEdit::Pro_StreamIn(DWORD dwCookie,byte*pBuf,long cb,long*pcb)
{
static int iEnd=0;
CString cs;
cs.Format(cs+"Hello %d\n",iEnd);
int iLen=cs.GetLength();
memcpy(pBuf,(LPCSTR)cs,iLen);
if(iEnd%3!=2) *pcb=iLen;
else *pcb=0;
iEnd++;
return 0;
}
result:
--------click the button, text is:
Hello 0
Hello 1
--------click the button again, text is:
Hello 3
Hello 4
--------and so on as expected
my Q is:
1. if change style uIn=SF_RTF, text doesn't apear, why and how to fix it?
2. if format text with color, i.e. "Hello 0" as blue and "Hello 1" as red, how to do it?
thx in advance
includeh10
|
|
|
|
|
I had a project and when I created the toolbar buttons, in the prompt area i put stuff like:
Select keywords to search for\nSelect keywords to search for
which showed up when I hovered over the button. Now i am creating a new project and dont know what I did before that was special...but I dont see the prompt when i hover . In both projects, both the menu item and the toolbar button associated with it have the same ID...thats pretty standard. There was no updateUI handler for my first projects button and none now....
Appreciate your help,
ns
|
|
|
|
|
hi,
how to use CStdioFile to read separate lines from file like ifstream?
|
|
|
|
|
What do you mean separate lines? Do you mean one line at a time or do you want to skip lines?
ReadString();
Kuphryn
|
|
|
|
|
Anonymous wrote:
how to use CStdioFile to read separate lines from file like ifstream?
forget about it! use the ifstream!
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
I have a C++ class that allows declaration of static functions , but I needed to declare static variables also . As for example I need to access the current object in a static timer procedure as I needed to do some Initialization .
I did the following in my Class definition
class MyClass {
public :
-
static MyClass *thisPtr;
-
};
I got a Linker error . I am not able to figure out the mistake here . Please help
|
|
|
|
|
You've to initialize your static variables outside your class.
This could look like
MyClass* MyClass::thisPtr = NULL
|
|
|
|
|
MyClass* MyClass::thisPtr = NULL
This really works but I am failing to understand the significance
of MyClass*. I have already declared the type for thisPtr in my class ?
Thanks for the help
|
|
|
|
|
act_x wrote:
I have already declared the type for thisPtr in my class ?
Sure, but when initializing it the compiler needs the the type again. I think it's to do with the handling of static variables - they aren't assigned to memory space together with class variables - they're "on their own".
But that goes to much into theory for me ... everytime I need to know s.th. about that I'm asking my C++ compendium
|
|
|
|
|
|
Static member variables are equivalent to global variables. Putting it inside a header file basically announces to the CPP files (that include it) that it exists and what its type is. But it's not until you define it inside a CPP file that it gets instanciated and the linker can then retrieve its memory address.
Regards,
Alvaro
All you need in this life is ignorance and confidence, and then success is sure. -- Mark Twain
|
|
|
|
|
In the .cpp of the class (say MyClass.cpp ) define thiPtr :
#include "MyClass.h"
MyClass * MyClass::thisPtr=0;
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi,
I am testing the sample Cir2 ActiveX control given by MSDN lib.
step 1: I inserted that Ctrl in "ActiveX Control Test Container"
Then If I click in the conrtol it is working. (regonize the mouse down event and displays filled circle)
step 2:
1. I inserted the same in MS-Word or PPT.
2 Click on the contol. Results nothing.
3. GoTo SlideShow or use popup/edit/ then click on contol.
then it works.
Question:
How can I do here without using edit or shifting to slide show?
thanks,
regards,
ajitd07
|
|
|
|
|
Hi,
I created a Simple MFC based Active-X control thro Wizard, for testing. i.e MyOCX.
In CMyOCXApp I put a AfxMessageBox("InitInstance") inside InitInstance() and in ExitInstance(), I put AfxMessageBox("ExitInstance")
Case 1: Test in "ActiveX Control Test Container"
Step 1: Insert MyOCX Ctrl in the container.
Result: message Box Poped "InitInstance"
Step 2: Insert Another MyOCX Ctrl in the same container.
Result : MessageBox in InitInstance is NOT popped.
Step 3: Delete the 1st inserted control.
Result : MessageBox in ExitInstance is NOT popped.
Step 4: Delete the 2nd inserted control.
Result : MessageBox in ExitInstance is popped.
"ExitInstance"
Question:
Why it is Not poping up "InitInstance" MessageBox every time when I insert? also "ExitInstance" every time when I delete?
Case 2: Test in "MS Office products: PPT and MS-WORD"
Step 1: Insert MyOCX ctrl in PPT or MS-Word.
Result: message Box Poped "InitInstance"
Step 2: Delete the inserted control.
Result : MessageBox in ExitInstance is NOT popped.
Step 3: Close the Application (PPT/MS-Word) Completely
Result : MessageBox in ExitInstance is popped.
"ExitInstance"
Question:
Why it is Not poping up "ExitInstance" MessageBox Imeediatly When I delete the control in the container?
Where I will get the answer?
Thanks and regards,
ajitd07
|
|
|
|