|
So I had some problems like yours.
Try to invoke DoPrintPreview in your OnFilePrintPreview.
|
|
|
|
|
From CFormView, DoPrintPreview is unknow fonction. How can I call it.
Would you like to give me an example please
I learn my self
|
|
|
|
|
How can i read a MS word doc file and even content of the table of the file. Or can any one refer any link.
Thanks
Masum
|
|
|
|
|
Hello Friends,
I want to create ODBC DSN dynamically, so I am using SQLConfigDataSource() function. for this reason i had included the odbcinst.h file also. But when tried to execute the program, i am getting a linker error as
unresolved external symbol _SQLConfigDataSource@16.
If i don't include the odbcinst.h file, then getting that SQLConfigDataSource undeclared identifier.
Please help how can i create the DSN dynamically.
Thanks in advance.
Neelesh K J Jain.
|
|
|
|
|
In VC++,does anyone know how to convert a UTF-8 string into a Shift-JIS string? Thanks.
|
|
|
|
|
|
Is there any Win32 or MFC API to retrieve the Available COM ports in a PC.
Thank you
laiju
|
|
|
|
|
|
there is MSCOMMON COMPONENT
by the way are you Chinese?
If you are Chinese ,Please communicate with me
my email is jerry_yu_fishery@hotmail.com
I
|
|
|
|
|
I just wanted to know whether it is possible to have some of the items in a Combo Box disabled/grayed/non-selectable.
If yes, how? I didn't find any clue in MSDN.
It's better to know some of the questions than all of the answers.
Pravin.
|
|
|
|
|
Simple answer: Impossible.
An owner-drawn combobox would help here, but I advise against it: It violates every UI design guideline. A better way would be to manage your content - delete invalid combobox items.
----------------------
~hamster1
|
|
|
|
|
char t1[12] ="Codeproject";
char t2[3];
strcpy(t2,t1);
AfxMessageBox(t2)
what'll be the output??
thanx
V
|
|
|
|
|
Why not just try to build and run it?
Most likely, the output will be "Codeproject", but you've hosed something.
Bob Ciora
|
|
|
|
|
it won't work as you are trying to cat a 12 characters long string into a 3 characters long array...
[edit]
there will be an "out of range exception"...
According to the MSDN[^], "Because strcpy does not check for sufficient space in strDestination before copying strSource, it is a potential cause of buffer overruns."
[/edit]
TOXCCT >>> GEII power [toxcct][VisualCalc]
-- modified at 7:34 Monday 29th August, 2005
|
|
|
|
|
this is not happening .. its displayin "codeproject" then what's the use of declaring it as the var t2 as [3] ? i dont understand!
V
|
|
|
|
|
if you can see it, it is pure luck !
it is because - as it's been asnwsered to me here - there is some empty room after the char[3] variable, but never you should think there will always be...
moreover, what do you think about releasing the memory ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
-- modified at 7:26 Monday 29th August, 2005
|
|
|
|
|
u know buffer overflow error when u declare it as t2[3]="Codeproject".... releasing ? what will it do here?
V
|
|
|
|
|
i think it's a good point to wonder how things work, but there's no reason to do so when you perfectly know it is a bad thing to do...
doing t2[3]="Codeproject", it will free t2, but t2 don't have "Codeproject" in it... (the constructor thrown the exception while trying to assigning the string...)
(ps: you can delete your other postwritten twice)
TOXCCT >>> GEII power [toxcct][VisualCalc]
-- modified at 7:44 Monday 29th August, 2005
|
|
|
|
|
u know i get "buffer overflow error" when u declare it as t2[3]="Codeproject".... BTW releasing ? what will it do here?
V
|
|
|
|
|
|
|
toxxct
but i got output Codeproject
|
|
|
|
|
Probably :p Depends on what's after the output string. If there is more room in the data space, then some poor unsuspecting variable will be stomped. But you won't see that until you need it.
Bob Ciora
|
|
|
|
|
TOX,
i too got "CodeProject".. y no error is displayed?
V
-- modified at 7:32 Monday 29th August, 2005
|
|
|
|
|
yes, i understood that point. did you visit the link to the msdn i provided ?
strcpy() doesn't check for sufficient space in strDestination before copying strSource...
TOXCCT >>> GEII power [toxcct][VisualCalc]
-- modified at 7:34 Monday 29th August, 2005
|
|
|
|