|
I wanna use the CString class in a non-MFC application, how can i do this? if this cannot be done, what can i use as a substitute? Thanks
|
|
|
|
|
|
I have a LPDIRECTDRAW that is being created fine under debug mode but not under release mode. I am linking ddraw.lib in release and debug modes. When the program runs in release mode, it asserts on my create function:
ASSERT(DirectDrawCreate(NULL,&mDD,NULL) == DD_OK);
Thanks in advance for any suggestions.
|
|
|
|
|
Here is the deal:
I have declared a class object in a function. Then I created a pointer to it right afterwords in the same function. Here is where the problem is. I try to pass that pointer to another function, and i get no errors, yet when i try to look at a data member of the class, i get all kinds of errors. Could someone tell me if this syntax for passing class pointers is correct?
(The class name is army and the object is MyArmy and the pointer to MyArmy is pMyArmy)
Pointer is declared like this:
void make_faction()
{
//creates object
army MyArmy(75, 5, 3000, 5);
//Creates a pointer to army
army* pMyArmy = 0;
//Gives the address
pMyArmy = &MyArmy;
//calling function
game_menu(pMyArmy);
}
Recieving function:
int game_menu(class army *pMyArmy)
{
return 0;
}
Is this the correct syntax? It shows no errors this way, but when i add
cout << pMyArmy->troops << endl;
to game_menu function, get errors.
|
|
|
|
|
I'm not sure about 'class army *pArmy' but normally you pass a pointer to the class by just 'army *pArmy'.
Are you sure the problem is with the pased pointer, and not with the data type you are passing to cout?
What is the type of the troops member? what compile time errors do you get?
|
|
|
|
|
One possible cause is the keyword class in the function declaration for game_menu. I also don't understand why you are creating a pointer?
Why not do it as followed?
void make_faction()
{
//creates object
army MyArmy(75, 5, 3000, 5);
//calling function
game_menu(&MyArmy);
}
int game_menu(army *pMyArmy)
{
return 0;
}
|
|
|
|
|
I want to capture the any portion of a CFormView (displayed or not).
It is possible to get the viewable area with DC tricks but how about non-displayed parts? Where it is stored?
Suha
|
|
|
|
|
http://www.fengyuan.com/article/wmprint.html
|
|
|
|
|
Is this possible. I want to be able to call functions in a DLL writen in C++, from a program writen in C.
If it is possible, is it possible to call functions within a class?
THanks for any help,
Yours
David Wulff
|
|
|
|
|
What font is used by office 2000 and 97 to paint the gui
Joel
|
|
|
|
|
Verdana is used in 200 (I don't have access to 97, so I don't know about that). Arial is used for any verticle fonts though (e.g a verticaly docked menu bar).
Size? 8 I would guess, but maybe 7.
David Wulff
|
|
|
|
|
And I thought they use Tahoma.
Uwe Keim
http://www.zeta-software.de
|
|
|
|
|
It might be... I said Verdana because i took a screenshot via PSP and zoomed in, then tried to match the text. Verdana exactly covered the text so I presumed it was Verdana.
David Wulff
|
|
|
|
|
Actually, it depends on which font you have set for the menu bars of "normal" apps. If you have it set to a bitmapped font (like MS Sans Serif), then Office uses Tahoma. If you have it set to a TrueType font, Office uses that.
The reason is that the menu bar needs to use a TTF so that the menu labels can be drawn vertically when the menu bar is docked vertically - bitmapped fonts can't be drawn rotated but TTFs can.
--Mike--
http://home.inreach.com/mdunn/
"That probably would've sounded more commanding if I wasn't wearing my yummy sushi pajamas."
-- Buffy
|
|
|
|
|
Verdana and Tahoma are pretty much as equal as Arial and Helvetica are. Tahoma comes with Adobe software and Verdana with Microsoft software (this is based on what I have found... I may be wrong as well).
Of course they are just a little bit different.
--memon
|
|
|
|
|
What is the proper declaration for a function to be exported from a c-style dll? Is there a way of doing it without using a .def file?
|
|
|
|
|
The func prototype should be:
extern "C" __declspec(dllexport) int YourFunction(void);
Then the actual declaration is:
int YourFunction(void)<br />
{<br />
<br />
}
--Mike--
http://home.inreach.com/mdunn/
|
|
|
|
|
How can I make a program that inserts some data into another executable that extracts the data? I am writing a encrypting/decrypting program, and I want it to be able to create self-decrypting Win32 executables.
Is the last section in a Win32 executable the data segment?
Thanks in advance for any advice!
Erik
|
|
|
|
|
I cannot find a tutor or sample code using a component like MSFlexGrid in an SDI/MDI View. And printing it!
Can somebody show me the way?
|
|
|
|
|
Use a form view, which means your view is laid out like a dialog on a property sheet. Then put the grid on the sheet. From memory you then override OnMove in your view to size the grid according to the view size.
LMK if you need more info and I'lldig up the project where I did it.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
I got the point, thanks a lot
Can you give one more spark to print it?
Suha
|
|
|
|
|
Found a spark here:
http://codeguru.earthweb.com/printing/formview_print.shtml
However it is limited to print only viewable portion of the CFromView!
|
|
|
|
|
I have to admit I did not get to the point of printing one. Given issues of colour and so on ( i.e. what looks good on the screen can be costly to print in colour and ugly in B&W ), maybe you want to allow the user to set what cells to print, and then do it yourself by drawing lines and text in the chosen font ?
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
Use a form view, which means your view is laid out like a dialog on a property sheet. Then put the grid on the sheet. From memory you then override OnSize in your view to size the grid according to the view size.
LMK if you need more info and I'lldig up the project where I did it.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
Hi,
I want to get the list of domains in network. For example, on my network there are 25 computers and three domains ( Development, Customer and Save ).
How programatically can i list in a listbox or example ( or in array) theses domains names?
Thank in advance
|
|
|
|