|
followait wrote:
I think sheet of the pages is the place, but how can a page save a value in a variable in the sheet?
What are you talking about ????
|
|
|
|
|
cedric moonen wrote:
What are you talking about ????
Tequila ?
hum, maybe he was saying - in his bad word - that he wanted to save in a property Sheet one variable that is to be shared between its property pages...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Hello!
I wonder if there is some way or some trick to gather some info during compile time and using it at runtime ?
example1:
We have many cpp files. We have some #define CPP_COUNTER 0. There would be some code (macro?) at the begining of every cpp file which would increase this counter for 1. When linking the project, CPP_COUNTER would hold the number of cpp files. In runtime I would be aware of cpp files in the project by reading CPP_COUNTER definition.
example2:
We have many files in the project, but functionaly they are divided in few modules (dsp, writter, reader, etc). At compile time every cpp file would have at the begining some code which would register (to some global variable) to which module it belongs. Something like
REGISTER_MODULE(_FILENAME_, "disk writter")
In runtime I would be aware of all the modules in the system by looking at the global variable of all registered modules.
I would need something like example2 shows. Is it even possible? Is there some way?
Best regards,
Rostfrei
|
|
|
|
|
I have generated a window using AppWizard with a default DOC View classes. now i split my window into two. In the new pane i want to display log activities. how should i do it?
What i did was i derived a runtime class from CFormView and Created a Listbox in the form and using it. But the thing is i cannot access the memberfunctions of CFormView derived class because its constructor is private. And If I change it to Public it Gives assertion failure. Now if i want to access member function how can i do it.
One solution i thought is if i am able to access the only object crteated, i can use it. But i don't know how to get that object
|
|
|
|
|
CFrameWnd has a method GetActiveView().
Try using that to get a pointer to your view object.
|
|
|
|
|
Hi - I have a dll, that
a) I dont have the source for
b) I dont have .h files for
c) I have minimal documentation for
I can produce a dumpbin /exports, and I know it was written using MS VC++ .. Now, Im a bit rusty with dll's, years ago, the fist time I approached this nasty issue, I defined :-
#define SZ_DPS_ProcessTransmit "?ProcessTransmit@@YAFPBD000@Z"
typedef short (__cdecl *LPDPS_ProcessTransmit) (char const *, char const *, char const *, char const *);
LPDPS_ProcessTransmit m_DpsProcessTransmit;
Most of the functions look like ?Transmit@@YAFPBD000@Z in the dumpbin - but as far as I know, there's nothing to tell me what calling convention was used, so the __cdecl used in the definition above was an assumption ..
So, was it a good assumption - or should I use stdcall ?? There's a penalty here - its not the easiest of systems to re-work / work on - its part on an encryption system that doesnt like being toyed with ..
any ideas ??
thanks, Garth
|
|
|
|
|
VS.NET includes a program UNDNAME to give you the undecorated definition of the name. You guessed right, the routine is a __cdecl.
You don't need to define the SZ_DPS_ProcessTransmit. Name decoration happens automatically.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Many thanks Tim - much appreciated - I'll remember UNDNAME
cheers, Garth
|
|
|
|
|
How should i design my GUI's Architecture? What steps should I follow?
Thanks.
I will rank if your reply helps.
|
|
|
|
|
Pretty difficult to answer given the few information we have... What kind of GUI do you want ? Are you using the MFC's ? Is it a console app, Win32 app, ...
|
|
|
|
|
I want my gui to be done using MFC. It is a GUI for an USB HID device.
How should i decide what class should i make, in which should class sholud place the member function, what should be placed in dll etc.
Thanks a lot for your time and help.
|
|
|
|
|
Hello,
From you other post, I understand that you want to create an application that communicates with an USB device, not? I also understand that you don't have any clue about how to design an architecture for your application.
May I suggest that you start reading about how to design software systems! There is no single plan that anyone can follow to achieve what people call a sound design.
In general, the following steps are taken:
<list> Devide the system in logically independant groups (often called layers).
Devide the functionality in a layer in logically independant sub-groups (often called packages).
Devide the functionality in a package in components that are managable.
You just should start with grouping functionality and keep that going until you got managable peaces that you can implement.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
I want to create a simple help-file that instructs my user how to use my program. How can i create a .hlp file that launches when the user presses F1.
_____________________________
...and justice for all
APe
|
|
|
|
|
You can use HTML Help Workshop...
All the information is available in MSDN.
|
|
|
|
|
Can someone give me some example of source code for the mewtocol header and terminator or some guide how to start to write a program that sending data using Mewtocol. Hope can undestand what I mean.
|
|
|
|
|
how to generate random numbers within a ceratain range..
let's say 500 and 2500
thanks
|
|
|
|
|
Search in this forum. The same question was raised some days ago.
|
|
|
|
|
Hi,
you use the rand() function like this:
2500-500= 2000
rand()%2001 //a number between 0 and 2000
rand()%2001 +500 // a number between 500 and 2500
Regards
|
|
|
|
|
Hi all,
i inherite a call of my own from CPreviewView. i put my own toolbar there,
problem is the default implementation of CPreviewView draws a dialog bar with Toolbar in it...how can i remove this default option?
thanks
Yaron Nir
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
I have not idea what to do if i want to make security in my program so that one user can open these forms and not others.
When I was programed in Access, i had a global variable where I want to put the user name from there i want to test if he had right or not, But with Visual c++ there is not global variable(i do know if it is possible to have it) what to do ?
I learn my self
|
|
|
|
|
There is global variables in C/C++ too, but it isn't considdered to be good programming practice to use it.
Use it like this:
In source1 (declaration + use)
char GlobalCharArray[100];
int GlobalInt;
In source2 (use):
extern char GlobalCharArray[100];
extern int GlobalInt;
Now you use the same char array and int from both source-codes.
|
|
|
|
|
Good, There is not link source1 and source 2.
In source2 can I insert the header file of source1 ? like below
#include "source1.h"
|
|
|
|
|
Sorry that I was a bit unclear.
When I said "source1" I meant the source file sourcecode1.cpp
And Sourececode2.cpp
I wanted to show you how to use the same global variable in two different source-files.
If you got only one source file, declare it the way I suggested in "source1", and then, just use it from wherever in that source-file.
Good luck.
kakan
|
|
|
|
|
Hi!
When I use DeviceIoControl() to communicate with a special
device in my VC++ application,the DeviceIoControl() returns
zero,and the Getlasterror() returns 50.
I defined an IOCTL command in my driver,and used CreateFile to retrieve the device handle.
I set a breakpoint at IRP dispatch instance in my driver code with SoftICE,
but it seems that the DeviceIoControl() can not communictate with the driver.
What's the matter then?
Thanks for help!
momer
-- modified at 2:03 Tuesday 20th September, 2005
|
|
|
|
|
Did you use open, start, stop and close device driver (sys) dinamicly? It is look like driver not started.
|
|
|
|