|
Sorry don't have the code on me right now. I'll reply again later when at home. But i'll try to get it across now. I have a Menu class that contains a deque of other MenuPtr's as you can add Menu object to Menu objects.
One way is vis Menu::add(MenuPtr& menu);
or Menu::add(Menu* menu);
So in another class I have a Menu object which I add other Menu object to, etc.
I have been messing around with both, but when I use the Menu* one I never delete the pointer I created so that should cause a problem. So I get the error when I do Menu::clear which clears the list of child menus. or when I quit the program as in the deconstrutor it also call clear().
Hope this makes it clear. I'll be back home later and look at the code again.
Thanks
Luke
|
|
|
|
|
i had this problem before.
it is because of size of Entities you En/Deque in Queue.
it is not the same value that queue thinks!
for example you Enque 5 Byte Entities But Que try to dequeue 10 Bytes Entities.;P
M.Mehrdad.M
|
|
|
|
|
Hmm ok. Any idea of why this would happen. Or how did you overcome the problem?
Luke
|
|
|
|
|
Hi!
Can anybody help me on how to disable Maximize box of the context menu(upper right hand side of the dialog box) at runtime.
Thanks.
|
|
|
|
|
Disable:
<br />
DWORD d;<br />
d = GetWindowLong(AfxGetApp()->GetMainWnd()->m_hWnd,GWL_STYLE);<br />
d = d & (~WS_MAXIMIZEBOX);<br />
SetWindowLong(AfxGetApp()->GetMainWnd()->m_hWnd,GWL_STYLE,d);
Enable:
<br />
DWORD d;<br />
d = GetWindowLong(AfxGetApp()->GetMainWnd()->m_hWnd,GWL_STYLE);<br />
d = d | WS_MAXIMIZEBOX;<br />
SetWindowLong(AfxGetApp()->GetMainWnd()->m_hWnd,GWL_STYLE,d);<br />
this is this.
|
|
|
|
|
how to open visual c++ that i get from msdn, there is no .dsw exstension, i try to open .vcproj but in can't
can some body help me
|
|
|
|
|
Sounds like you're trying to use VC6 when all the samples now are probably VC2003. There are a lot of changes in between compilers, mostly standards compliance, but most samples would still work I reckon if you create a project and copy the files in. Unless they are MFC, MFC has significant changes also.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
I'm still new to VC++6.0.
I have a combobox which is of the dropdown list type.
My problem is whenever you have selected an item and I press "enter" key, this causes my whole application to exit and this is not acceptable as user is still filling the form.
Would appreciate your help on how to stop this?
Urgent need of help.
Thanks.
Regards,
Jap.
|
|
|
|
|
'ESC' is the same as pressing Cancel, and 'RETURN' is the same as pressing OK. Handle OnOk and OnCancel, and suppress the call to the base class if the key is down. GetAsyncKeyState is, from memory, the method to use to do this. You call it twice, as it is buffered. The first call clears the buffer, the second tells you if the key is down.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
|
THanks! it works already..
|
|
|
|
|
See here.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
i developed an application dialog based.i want to hide dialog i mean,Dialog application should exist in background process but its dialog window should not be visible at the front end.In other words just dialog window should not be displayed but its process should exist.
thanks
ajmal siddiqi
ajmalsiddiqui
|
|
|
|
|
this->Showwindow(SW_HIDE);
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
hi sir..
i want as the dialog is created it should be hidden or as application is loaded dialog should be hidden.so sir to handle this situation where i should
write this->ShowWindow(SW_HIDE);
THANKS
AJMAL
ajmalsiddiqui
|
|
|
|
|
The problem here is that when CDialog::OnInitDialog() finishes it will call ShowWindow(SW_SHOW) . The solution is to override OnWindowPosChanging() and remove the SWP_SHOWWINDOW flag.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Hello,
In your init instance, your dialog is created and run modal! This means that you app only runs if your dialog exists.
To change this behaviour, change the InitInstance() method to create a modeless dialog. Be sure to remove the visible style or call ShowWindow(SW_HIDE) in your OnInitDialog() method.
Can you tell us why you need your window to be invisible? Maybe you are better off without a window!
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
thanks sir
for replying actually i make a multithrreaded mfc applicaion .it has my own functionality and i want to run it in background as a process just like a service.And i donot want any window should apear so user cannot interact with my application. ajmal
ajmalsiddiqui
|
|
|
|
|
So why not make a real service instead of a fake one? You'll be much happier with the results.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I have to do a project and I need the code
The project is concerning with the implementation Of a complete organizer
system that similar to the organizer you find in your mobile phone.
The system should include the following module:;
1- Phonebook Index, this module contains the personal information for your contacts (i.e. name. telephone.. address,. email etc..) you are supposed to add. delete-and edit any of the entries. All of the entries wi1l be sorted by name. You can search for any entry by name or telephone number or any other criteria you find suitable. You should store these information on the hard disk
2- Appointment scheduler: the user can determine the date, the time, location ,title and a memo fur ea.ch appointment The user can add, edit and delere any appointment. Your system should be able to check for the appointments for
any day the user request You should store these iformation on the hard disk
3. memo registry. your system should store the title. the date and the content for each memo. The user can search by the date or the title or the memo. You
should store the information the hard disk
4- Most recent list. a queue of the most recent searched phone book entries You
should store the information on the hard disk
5. A simple calculator
6- a security system. Password for opening the program
Note:
All the modules will be contained in one program (one main only)
You are supposed classes as much you can.
Use visual c++ , Qt and Dev c++ for making an interface for the program.
|
|
|
|
|
suroor_bio wrote:
I have to do a project and I need the code
Better get to work then.
We don't do homework here. If you try to do it yourself and get stuck, we will help. If you want to cheat on your assignment, and cruise until you get to your exams ( which you will then fail, and subsequently find your career to involve saying 'do you want fries with that' ? ), I suggest you go over to rent-a-coder.
Or you could pull your finger out, do your own assignment, and ask questions if you get stuck. In that case, we'd all love to help you.
I used to be worried about oversupply of graduates into our industry pushing wages down. Based on the number of people who post their homework here, I'm no longer worried, except that I'm worried that I may end up managing a team which includes people who have never written a program before.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote:
I used to be worried about oversupply of graduates into our industry pushing wages down.
I was never worried about this. I'd even love too see the number of dumb unskilled programmers entering the business world. This would cause the value of skilled and smart programmers to escalate and we would get what we deserve! The only thing that you should worry about is working with unskilled programmers, since that will be a major source of annoyance..
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
suroor_bio wrote:
You are supposed classes as much you can.
Can you elaborate on this?
Where do you want us to help?
Oh yeah, will you please attend to classes and do your own homework for your own sake? Thank you very much.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
hi
is it possible to send data to a dialog from another class
when the dialog is running? if yes how?
|
|
|
|
|
Communication between a class and a dialog is best done by sending (or posting) messages to the dialog. Sending a message will cause it to be handled synchronously; posting a message will put it in the dialog's message queue.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|