|
When using the SetWindowPos the first parameter a const CWnd*.... so.. HWND_TOPMOST is not able!
so I checked the MSDN library and then I saw a nother constant to send... wndTopMost...
BUT damn VC++.... the MSDN library says SetWindowPos has a const CWnd* parameter but when using the
wndTopMost the compiler error is cannot convert parameter one from const CWnd to const CWnd* !!
HEEELP!!!
I know that sounds crazy but thats it!!
/*
BETA
*/
|
|
|
|
|
You should use &wndTopMost and make sure that SWP_NOZORDER flag is not set.
Does it help?
Farhan Noor Qureshi
|
|
|
|
|
have you tried &wndTopMost instead just wndTopMost?
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
&wndTopMost. You'll find that & converts a variable to a pointer to that variable. * dereferences a pointer ( converts back )
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
I want to set the font in a MDI-application. So I need a command like "UpdateAllViewsInAllDocuments", but that doesn't exist.
Any suggestions?
Thanks
Friedrich
|
|
|
|
|
You could use:
CWinApp * pApp = AfxGetApp ();
ASSERT_VALID ( pApp );
POSITION posTemplate = pApp->GetFirstDocTemplatePosition ();
while ( NULL != posTemplate ) {
CDocTemplate * pTemplate = pApp->GetNextDocTemplate ( posTemplate );
ASSERT_VALID ( pTemplate );
ASSERT_KINDOF ( CDocTemplate, pTemplate );
POSITION posDocument = pTemplate->GetFirstDocPosition ();
while ( NULL != posDocument ) {
CDocument * pDocument = pTemplate->GetNextDoc ( posDocument );
ASSERT_VALID ( pDocument );
pDocument->UpdateAllViews ( NULL );
}
}
-Ben
---------
On the topic of code with no error handling -- It's not poor coding, it's "optimistic"
|
|
|
|
|
c:\my documents\visual c++ work\lu\crc.cpp(165) : fatal error C1010: unexpected end of file while looking for precompiled header directive
I've never seen this one before, can't seem to figure it out. The following is a link to the error description on msdn:
http://msdn.microsoft.com/library/devprods/vs6/visualc/vccore/c1010.htm
It doesn't help me any, got and ideas?
|
|
|
|
|
#include <stdafx.h>
or
Project -> Settings -> C/C++ tab -> Category "Precompiled Headers" -> Select "Not using precompiled headers"
---
Multitasking: Screwing up several things at once.
|
|
|
|
|
Although it probably works as shown the stdafx.h should go in quotation marks.
|
|
|
|
|
If you use quotation marks you should lose the less than/greater than signs.
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
Hi everyone,
I have an explorer like app in which File with their icons are displayed
using the system Image List. This works fine, however, for certain
files I want to display some CUSTOM ICONS. I had this working under WIn98
(because it returns the entire system image list when creating it, so I just made a copy of that and added the custom ones to the end) however, under win2K i can't get it to work! Any ideas on how I can achieve this?
I'd prefer to NOT 're-register' these filetypes in the registry.
and going through every possible file on the system to 'populate' the list
seems a bit 'slow'
Thanks!
Stefan
|
|
|
|
|
Hi,,
I like to write a help file for my application,,
does anyone know how can i go about that?
Thanks
Ehsan Behboudi
|
|
|
|
|
For creating help file, you must create file by RTF format, it have some rules for design ...
Then, in vc++ is the execute program for compile the RTF file to help file ...
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
salam hadi
thanks for your reply
I didn't really understand, what is RTF format,,
is there any website that i can check it out and learn more about it..
Ehsan
Ehsan Behboudi
|
|
|
|
|
You can find tons of info on MSDN
MSDN Web:
http://msdn.microsoft.com/library/devprods/vs6/visualc/vccore/_core_help.3a_.context.2d.sensitive_help_overview.htm
MSDN CD:
mk:@MSITStore:F:\Program%20Files\Microsoft%20Visual%20Studio\MSDN\2001APR\1033\vccore.chm::/html/_core_help.3a_.context.2d.sensitive_help_overview.htm
Not sure if the CD link is the same on yours but the MS web site one will work.
-Ben
---------
On the topic of code with no error handling -- It's not poor coding, it's "optimistic"
|
|
|
|
|
How do I make the enter key stay in the rich edit and and not cause the ok button from being activated and dissmising the properties sheet.
|
|
|
|
|
I would be interested in programming a simple game. However, beyond the basics I wouldnt know where to start with Graphics. I can add bitmaps to a dialog for instance, maybe move them around from place to place, show/hide them, but don't know where you would start for anything more complicated like animation, or detecting the state of game objects. Im talking something like a tetris clone, or maybe something like theme park, so im not thinking openGL or anything flash like that.
Can anyone give me a few pointers of where i would start, or any resources - there seems surprisingly little out there.
Thanks in advance,
Chris
|
|
|
|
|
Even for 2D, you would be better served to use DirectX - it simply gives you more options and control over things that GDI hides from you. I'd recommend the book 'Tricks of the Windows Game Programming Gurus' by Andre LaMothe as a tour of all aspects of writing a game using DirectX, but in 2D.
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
Does anyone have any opinions on using the STL... Is there any reason not to use it? I seem to spend a lot of time implementing things like linked lists, but have recently started using the STL. A lot of people take the view that there is no point reinventing the wheel and making things harder for yourself. Although I do like to know exactly how my programs work, am I really just creating more work for myself.
Secondly, should I be able to get at the STL in a console app. Im thinking maybe I need to include some header files, which ones might they be?
Finally, whilst Im here can I also ask whats the difference between including things with < and >, and in speech marks...
thanks
ben
|
|
|
|
|
It's great. However, you might want to check out http://www.stlport.org since there are some bugs etc. in M$'s impementation.
|
|
|
|
|
I too have recently started using the STL. To use it in a console app you include the appropriate header file(s) (e.g. vector, map, string, etc.) using the angled brackets. The .h is not used when naming STL header files.
The difference between using angled brackets and quotation marks is easy. If an include file is in quotation marks the compiler reads it from the current directory. If it is in angled brackets the compiler searchs the include path for the file.
>>>-----> MikeO
|
|
|
|
|
One correction - when #include'ing a file in quotes, if the file isn't in the current directory, the preprocessor then searches the INCLUDE path.
--Mike--
http://home.inreach.com/mdunn/
#include "buffy_sig"
|
|
|
|
|
I think you're right on the money. It's great that you've taken the time to understand how a linked list is implimented, but now you should go on to use the STL. It is an awesome set of tools, the more I learn about it, the more I wish I had time to learn about it.
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
I recommend Hewlett Packard implementation, it is free and - that's my opinion - better then Ms implementation.
Use STL and save money. Just like when writing 3d applications, use fe.: OpenGL or DirectX.
|
|
|
|
|
Hi.
> Finally, whilst Im here can I also ask whats the difference between including things
> with < and >, and in speech marks...
Easy:
#include <stdio.h> searches stdio.h in the defined include directories while
#include "stdio.h" searches the file first in the current directory and then in the standard include dirs.
Thus, use <> for standard files or standard modules you use often and "" for your own files the current project.
Karl
Pseudocode is code to demonstrate a concept, not designed to be run.
Like certain Microsoft software.
|
|
|
|