|
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
|
|
|
|
|
Iam using MDI Appln.
I added the foll. menus under the Veiw menu created by default by the appln.
1)"OSDToolBar" (whose ID is ID ID_VIEW_DRAWTOOLBAR)
2)"ActionEditor"(whose ID is ID ID_VIEW_ACTIONEDITOR)
the handler for ID_VIEW_ACTIONEDITOR is called before and after creating the first MDI Child Window.
But strangely the handler for ID_VIEW_DRAWTOOLBAR wont invoke after creating the first MDI Child Window.
Can anyone let me know where I am going wrong / is there anything Iam overlooking.The message map and handlers are given below.
BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
ON_WM_CREATE()
ON_COMMAND(ID_VIEW_DRAWTOOLBAR, OnDrawToolBar)
ON_UPDATE_COMMAND_UI(ID_VIEW_DRAWTOOLBAR, OnUpdateDrawToolBar)
ON_COMMAND(ID_VIEW_ACTIONEDITOR, OnViewFunction)
ON_UPDATE_COMMAND_UI(ID_VIEW_ACTIONEDITOR, OnUpdateViewFunction)
END_MESSAGE_MAP()
void CMainFrame::OnDrawToolBar()
{
if (m_bUICtrlBar)
{
m_bUICtrlBar = false;
ShowControlBar(&m_UICtrlsBar, m_bUICtrlBar, false );
}
else
{
m_bUICtrlBar = true;
ShowControlBar(&m_UICtrlsBar, m_bUICtrlBar, false );
}
}
laiju
|
|
|
|
|
Hi,
Print preview function can not be work when default printer
under off-line status.
The status is not for all computer, just for some computer.
Can give any recommanceds for this question ?
Thanks!
KHLin
|
|
|
|
|
Hi,
I'm using a CRichEdit control, changing colors of text and whatnot, but I don't want the text to automatically scroll to the bottom when I use the SetSel function. I've tried just sending the windows message via SendMessage but this seems to automatically scroll as well. Does anyone know how to not automatically scroll? Can I call upon the CEdit SetSel (which has the bNoScroll value) somehow?
Thanks!
Kelly Ryan
|
|
|
|
|
Nevermind, it was actually the HideSelection call I was making. I got it all working.
Kelly Ryan
|
|
|
|
|
I'd like to draw bitmaps with transparent colors using GDI+. For instance, I want to have a bitmap with a black background, but when it draws on my screen, the background draws transparently, i.e., does not draw, so the bitmap doesn't look like a square. Is there a way to do this with a quick GDI+ call, or do I have to resort to using bit masking with BitBlt?
Thank you!
|
|
|
|
|
If you can get to the regular GDI from GDI+, then try the TransparentBlt function call.
|
|
|
|
|
Have sombody using one of my programs that has a widescreen Dell 8600 laptop. The program uses a lot of overlaid bitmaps, and draws on it's dialogs, and everything is skewed all over the place on his system.
Wondering if anyone has run across this before, and if there's anything I can tell him to try to fix it? I don't have a widescreen to try to reproduce the issue on.
TIA,
Rick
|
|
|
|
|
Skewed how ? Can you run your program in a window to give you the aspect ratio to reproduce the problem ? Or is your screen size able to be abstracted to a property that causes you to draw as if it was wide screen ?
If your app is always full screen, I wonder if your code is just not handling the possibility of a different aspect ratio ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I'm trying to make a graphing and data analysis program using C++/Visual C++. I'm wondering if there are any graphing classes or templates available online somewhere?
htuba
|
|
|
|
|
|
Does anyone know how to find the number of windows open at a given time? I've looked into enumwindows and the find/get window functions, but there must be a way to just ask the window manager for this piece of information without having to iterate through all the windows.
Thanks,
~Himanshu
|
|
|
|
|
What's wrong with:
BOOL CALLBACK EnumProc( HWND hwnd, LPARAM lParam )
{
PUINT puCount = (PUINT) lParam;
(*puCount)++;
return TRUE;
}
UINT uCount = 0;
EnumWindows(EnumProc, (LPARAM) &uCount);
TRACE(_T("The numer of top-level windows is: %u\n"), uCount);
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I don't think there is a way to just get the count aside from the enumeration API.
However, you must make one distinction. Do you want:
a) ALL windows on the system?
b) ALL _VISIBLE_ windows on the system (There are a lot of windows on the system that are not visible)?
c) ALL _TOP LEVEL_ windows on the system?
There is also the question of do you want to include each little component such as each button, edit box, system tray, the desktop icons (progman), the task bar, etc. etc. etc. because all those little details get enumerated. All controls, etc.
Depending on what you are looking for would determine how you write the counting code to exclude and include the correct windows when you enumerate.
There is also "EnumChildWindows" which may need to be called on each top level enumerated window if you don't want just top level windows.
8bc7c0ec02c0e404c0cc0680f7018827ebee
|
|
|
|
|
Toby Opferman wrote:
c) ALL _TOP LEVEL_ windows on the system?
"Top level windows" were specifically asked for in the subject.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Ok, He'll need to filter out the invisible windows, task bar, prog man and the system tray.
8bc7c0ec02c0e404c0cc0680f7018827ebee
|
|
|
|