|
thank you for you'r praise,
i know that but i didn't understand the code of these project's, it's hard to understand.
in abstraction i want som simple & good project
Anas_zet
|
|
|
|
|
Help me,
To any one read this thread if can help me to obtain any any VC++ project for my matter.
pleeeeeeez
Anas_zet
|
|
|
|
|
for my matter
whats ur matter?
|
|
|
|
|
|
I'm writing a utility which uses files which reside on a network drive. In order for the application to run correctly the first time, the user must (outside of my application) open up the network drive in Windows Explorer to authenticate.
In my application, if the user is not authenticated, fopen(), etc just returns false citing improper access or whatever. Is there a way I can force windows to display the authenticate dialog before failing at fopen()?
Its a standard win32 app...
Thanks.
Mike.
doner at obtain.com
|
|
|
|
|
While I've not ever tried it in this context, do NetShareAdd() , CreateProcessAsUser() , or NetUseAdd() help?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
how can i display an integer using MessageBox command?how can i convert an integer value to string?
|
|
|
|
|
char buf[81];
int i = 2;
sprintf(buf, "%d", i);
AfxMessageBox(buf);
|
|
|
|
|
CString buf;
buf.Format ("%i", iMyInt);
MessageBox (buf);
Tada!
Now, if you mean converting 1234 to one thousand, two hundred and thirty four,
as I *think* you asked earlier, I still don't know of a nice neat function.
It would be language dependent too...
Iain.
|
|
|
|
|
Iain Clarke wrote:
Now, if you mean converting 1234 to one thousand, two hundred and thirty four,
as I *think* you asked earlier, I still don't know of a nice neat function.
|
|
|
|
|
itoa(iValue,caBuffer,10);
onwards and upwards...
|
|
|
|
|
Can anyone tell me the url of websites where the efficieny of vc++ developer is tested? ie Online free exam for mfc programming or c++ programming.
Using the tests, the efficiency of the developer is tested.
I have also another question , the question is
What is the importance of ATL in vc++ programming ?
Can any one please help me in this matter.
PHILIP
|
|
|
|
|
phijophlip wrote:
Can anyone tell me the url of websites where the efficieny of vc++ developer is tested?
Efficiency is a very subjective metric. You could ask ten people what makes an efficient programmer and get ten different answers.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
phijophlip wrote:
Can anyone tell me the url of websites where the efficieny of vc++ developer is tested? ie Online free exam for mfc programming or c++ programming.
Remember that you get what you pay for. While they are not free, you might try brainbench.com[^] and transcender.com[^].
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi
Could anyone of you please tell me the best way to do reporting in vc++.
I have seen people using msdbrpt.dll in vb. Is there something similar for vc++ that can be used for reporting.
Can I use crystal reports, shipped with vs, in comercial application.(any License Issues ??).
Regards
Shiraz
The Best Relligion is Science.
Once you understand it, you will know God.
|
|
|
|
|
zainu wrote:
Can I use crystal reports, shipped with vs, in comercial application.(any License Issues ??).
As long as you own at least one fully licensed copy VS then you can ship the crystal reports with commercial software.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
Hello,
I need to create a form with multiple buttons instances. In C#, this
would look like this
static string[] strCaption={"Button A","Button B","Button C"};
Button[] btnShow=new Button[strCaption.Length];
for(int i=0 ; i < strCaption.Length ; i++)
{
btnShow[i]=new Button();
btnShow[i].Text=strCaption[i];
btnShow[i].Size=new Size(200,20);
btnShow[i].Location=new Point(10,35*i+20);
btnShow[i].Click+=new EventHandler(Button_Click);
btnShow[i].Tag=i.ToString();
this.Controls.Add(btnShow[i]);
}
I try to code this in C++, but I have a lot troubles setting the
identifiers.
This:
Button* btnShow[]
...
btnShow[i]=new Button();
...
Does not work. Any suggestions/code samples?
Thanks in advance,
Picander
|
|
|
|
|
you should allocate first the size of your button array, either statically (Button *btnShow[10]; ) or dynamically ( Button **ppBtnShow; ppBtnShow = (Button **)calloc(10, sizeof(Button *)); [...] ppBtnShow[i] = new Button; ). In the last case don't forget to free your data to avoid memory leaks!
Fold With Us!
Sie wollen mein Herz am rechten Fleck
Doch seh ich dann nach unten weg
Da schlägt es links
|
|
|
|
|
I think it is better to have an array that contains directly the buttons and not the pointers to the buttons (otherwise you will need to destroy your buttons after use, ...).
So it looks like:
CButton* m_pButtonArray;
And to create for example 10 buttons:
m_pButtonArray = new CButton[10];
Then you will need to 'initialize' them using the Create method and then call ShowWindow(SW_SHOW) for all of them.
Hope this helps
|
|
|
|
|
Hi Picander,
You forgot to attatch your code, and you didn't mention which compiler your are using VC6.0 or DOT net. Well I gave a try to do the same stuff you have tried, with MCF in VC6.0. You might take a look to it.
//---------------------------------------------------
char *strCaption[3]= {"Button A","Button B","Button C"};
char buffer[20];
int butt_width = 90,
butt_height = 30,
butt_pad = 10;
CButton *myButton = new CButton[3];
// Create a push button.
for(int i=1 ; i <= 3 ; i++)
{
myButton[i-1].Create(strCaption[i-1], WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON, CRect(10, 10 + butt_height * (i-1), 100, butt_height*i), this, 1);
//add code to populate variables
}
//--------------------------------------------------------
Good Day
Sohail
|
|
|
|
|
Thanks for the reply Sohail!
I forgot to mention that I am developing a .NET windows forms application.
Button *myButton = new Button[3];
does not work...
gui\myForm.cpp(87) : error C2691: 'System::Windows::Forms::Button' : invalid type for __gc array element
gui\myForm.cpp(87) : error C3149: 'System::Windows::Forms::Button' : illegal use of managed type 'System::Windows::Forms::Button'; did you forget a '*'?
gui\myForm.cpp(87) : error C2691: 'System::Windows::Forms::Button __gc *' : invalid type for __gc array element
i have tried many other options, as other posted suggested and i still cannot get it working.
I cannot find on the net any similar code sample for c++.
|
|
|
|
|
you need to reserve a range of continuous resource ID for your array of buttons; and manually create a ON_CONTROL_RANGE entry in the message map.
The problem with MFC is that you need to have a predefined ID range; you can't create the buttons with no defined ID and have it registered in the message map ( or I think so ).
ON_CONTROL_RANGEBN_CLICKED, id1, id2, OnButtonsClicked)
void YourMethod::OnButtonsClicked(UINT nCmdID)
{
switch ( nCmdID )
{
case id1:
...
case id2:
break;
default:
break;
}
}
One other way would be to create your own class of button that have callbacks that can be sent to the parent window.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Thanks for all the replies! You are great folks!
Here is the combination of your suggestions:
Button* myButtons[];
myButtons= new Button *[20];
for (int i = 0; i < 20; i++)
myButtons[i] = new Button();
|
|
|
|
|
Thanks for all the replies! You are great folks!
For a .net managed c++ windows form application, here is the combination of your suggestions:
Button* myButtons[];
myButtons= new Button *[20];
for (int i = 0; i < 20; i++)
myButtons[i] = new Button();
|
|
|
|
|
hi all there, i want a code that help me to insert any file type in a rtf file, i need to insert by code not drag drop by mouse so plzzzzzzzzzzzzz help me .......
Thanks alot
Metal Man
|
|
|
|