|
How do I get the command line arguments When I start my MFC EXE Application?
Can I find them somewhere from the CWinApp class…?
_____________________________
...and justice for all
APe
|
|
|
|
|
Of course
use the ParseCommandLine method, in your InitInstance of your CWinApp derived class...
from there it's easy
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
d00_ape wrote: How do I get the command line arguments
use GetCommandLine()
nave
|
|
|
|
|
Is there a way to use Windows vista controls in my VC++ application?
Thanks
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
-- modified at 6:30 Tuesday 25th April, 2006
|
|
|
|
|
Hi Yaron,
What do you mean?
Do you want that you want to use the Media player inside your application and not as a seperate window?
Regards,
Eli
|
|
|
|
|
Media player???
no, i am taking about the new look of the new windows platform which is called 'windows vista' it has some cool GUI which i want to use in my VC application.
my question is, is there a library i can link to or APIs i can use to do so?
thanks
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
Friends,
I am automating MS word from my MFC application. I want to perform following two tasks:
- Prevent MS-Word window from closing externally i.e i want to disallow the user to close MS word window by pressing the close button of the window OR selecting "exit" from the taksbar button, OR selexting exit from system menu OR by pressing Alt+F4 E.t.c.
- Disable the "Save As" option
Can anyone tell me whether it possible to acheve the foresaid tasks. This should be noted that because i am automating from my application, i obtained the HWND handle of MS-Word window and i am alreading using this handle to perform certain tasks which are not possible by automation.
|
|
|
|
|
Hi friends,
I have created one view window, from that view window I am calling one Dialog box.I want to pass public values from the view class to Dialog class.
Kindly reply
jawahar
|
|
|
|
|
J Jawahar wrote: from that view window I am calling one Dialog box.I want to pass public values from the view class to Dialog class.
Let ViewShowDialog is the function from where you calling te New Dialog Box
YourViewClass::ViewShowDialog()
{
CYourDlg dlgObj;
dlgObj.Var=View.Var;//pass the variable Content
dlgObj.DoModal();
}
"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
|
|
|
|
|
hi jawahar,
before creating the dialog object.DoModal(), assign the values in view to dialog member variables.
|
|
|
|
|
I have got two colors' RGB value,I want to change one from the other gradually ,how should i do?
Another problem is that i have some data ranged from 0 to 1,how can I make them from one color to the the color gradually?
|
|
|
|
|
Your question is not clear
snowheavy wrote: I have got two colors' RGB value,
Ok, you have two values representing a color
snowheavy wrote: I want to change one from the other gradually ,how should i do?
What do you mean ? You want your first value to be changed to the second gradually ? This makes non sense unless you 'draw' that on the screen (on a line or rectangle for example). But then, this is dependent of the technology you are using. More info about that is needed. What are you using ? GDI, OpenGL, DirectX, ... ?
|
|
|
|
|
sorry for my poor expression ability,I use GDI,and I want to fill a region,In
fact,I have wrote this code to test:
for (int i = 0; i < step; i++)
{
COLORREF color;
color = RGB((maxR - minR)*i/step+minR,(maxG-minG)*i/step+minG,(maxB-minB)*i/step+minB);
GetView()->dcMem.FillSolidRect(6000 * i/step+5000,-2000,6000*(i+1)/step,1000,color);
}The mapm mode I am using is MM_HIMETRIC,I found some stripes on it,
I don't know why.thanks for your reply.
-- modified at 4:26 Tuesday 25th April, 2006
|
|
|
|
|
|
|
He's how I'd do it:
COLORREF Voodoo(COLORREF from, COLORREF to, int n, int d)
{
BTYE fr = GetRValue(from);
BTYE fg = GetGValue(from);
BTYE fb = GetBValue(from);
BTYE tr = GetRValue(to);
BTYE tg = GetGValue(to);
BTYE tb = GetBValue(to);
double ri = double(tr-fr)/d;
double gi = double(tg-fg)/d;
double bi = double(tb-fb)/d;
retunr RGB(fr+n*ri, fg+n*gi, fb+n*bi);
}</code>
Where:
from - The from colour.
to - The to colour.
n - The step number.
d - The total number of steps.
NOTE: This hasn't been tested.
Steve
|
|
|
|
|
thanks ,i will have a try
|
|
|
|
|
Hi
Please suggest any article on "How to read .dbf (dbase) in VC without Database support "
thanx in advance
by
KK
|
|
|
|
|
|
Hi Maxwell Chen
Thanks for your reply
by
KK
|
|
|
|
|
I have need to open a socket to grab packets from an outside server. I have many questions about this undertaking.
The socket needs to transfer data back and forth between the client and the server.
* Is there an easy framework for this in MFC?
* Static vs. Dynamic port requests.... Should we use the same port each time we run the application? Or should we use dynamic ports?
* If we use dynamic, does that mean the Windows firewall will pop up a message saying "Hey, please verify that you want this app to access the internet?
* If we use static ports, how can we gaurantee that no other app is using the same port when we request it the first time.
* If we use static ports, how do we prevent other applications from stealing our assigned port?
* Do developers usually go to the firewall makers and try to get their applications pre-approved?
* Is there a way to be 'pre-approved' for most firewalls?
Spyware Questions (we certainly aren't spyware, we just want to make sure we're not labeled as such):
* Are there any certification programs you can go through to verify your app is not spying?
* Are these effective in terms of convincing users you're a good person?
* Same kinda question as above, is there a way to get pre approved for spyware companies and let them know who you are so they won't label you as such.
* Any other hints in terms of not being labeled this app-killing adjective?
Thanks very much in advance!
|
|
|
|
|
chasetoys wrote: Is there an easy framework for this in MFC?
CSocket
nave
|
|
|
|
|
Hi
I have set a Background image for my ActiveX ( ATL Composite Control) and it has some static text boxes. To make them transparent i did the painting of the static text controls ( in WM_PAINT). I.e after setting the image in OnEraseBkGnd(), i invalidated the static controls whose WM_PAINT is handled. This will TextOut the text above the BG image. But when i put this in web page, it seems that the OnEraseBkGnd() is calling frequently and thus the static control paint everytime, creating flickering of the static controls ( controls blink's).
Also when i call SetWindowText() to set new string in static control, I have to call Inavlidate() the whole control to make the new text display correctly. If i just call invalidate of static control, it overwrite the old text. Next painting of the window will solve this!!
How to solve these issues?
i have used this CP link to set background.
|
|
|
|
|
There is a OnCtlColor Member of CWnd, in which you can set the backmode to transparent.
Greeting from Germany
|
|
|
|
|
I did try with WM_CTLCOLORSTATIC, i could change the bgmode & color
Not able to make it transparent. I did have to draw using WM_PAINT
M_CTLCOLOR is not fired,I think it is due to ATL non MFC
anil
|
|
|
|