|
I'm having trouble with visual studio C++ (orcus)
I'm trying to make my program prompt to Close when
an event is fired.
currently I just have:
Close();
Which works perfectly fine except It does not prompt the user if they really want to close the application or not
I have tried
result= MessageBox::Show("Are you sure you want to exit?","Exit",MessageBoxButtons::YesNo,MessageBoxIcon::Question);
if (result==DialogResult::Yes)
{ Close(); }
but It gives me a Compile error, Saying Result, and Yes
are undefined. Please Someone with C++ knowlege, Help me.
|
|
|
|
|
it says exactly:
'Yes' : undeclared identifier
|
|
|
|
|
James245 wrote: DialogResult
"result" has no defined type. It should be
DialogResult result = MessageBox::Show(...);
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Managed code on this forum;P
|
|
|
|
|
Heh. It was easier to reply than to explain
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
In the future, please post managed C++ questions on the
(Managed) C++/CLI Board[^]
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi All,
I want little much information about the screen streaming.
Let me explain that what I want. I want to create frames from the screen in which my screen data screen pixel format,colors)are stored.So, How can I do that VC++ MFC.
I want to make frames continuesly as my screen (desktop) is changed.And I want to compress them and send them on socket.
So, plz help if anyone knows it.
Thanks In Advance.
Ashish Bhatt
|
|
|
|
|
|
Ok Thank u Hiru.
I will see this Link.
Ashish Bhatt
|
|
|
|
|
Dear all
in visual C++ 6 I want to create an array of class objects like this :
declaration in header file :
CStateMachine *state[NumberOfChannels];
in constructor :
for (int i=0; i < NumberOfChannels ; i++)
{
states[i] = new CStateMachine(this);
}
in destructor :
for (int i=0; i < NumberOfChannels ; i++)
{
delete states[i] ;
}
But when I want to delete the file I get the following error
DAMAGE : after normal block (#210) at 0x13243214
Press any key to debug the application
Abort, retry, Ignore.
May you please help me to find the reason of this problem.
Regards
|
|
|
|
|
"But when I want to delete the classes I get the following error" is correct.
|
|
|
|
|
If the CStateMachine's destructor would delete the pointer which store something(here is its parent:this).
if so,I think you should check it.
And,if you debug it and trace,you should find where the crash occur.
good luck
|
|
|
|
|
Hello to all,
i am having a character pointer which points to a character string, lets say it is "char* A", this 'A' points to a character string lets say "Hello codeproject forum", now i want to break this string into single characters so that i can display this string character by character on a page as i am having space limitations means rather than displaying the string "Hello codeproject forum" on one line i want to display it like below-
Helloco
deproje
ctforum
how this can be done? can anybody tell me plz? its urgent.
Thanks and Regards,
Anay
|
|
|
|
|
The pointer is basically a pointer to an array of chars.
You can simply loop through them one by one and print 7 chars, then print a new line.
char* a = some_string;<br />
int length = strlen(a);<br />
while(length > 0)<br />
{<br />
for (int i = 0; i < 7; i++)<br />
{<br />
length--;<br />
cout << *a++;<br />
}<br />
cout << endl;<br />
}
|
|
|
|
|
sounds weird. but i am wanting to create a virus to corrupt all the data on my computer when i run it. kinda like those erase programs but they take too long. i want to corrupt so it will be much quicker i just want to be able to make my stuff unreadable. i don't know much about this stuff. but i do have some programming knowledge in C++ and VB.NET. if anyone has any links or suggestions please let me know. thanks
|
|
|
|
|
I cant understand why you want to corrupt datas on your system?
|
|
|
|
|
for security reasons. just like those programs that erase your hard drive. except that takes too long. if doing this would be faster. that would be great.
|
|
|
|
|
I think you have other choices instead delete files.
|
|
|
|
|
I want to make a program that queries google and wikipedia with a user defined string and displays their results. To do this I'll need to search through the received xhtml source. How do I go about this?
Do I need to set up an IIS or ATL server?
Does anyone have tips, such as headers/methods I'll need to use?
Any advice is greatly appreciated!
|
|
|
|
|
|
I want the child Window created in MDI application to move out the main frame window.
Main frame is the parent of child frame, so it is always stays inside of the main frame.
Is it possible by any means, so that I can move child frame out of mainframe.
Your response will be highly appreciated.
Thank you,
|
|
|
|
|
|
HI
I works now. I got the problem.
Thank you.
[SOLVED]
I am trying to add a status bar and toolbar with the Childframe of MDI application.
1. I have added a CToolBar member in CChildFrame class which is derived from CMDIChildWnd
2. Add a message handler for WM_CREATE in CChildFrame class
3. Try to use m_toolbar.Create() method of toolbar to create the toolbar in OnCreate() method of CChildFrame \
But I got assertion.
Is it possible to add status bar or toolbar in Child frame of MDI applicaton.
Please help me if you know how it can be done.
Thank you.
-- modified at 19:15 Friday 19th October, 2007
|
|
|
|
|
VS 2005
VC++
Hello,
Is it possible to copy all contents in string table and paste in MS excel? If it is possible, then how?
I appreciate your reply.
Thanks,
Muthiah.
|
|
|
|
|
You cant but you can read each line of string table on your code with CString::LoadString and then write to excel.
|
|
|
|