|
GDI+ does.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
|
|
|
|
|
I deleted to source files from my project directory thinking that would remove them from the project. Now the darn thing won't compile. I keep getting "fatal error C1083: Cannot open source file: 'D:\Projects\My Proj\IntDlg.cpp': No such file or directory
What do I do now!?!
Why not throw away a dime?
I throw away ten pennies all the time.
|
|
|
|
|
Using the File View portion of the Workspace toolbar, simply highlight the offending source files, and hit the Delete key. This will remove the files from your project, and they will no longer be compiled. Hope this helps.
|
|
|
|
|
D'uh! I can't believe I forgot that! Oh well. This is my first day programming VC++ again for a few months. Thanks for the help.
Why not throw away a dime?
I throw away ten pennies all the time.
|
|
|
|
|
Also remember to remove all #includes to the deleted files
Nish
The rumours that I am an AI bot are absolutely false. These rumours have been propogated by *them* to focus all the attention on to me, while *their* bots take over the planet. Thank y%%%% Divide by zero. Cannot proceed. Abort(y/y)?
|
|
|
|
|
Do you needs those files. Look in the recycle bin.
Or go into your project and click on the file in your project view, and hit hte delete key to delete them from the project.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Check the recycle bin just in case VS is nice enough to copy it there for you.
Failing that...
Go to VSS or whatever you're using as a source repository and get the latest version.
Failing that...
Go to your trusty backup (CD, tape, floppy, etc) and get the last backed up version.
Failing that...
Get typing! Dialogs don't just write themselves!
J
|
|
|
|
|
I need to write a system try app that performs single frame capture on a right mouse click. It also has to run under Windows 98.
The system try stuff I knwo myself. For the right mouse click, presumably I need a mouse hook, because the app won't have focus (in the tray). For the difficult bit, presumably I need to use DirectX (specifically DirectShow?). Anyone got any ideas, sites, source code that could help me out (with the mouse hooking and DirectX specifically)?
Derek Lakin.
I wish I was what I thought I was when I wished I was what I am.
Salamander Software Ltd.
|
|
|
|
|
You mean of the screen ? No DX required.
CWindowDC dc(NULL); // You now have the entire screen in a device context
You can now blt the contents of this DC into another to get a bitmap of the screen in a format you can work with, without drawing to the screen itself....
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"But there isn't a whole lot out there that pisses me off more than someone leaving my code looking like they leaned on the keyboard and prayed that it would compile.
- Jamie Hale, 17/4/2002
|
|
|
|
|
Sorry, my original post wasn't clear enough. I mean frame grabbing from a video capture card with a camera attached to it.
Derek Lakin.
I wish I was what I thought I was when I wished I was what I am.
Salamander Software Ltd.
|
|
|
|
|
Ah... then you need DirectShow. I know John Simmons has done some of that stuff, maybe he posted an article, or some code here while he was trying to get it to work ?
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"But there isn't a whole lot out there that pisses me off more than someone leaving my code looking like they leaned on the keyboard and prayed that it would compile.
- Jamie Hale, 17/4/2002
|
|
|
|
|
Hi,
I have an MFC dialog app with a single form (the main dialog). I would like to put up a modal dialog for login credentials AFTER the main dialog as been painted to the screen.
In other words,
1) the user double click the icon for my app,
2) the main window is painted,
3) then the login dialog appears centered OVER the main window.
Where should I put the code for this login dialog? If I put it in the OnInitDialog() of the main window the login dialog appears BEFORE the main window is painted.
Thanks guys!
|
|
|
|
|
Do it the first time WM_WINDOWPOSCHANGED is sent to your dialog.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hmm, I just tried that but it pops up BEFORE the main diag is painted. I want to do it AFTER the main dailog is already up.
|
|
|
|
|
Aren't you by chance confusing WM_WINDOWPOSCHANGED with WM_WINDOWPOSCHANGING ?
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Joaquín,
No, I did not confuse WM_WINDOWPOSCHANGED with WM_WINDOWPOSCHANGING. I implimented it as you asked but it pops up my login dialog BEFORE the main one.
|
|
|
|
|
Don't cry man
Are you doing your stuff before or after calling the default CDialog::OnWindowPosChanged implementation?
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Now that you have an alternative solution, this is of limited interest, but I felt like posting it here. Today I finally could do some testing with my VStudio, and found WM_PAINT is an appropriate place to insert the launching of the second dialog:
void CMyDlg::OnPaint()
{
if (IsIconic())
{
...
}
else
{
CDialog::OnPaint();
if(m_bFirstTime){
m_bFirstTime=FALSE;
...
}
}
} Regards.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
You could post a message to the dialog from
OnInitDialog(). <br />
<br />
<font size="1pt" color="#D5EAFF">--------</font><br />
<p style="font-family: "Palatino Linotype", "Comic Sans MS", Arial, sans-serif; font-size: 10pt; line-height: 0.9em; margin-top: 0; margin-bottom: 2px">And we die young.<br />
Faster we run.</p> <p align="right" style="font-size: 6pt; margin-top: 0; margin-bottom: -2em">Alice in Chains, We Die Young</p>
|
|
|
|
|
Shog9,
I used the method that you suggested and it works well. Thanks!
|
|
|
|
|
No problem. It should be noted, Ravi did an excellent job of explaining what i alluded vaguely to
--------
And we die young.
Faster we run. Alice in Chains, We Die Young
|
|
|
|
|
Try Shog9's approach. Just do this somehere in OnInitDialog() :
PostMessage (WM_COMMAND, IDC_SHOW_LOGIN_DIALOG);
In your handler for the IDC_SHOW_LOGIN_DIALOG command, do this:
CLoginDialog dlgLoginDlg (this);
long nStatus = dlgLoginDlg.DoModal();
if (nStatus == IDOK) {
if (dlgLoginDlg.IsLoginValid()) {
return;
}
}
AfxMessageBox ("Login failure - exiting...");
OnCancel();
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
i want to know if there is any way to drag and drop a bitmap around a window,
if at all there is a way, can somebody help me out
Ashok Singh
<west end="" india="">
|
|
|
|
|
Did you paint the bitmap to the window?
Handle the WM_LBUTTONDOWN and WM_MOUSEMOVE messages to determine the position of the mouse, and the offset for which the mouse has been moved, and repaint the bitmap yourself.
As long as you are doing this in just one window, it should be fairly simple. If you want to drag and drop between to applications it will be more difficult.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Hey all. I'm just starting the adventure of learning Windows graphics programmnig and I was wondering if there were any GDI / Bitmap manipulation tutorials that you would recommend. Any suggestions would be greatly appreciated. Thanks!
-Mike
|
|
|
|