|
I know. Just pointing the general direction. I think that IExtractImage[^] might be the one.
I don't think this is a serious possesion, and the evil most likely comes from your hand. Colin J Davies, The Lounge
|
|
|
|
|
Ok nice,
But i need shobjidl.hto use that interface do you know where I can find it?
Thanks a lot Michael
|
|
|
|
|
Platform SDK, Core SDK. You'll need to download from MS. Click here[^]
I don't think this is a serious possesion, and the evil most likely comes from your hand. Colin J Davies, The Lounge
|
|
|
|
|
Hi,
I want to catch WM_SETFONT messages in a CEdit control.
Unfortunately the class wizard doesn't offer me this message. Is there any reason? If not, how does my handler look like? hm there is no default handler CEdit::OnSetFont(). please help.
|
|
|
|
|
If you right-click your class and select "Add window message handler" and from there change the type of filtering in the bottom right to "Window", I think you will have access to the option you need.
I can't check as class wizard is bust on my PC at the moment.
Roger Allen
Sonork 100.10016
In case you're worried about what's going to become of the younger generation, it's going to grow up and start worrying about the younger generation. - Roger Allen, but not me!
|
|
|
|
|
thanks, but WM_SETFONT is still *not* listed. I tried all options
|
|
|
|
|
How can I specify the size of a CView when it is created?
<br />
void COragomy_IIView::OnDraw(CDC* pDC)<br />
{<br />
COragomy_IIDoc* pDoc = GetDocument();<br />
ASSERT_VALID(pDoc);<br />
<br />
CRect rect = new CRect( 0, 0, 320, 200 );<br />
pDoc->m_clientRect = rect;<br />
That doesn't seem to work.
...
|
|
|
|
|
How to Connect to ODBC (SQL SERVER 2000)
through ADO
which provider should be used
|
|
|
|
|
Try http://www.perlmonks.com maybe?
|
|
|
|
|
I'm not too clued up still on working with databases but there are several articles on connecting in CP.
http://www.codeproject.com/database/
http://www.codeproject.com/useritems/ConnectionStrings.asp - Connection strings to get connected to each type of database.
Sorry I can't be more help.
|
|
|
|
|
hi everyone,
is there a function in vc++ library that does cstring string replace?
i'm looking for a function that does something similar to the description below.. i don't want to write a function, if there is one existed already..
e.g.
replace(inputstring, str1, str2) <- this function search inputstring for the occurance of str1 and replace every occurance of str1 with str2.
thx in advance.
|
|
|
|
|
I think CString.Replace is what you're looking for. Give it a lookup in MSDN. You would use it like
CString tmp;
tmp = "aksjdksajdlksajdsakljdsaljd";
tmp.Replace("ask","ksa");
for that the tmp is set to a load of garbage, but the replace will change every occurence of "ask" to "ksa" in the string.
|
|
|
|
|
thx for the info, carrie.
|
|
|
|
|
Below are three files, two .cpp files and one .h file. The program runs no problem and does exactly what it is supposed to do but right after it executes it crashes and I cannot figure out why. I have tried to figure this out with someone in my class and he cannot figure it out either. Anyone out there who can figure it out for me????? It crashes on a Win XP machine, btw, if that makes any difference. Thanks. Jo
_________________________________________________________________________________
//header
#ifndef BrandesJF1CIS32B02FD_h
#define BrandesJF1CIS32B02FD_h
class DoubleArray //define class
{
public:
DoubleArray (); //constructor
int &operator() (const int, const int); //overloaded () operator
void PrintArray(); //output data
private:
int array[8][8]; //the 8x8 array
};
#endif
____________________________________________________________________________________
//source
#include "BrandesJF1CIS32B02FD.h"
#include <iostream.h>
DoubleArray::DoubleArray ()
{
for (int rows = 0; rows <=8; rows++) //propogate initial board
{
for (int columns = 0; columns <=8; columns++)
{
array[rows][columns] = columns;
}
}
cout << " The initial board's data\n";
cout << " ________________________\n\n";
DoubleArray::PrintArray(); //display initial board
}
int &DoubleArray::operator() (const int row, const int column) //operator () function def.
{
return array[row][column];
}
void DoubleArray::PrintArray() //PrintArray function definition
{
cout << " 0 1 2 3 4 5 6 7\n";
cout << " ____________________________________\n";
for (int rows = 0; rows <= 7; rows++)
{
cout << " " << rows << "|";
for (int columns = 0; columns <= 7; columns++)
{
if ((array[rows][columns]) < 0)
{
cout << " " << array[rows][columns];
}
else
{
cout << " " << array[rows][columns] << (columns == 7 ? "\n" : "");
}
}
}
cout.flush();
}
______________________________________________________________________________________
//source 2
#include "BrandesJF1CIS32B02FD.h"
#include <iostream.h>
#include <windows.h>
void setcolor(unsigned short); //function prototype for color
main ()
{
DoubleArray board;
setcolor(12); //change color of calculating and final board ONLY
cout << "\nCalculating......\n\n";
cout << "1. board(0,0)=board(0,1)+board(0,7)\n";
cout << "2. board(1,0)=board(1,1)-board(1,7)\n";
cout << "3. board(2,0)=board(2,1)*board(2,7)\n";
cout << "4. board(3,0)=board(3,6)/board(3,2)\n";
cout << "5. board(4,0)+=board(4,7)\n";
cout << "6. board(5,0)-=board(5,7)\n";
cout << "7. board(6,0)++\n";
cout << "8. board(6,0)*=board(6,7)\n";
cout << "9. board(7,0)=7\n";
cout << "10. board(7,0)/=board(7,1)\n\n";
board(0,0)=board(0,1)+board(0,7); //calculates data
board(1,0)=board(1,1)-board(1,7);
board(2,0)=board(2,1)*board(2,7);
board(3,0)=board(3,6)/board(3,2);
board(4,0)+=board(4,7);
board(5,0)-=board(5,7);
board(6,0)++;
board(6,0)*=board(6,7);
board(7,0)=7;
board(7,0)/=board(7,1);
cout << " The final board's data\n";
cout << " _______________________\n\n";
board.PrintArray(); //prints out new board
cout << endl;
return 0;
}
void setcolor(unsigned short color) //color function
{
HANDLE hCon = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(hCon,color);
}
______________________________________________________________________________________
|
|
|
|
|
Joisme wrote:
for (int rows = 0; rows <=8; rows++) //propogate initial board
{
for (int columns = 0; columns <=8; columns++)
don't these loops overrun the end of the array? they go from 0 to 8, but there is no array[8][8] .
-c
There's one easy way to prove the effectiveness of 'letting the market decide' when it comes to environmental protection. It's spelt 'S-U-V'.
--Holgate, from Plastic
|
|
|
|
|
yeah there is...look in the class.....
private:
int array[8][8]; //the 8x8 array
Is that what you are referring to???
Jo
|
|
|
|
|
your declaration gives you 8x8 values, not 9x9. your loops are spanning 9x9 values.
-c
There's one easy way to prove the effectiveness of 'letting the market decide' when it comes to environmental protection. It's spelt 'S-U-V'.
--Holgate, from Plastic
|
|
|
|
|
I see. Do you think the program would still run properly and give the correct values in the table/array if the loop was incorrect? Do you think that would cause the crash at the end? I will try mess with that coding.
|
|
|
|
|
there is no telling what you will get if you start writing off the end of an array. you could be writing into anything...
-c
There's one easy way to prove the effectiveness of 'letting the market decide' when it comes to environmental protection. It's spelt 'S-U-V'.
--Holgate, from Plastic
|
|
|
|
|
Remember that arrays in C/C++/C#/Java are indexed from 0 to size-1. So by reading the element at position 8, you're actually reading the 9th element. And your array only has room for 8.
Regards,
Alvaro
Well done is better than well said. -- Benjamin Franklin
(I actually prefer medium-well.)
|
|
|
|
|
you guys are awesome......that totally fixed it.
I knew that arrays started at 0 but i was sloppy in the coding and then didn't even think, since it worked properly, that the crash at the end was because of the loop...never entered my mind...
thanks a bunch..that fixed it....
Jo-Anne
|
|
|
|
|
Also don't use magic numbers, e.g. int array[8][8]
try #define MY_ARRAY_SIZE 8 (or const int MY_ARRAY_SIZE = 8)
array[MY_ARRAY_SIZE][MY_ARRAY_SIZE]
then, for(i = 0; i < MY_ARRAY_SIZE; i++)
|
|
|
|
|
I'm writing an MFC app that uses a word 200 object via automation. Of course this requires me to give the type library of word9 as well as word9 hearder files. Will this app work if I distribute it and the customers have a word version that is greater than 2000 such as Word XP or one lower such as Word 97? I don't have these office versions so anyone with MFC automation experience with Office , an answer would be greatly apprciated by me.
Thanks in advance,
Martin.
|
|
|
|
|
It depends what interfaces you use. We've had no trouble using apps built against Office97 and 2000 on systems with 97, 2000, and XP installed. But we stick to the functionality available in Office97.
(and of course, there's no guarantee that MS won't break compatibility at some point in the future... )
---
Shog9
This is my December
These are my snow covered dreams
This is me pretending
This is all I need...
|
|
|
|
|
i am using xp professional.
i have created a gina dll that will call the orginal msgina function.
question-
when the window perform logoff procedure then the window with this message should appears
Press ctrl+alt+del (like in WINDOWS NT OR 2000)
I dont how to implement that little logic.
Can any body tell which function of gina dll called when the system is in loggoff state and and
the dialogbox with this title
--------------------
Log On to Windows
--------------------
did not appears so that i can call the function that create a dialogbox
(having message Press CTRL+ALT+DEL)
For this purpose cany any body tell which function of gina dll or winlogin.exe creat a
message(Press CTRL+ALT+DEL)
and where i have to call that function?
so that after logoff procedure
the dialogbox with this title
--------------------
Log On to Windows
--------------------
did not appear.
//////////////////////////////////////////////////////////////////////////
i have halted the CTRL+ALT+DEL by using this simple code in gina dll
but there is still a problem and that is
when i press CTRL+ALT+DEL the desktop window and its child windows shakes
it gives the behaviour as i perform refresh event.
but i did not want that for my running application at that time.
nothing should heapen when user press CTRL+ALT+DEL?
how to do that ?
i have spent a lot of houres but could not sucessed yet.
can any body help me in this regard.
int
WINAPI
WlxLoggedOnSAS(
PVOID pWlxContext,
DWORD dwSasType,
PVOID pReserved)
{
if(dwSasType==WLX_SAS_TYPE_CTRL_ALT_DEL)
return WLX_SAS_ACTION_NONE;
else
return GWlxLoggedOnSAS( pWlxContext, dwSasType, pReserved );
}
r00d0034@yahoo.com
|
|
|
|