|
Hi,
i think that you have to include the resizing code
Have a look @ msdn related to CWnd::OnSize it does have an example
Hope that this might help you
Sujan
|
|
|
|
|
Hi,
how can I make an installation package for my application in vc++?
I've not found anything in the articles and messages, and i don't know how do it.
Thanks.
|
|
|
|
|
At the risk of starting a battle...
Check out InnoSetup at www.jrsoftware.org[^]
It's a great little program that is easy to use.
Make sure you also download the ISTool editor.
Brad
|
|
|
|
|
Thanks!!! It's very easy and i've got my package!
|
|
|
|
|
An hour from need to successful installer!
Glad I could help.
|
|
|
|
|
But if You ar eusing INNO Setup ,u should learn some pascal language as it is based on Pascal Scrpting
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
I am trying to develop some extensions to the CSplitterWnd class and need to get the handle to the divider bar so I can add some features to this component of the class. Does anyone know how this can be done?
Specifically, I have some code that extends a divider to add a 'quick close' button and would like to incorperate this into our application's use of the SplitterWnd class. But I can't find the divider handle in the splitterWnd object to do this.
I'd appreciate any help.
Thanks.
-b
|
|
|
|
|
i m developer of network security and i have write program that make pc's in network more secure .
but i need some help for shutdown computer remotely useing
only one program instaled on server
please some source code or does'nt replay this message!
thank's
|
|
|
|
|
Take a look at InitiateSystemShutdown .
|
|
|
|
|
Look up ExitWindowsEx
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
I want to have a screensaver that logs the current user off when the have been idle for X amount of time. I am currently using ExitWindows() function, but the user is not logging off. The return value is ok. I thought my screensaver might have to handle the message as well but OnQueryEndSession never gets called. The message catch, shown below, is in the same class as the ExitWindows call. This function was created through MFC wizard.
BOOL CDrawWnd::OnQueryEndSession()
{
return TRUE;
}
Any help or guidance will be very helpful.
|
|
|
|
|
jet9153 wrote:
I am currently using ExitWindows() function, but the user is not logging off.
Which means that some application is returning 0 in response to the WM_QUERYENDSESSION message. Do you agree?
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Does it have to be within your screensaver? Windows has this functionality built in using Group Policies.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hi
First: I am very new in programming dlls. I tried to make one to use it with A5 3DGameStudio (link[^]). I just made a new project (dynamic-link library Win32) - I use Visual C++ - a very simple dll including one function returning an int . Compiling done, tested with an Visual Basic DLL-Tester - it works. Now the 3DGS doesn't accept it . Error: "Dll not compatible with 3DGS" ...
Has anybody ever written a dll for a 3DGameStudio Game that works could you give me an exemple how this looks like, just the structur and which data types (int or long / double or float) I can return ?? I got no answers from the support , no informations on the side nor on fan sides .
thanks to all who read this
Greatings
Lukas
|
|
|
|
|
The function GetScrollBarInfo() doesn't return anything....does not matter what i do. if i use Getscrollinfo() it always returns a value but Getscrollbarinfo on the other hand doesn't...by the way anyone else noticed how complex microsoft implemented the scrollbar? I find it quite a pain to draw a skin on a scrollbar because of this issue
Oooh Joy...
|
|
|
|
|
|
Ok, so I have this formatting function because I need 2 digits after the exponent and VS7.1 puts out 3 by default. So anyway, the code is pretty verbose and slow. Anyone care to take the blinders off my eyes and optimize this?
std::string CDataFile::mf_FormatNumber(const int& iVariable, const int& iSample, const bool& bIsDAT_Format)
{
try
{
char buffer[200] = {0};
std::string numstring = "";
std::string buffstring = "";
std::string result = "";
if(bIsDAT_Format)
{
result = (m_v2dData.at(iVariable).at(iSample) >= 0.0) ? std::string(" ") : std::string("");
sprintf( buffer,"%.5E", m_v2dData.at(iVariable).at(iSample));
}
else
{
result = (m_v2dData.at(iVariable).at(iSample) >= 0.0) ? " " : " ";
sprintf( buffer,"%.17E", m_v2dData.at(iVariable).at(iSample));
}
numstring = buffer;
if(numstring.length()-numstring.find_last_of("E") == 5)
{
buffstring = numstring;
if(bIsDAT_Format)
numstring.resize((m_v2dData.at(iVariable).at(iSample) >= 0.0) ? 9 : 10);
else
numstring.resize((m_v2dData.at(iVariable).at(iSample) >= 0.0) ? 21 : 22);
numstring += buffstring[buffstring.find_last_of("E")+3];
numstring += buffstring[buffstring.find_last_of("E")+4];
}
result += numstring;
return result;
}
catch(...)
{
std::string szerr = "";
char errbuff[1024] = {0};
sprintf(errbuff,"ERROR formatting Var: %d Sample %d! \nDetails: %s", iVariable, iSample,m_szError.c_str());
szerr = errbuff;
return szerr;
}
}
~Nitron.
ññòòïðïðB A start
|
|
|
|
|
Hi Nitron,
I don't fully understand your code, but the following should write a number in the format you wish:
std::string format(double& x,bool bIsDAT_Format)
{
char buffer[200]={0};
if(bIsDAT_Format){
sprintf(buffer,"%.5E",x);
}
else{
sprintf(buffer,"%.17E",x);
}
std::string res=buffer;
std::string size_type pos=res.find("E+0");
if(pos==std::string::npos) pos=res.find("E-0");
if(pos!=std::string::npos) res.erase(pos+2,1);
return res;
} I haven't compiled this, but the general algoritm should work, hope you get the idea: we look for "E+0" or "E-0" and, if the pattern is found, remove the offending "0".
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
Want a Boost forum in Code Project? Vote here[^]!
|
|
|
|
|
Joaquín M López Muñoz wrote:
we look for "E+0" or "E-0" and, if the pattern is found, remove the offending "0".
ahhh.. good thinkin' Thanx Joaquín!
~Nitron.
ññòòïðïðB A start
|
|
|
|
|
Hey every one...
How to Declare a program, Menu or a dialog
I mean if we have Word for example... How we can Declare the main window... and after that i want to Declare a menu or a dialog inside the Word....
so how to do that?
thanks
|
|
|
|
|
You are having troubles with pass-by-value semantics. Consider the following:
void foo(int var)
{
var=1;
}
...
int x=0;
foo(x);
The value of x after calling foo(x) will still be 0, as you're passing a copy of x to foo (i.e. its value) and not the real variable. C++ has so called references to allow you to pass a variable rather than a value:
void foo(int& var)
{
var=1;
}
...
int x=0;
foo(x);
The only difference is the & in the declaration of foo . Use the same technique in your code. If this is your first exposure to references, I suggest you learn more about them in some C++ book or online reference. Hope this helps.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
Want a Boost forum in Code Project? Vote here[^]!
|
|
|
|
|
To add to the previous poster's comments:
You are passing the copy of a pointer to pointer to int (int **). So when you are allocating space and saving the address, you're saving this address in a copy of the variable a, which has nothing to do with your a.
To solve this you need to either return the newly created array from your function by rewriting it as
int ** CreateArray(int i, int j)
Or you need to pass pointer to pointer to pointer to int (int ***) and set the value like this:
<br />
<br />
void CreateArray(int ***array,const int i,const int j)<br />
{<br />
*array = calloc (i, sizeof(int *));
loop<br />
*array[i] = calloc(...);
end loop<br />
}<br />
In your place I'd return the value instead of using int ***.
|
|
|
|
|
Yeah I suspected that and changed the function to take int *** .
But i have another function
void PrintArray(int **array,const int i, const int j)
{
int k=0,m;
for(;k
|
|
|
|
|
void CreateArray(int **array,const int i,const int j);
void main()
{
int **a=0;
CreateArray(a,3,3);
}
// creates a 2d array
void CreateArray(int **array,const int i,const int j)
{
int t=0;
if(i>0 && j>0){
array = calloc(i,sizeof(int *));
if(array){
for(t=0;t
|
|
|
|
|
I use Microsoft Visual Studio .NET 2003 and creating an unmanaged program. I included iostream but its functions (like cout and cin ) still won't work. Help me!
P.S.: I want an UNMANAGED (not-.NET) program.
|
|
|
|