|
followait wrote: char *p=new char[16];
delete p+8;
or any other way
Well this is trouble! Standard STL template classes should help you.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
followait wrote: char *p=new char[16];
delete p+8;
or any other way
What exactly you want to achieve?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Help CRY
|
|
|
|
|
We would like to create an application that will display messages in different areas in defined areas of the monitors including large LCDs and keep the dialog size full size for each monitor. From the size of monitor, 17,27,30,42 and so on, change the font size and display areas to meet that size without much changing the overall look of the application output. Is is best to design multiple dialogs within the application to meet the sizes and have the user pick those or can we have one dialog and have the aspect and such change based on size? Any tools would be appreciated if you know of any.
Thank you
|
|
|
|
|
Designing multiple dialogs,is a bad idea. U can change the size of the dialog and the controls inside them dynamically. For example if u want ur dialog to be displayed in the size of the Desktop..Write the code in the OnInitDialog() as follows.
CRect WindowRect;
GetDesktopWindow()->GetWindowRect( &WindowRect );
MoveWindow( &WindowRect );
nave
|
|
|
|
|
Designing of multiple dialogs for different monitor size is not a good design. U can use GetSystemMetrics() function to get the screen size.
Eg :
int nWidth = GetSystemMetrics( SM_CXFULLSCREEN ) ;
int nHeight = GetSystemMetrics( SM_CYFULLSCREEN ) ;
MoveWindow(0,0,nWidth,nHeight);
|
|
|
|
|
Thank you for responding. From here though, I need to change controls within the dialog to fit the new size and their corresponding text. If we move the output from a 19" to lets say a 42" display we want the fonts in the controls to be larger. We are trying to create a message display for our industry and to fit on multiple displays. How and/or tools to also change the size of the control and any font size based on this?
thank you
|
|
|
|
|
I get data from my server by socket ,
it is asf(*.asf) data.
can't to save a file ,
because when I get the data,
must to play at once.
I want to play the data with window media player,
how to?
thanks!
|
|
|
|
|
I think you have to write some Direct Show filters (Hope a custom source filter is enough for this purpose)
|
|
|
|
|
This is a header file that was working fine before I added the structure defenition to it today. It's really giving me a headache. The compiler is giving me these errors:
Calculator\Common.h(9): error C2143: syntax error : missing ';'
Calculator\Common.h(9): error C2143: syntax error : missing '}' before 'constant'
Calculator\Common.h(9): fatal error C1075: end of file found before the left brace '{' at 'c:\Documents and Settings\John\My Documents\Visual Studio Projects\Maille Calculator\Common.h(9)' was matched
The relevant line has a smiley next to it.
<br />
#ifndef COMMON_H<br />
#define COMMON_H<br />
<br />
enum ErrorMessageType {INVALID_INPUT, DIVIDE_BY_ZERO, CRITICAL_FALIURE, CIN, EMPTY};<br />
:wtf:enum UnitType {INCHES, MM, AWG, SWG, TRL_WG, NOTDEFINED, ERROR};<br />
enum NumberFormType {FRACTIONS, GUAGE, DECIMALS, INTEGER, UNDEFINED};<br />
enum EvenOddType {EVEN, ODD, BOTH};<br />
enum MenuResponseType {CALCULATEAR, ARWEAVESEARCH, PRINTWEAVES, ADDWEAVE, REMOVEWEAVE, EXITPROGRAM, INITIALIZED};<br />
<br />
struct FractionType<br />
{<br />
int Upper;<br />
int Lower;<br />
double DecimalValue;<br />
};<br />
<br />
#endif
|
|
|
|
|
ERROR is your problem.
put another character after it and the compiler error will cease
|
|
|
|
|
Thanks, I got it working now. I'm suprised that people who do this for a living don't go insane with all these nitpicky details...
|
|
|
|
|
Where can I find good tutorials on Hardware Programming with Visual C++ or code samples for free. There is a good site in somewhere?
|
|
|
|
|
What exactly is hardware programming?
Are you looking to program EPROM's, device drivers, ...? Not exactly sure what you mean.
|
|
|
|
|
Max++ wrote: Where can I find good tutorials on Hardware Programming with Visual C++ or code samples for free. There is a good site in somewhere?
Is sysinternals.com[^] of any use?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Help CRY
|
|
|
|
|
Can you be more specific
whitesky
|
|
|
|
|
WhiteSky wrote: Can you be more specific
He want to Assemble Compute
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Help CRY
|
|
|
|
|
I want to control any device using PC through someport such as serial,parallel,usb.
|
|
|
|
|
|
I am using Visual C++ 6.0 MFC. I have created a small application to automate Excel and create a wookbook. I can ouput to this workbook using a 'Range' data type but the output function is huge (several pages). I would like to break this into several more manageable smaller chunks of code. In order to do this I need to be able to pass the Range data into several functions as an argument of the function call. I can't figure out how to do this and all of the examples I have found on the internet were using Visual Basic. Does anyone know how to proceed? Also, since I may have to pass workbooks and worksheets as arguments, can these be done also?
Buck
|
|
|
|
|
I figured it out. I needed to use the keyword class in the function prototype and function header. i.e. void OutputFunction(class _Worksheet sheet).
buck
|
|
|
|
|
The class keyword shouldn't be required. Also the way you do it creates a copy of the _Wordsheet parameter. Using a reference would be better. i.e.
void OutputFunction(const _Worksheet &sheet)
You may need to remove the const depending on what operationa are performed in the function.
Steve
|
|
|
|
|
|
Hi All,
I've to create an application container that hosts different dialog
based applications. Each dialog based application should be loaded based on certain criteria. Basically combining several independent dialog based applications into one application.
Any insights would be greatly appreciated.
Thanks,
|
|
|
|
|
Why not just host multiple dialog boxs in the same app. What do you gain by creating multiple dialogs applications and duct taping them together in another application?
Anyway, you could use _spawnlp or ShellExecuteEx
|
|
|
|
|
Thanks Bob, I'll take a look at ShellExecuteEx
|
|
|
|