|
I am running a Dialog app that creates a ProperySheet .
1)The sizes and positioning in one screen resolution seems totally ugly in the other . How do i make all positioning independent of the Windows screen settings ! Please help
2) I want my PropertySheet window never to be closed ! How to do this ?
3) I want to disable one of the tabs of my PropertySheet at runtime ! How do I do this ?
act_x
I have lost the race of finding a Software job in the US ! I am outta here!
|
|
|
|
|
hi,
1) use GetSystemMetrics to get the screen resolution without depending on which resolution you are in, then set the size to be a ratio from the screen width and height
2) override OnApply and just return
3) override OnSetActive for the property page u want to disable...
hope i helped ya
Yaron
|
|
|
|
|
Interesting.
Post the code the sends messages from the worker thread to the main thread.
Kuphryn
|
|
|
|
|
What i have now is an MFC application,that doesn't use
Document/View,and will render Full-Screen using D3D9 without any problems(Flickering etc).
When i try the same in an standard SDI application that does use the Doc/View,(View being where D3D is set up)the device fails.
If there are any members here(more experienced on the MFC side of things) that is willing to have a go,and work with me to get this working,please let me know,and i can e-mail you the code i have now.
I think this would be a very useful piece of code(or tutorial)especially for certain game programmers wanting to take advantage of some of the features of MFC,such as serialization or want to program games(Full-Screen)using MFC.
using the major search engines,i haven't found any information/examples on the net discussing or showing the setup or how to get the latest version(or even v8.0/8.1) of D3D running (Fullscreen) with a SDI MFC application.
If i get some interest/help with this,i may contribute to the site on some more advanced DX game programming subjects,for MFC,that can be built upon/extended from this base framework i am trying to build now.
Appreciate your help/answers.
|
|
|
|
|
There are any number of DirectX / MFC integration samples around. Google for 'DirectX' 'MFC' or look thru http://www.flipcode.com/ or http://www.gdmag.com/homepage.htm
They are all quite naive but they work. If you want to go beyond them you need to override CWinApp::Run() in your application and using a HighPerformance timer to trigger rendering threads attached to all you 3d views (at your desired frame rate).
Now that they have changed the architecture again in dx9. You would have to use the IDirect3DDevice9::CreateAdditionalSwapChain to create additional back buffers for each view etc etc
The basic issue for SDI / Fullscreen swapping is that you will need to destroy and recreate the device when changing between them.
|
|
|
|
|
Would it be possible for you to give me the url to one of these full-screen examples using Doc/View?
I did find some (google)that are not full-screen(i already have it full-screen,but not using the doc/view setup).
I could only find a message on the forum at www.flipcode.com where there was another guy,having the same problems as i'm having,in Full-screen mode.
There was no replies to his post though.
I don't need a 4-view(or multiple views)i already have an editor built in MFC(4-View)which runs in windowed mode.
I only need an example/help with getting a SDI application,with Document/View architecture,to run in Fullscreen mode with D3D.
Thanks for your help.
|
|
|
|
|
Hello.
I am having trouble using a template function with a return type of an enum as a friend of a non-templayte class. When I use the code sample (below), I get:
"error C2440: 'initializing' : cannot convert from 'void' to 'enum ENS' Expressions of type void cannot be converted to other types"
I am using Microsoft Visual C++ 6.0 Professional Edition. If anyone can shed some light on this, I would really appreciate it.
//=============================================
enum ENS {
ENS1,
ENS2,
ENS3
};
class A;
template <class T>
ENS f(T, A *a) {
a->x;
return(ENS1);
}
class A {
private:
int x;
template <class T>
friend ENS f(T, A *a);
};
//=============================================
int main(int argc, char* argv[]) {
A a;
int i = 4;
ENS e = f<int>(i, &a); //this line generates
// the c2440 error
return(0);
}
|
|
|
|
|
|
Perhaps that's all I needed, but it is kind of weird, though.
Thank you
--Ziro--
|
|
|
|
|
Hi,
I have a worker threader that sends a window message to a dialog to display the threads progress. This approach works well until the users gives focus to another application. At which point I get an access violation within the Dialogs call to UpdateData().
Can anyone offer any advice? Or does anyone know how I can detect when my MFC app loses focus, so I can at least guard against this situation happening
Cheers
Richard
|
|
|
|
|
hello
i need to know how could i know how many harddisk drive installed and how many partitions and there names using vc 6.0
thanks
|
|
|
|
|
Not sure about getting the # of physical drives, but you can get the drive letters with GetLogicalDriveStrings() , then call GetVolumeInformation() to get the volume names.
--Mike--
Ericahist | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber
"That probably would've sounded more commanding if I wasn't wearing my yummy sushi pajamas."
-- Buffy
|
|
|
|
|
TCHAR drive[] = "a:\\";
int NoDrives =0;
for (int i= 'A';i<'Z';i++)
{
drive[0] = i;
UINT type= GetDriveType (drive);
if (type !=DRIVE_NO_ROOT_DIR )
{
SHFILEINFO fi;
SHGetFileInfo (drive,0,&fi,sizeof
(fi),SHGFI_TYPENAME|SHGFI_DISPLAYNAME|SHGFI_SMALLICON|SHGFI_ICON );
// fi.szDisplayName; Partition or drive name
// fi.TypeName Type name
// fi.hIcon Index of the icon of the drive in the system
NoDrives ++;
);
};
This should work .
|
|
|
|
|
|
I'm implementing a window in which some parts are valid drop-targets and some arent.
I've read that if I return DROPEFFECT_NONE in OnDragEnter() I won't get any calls to OnDragOver(), so I always send back DROPEFFECT_COPY.
In OnDragOver() i perform my minute-logic and return any of the drop effects, including DROPEFFECT_NONE for which I expect a 'do not do this' icon to appear next to the mouse icon.
This doesn't happen to my regret, whenever I return DROPEFFECT_NONE windows treats it as if I didn't return anything, it keeps the previous cursor.
What am I doing wrong ?
Thank you very much
|
|
|
|
|
Hi.
I am trying to find a truly free network spy program. By this I want to be able to see all traffic on the internal network and also filter by addresses etc. The reason I want to do this is we have this old machine run on OS2 and I would like to replace it but need to learn the messages it is sending etc.
Appreciat eany help.
|
|
|
|
|
|
|
I have tryed to build a static library which includes a method to show a dialog (defined in a ressource file) The linker warning I get is:
GLAP.res : warning LNK4221: no public symbols found; archive member will be inaccessible
Guess that's why the dialog never shows up when I use the generated lib in in a project.
Does anybody know what's the problem?
Is it possible to build static libs with ressources like dialogs at all?
Thanks! Constantin
|
|
|
|
|
You can only have one resource block in an executable. The linker doesn't know how to link two compiled resources (.res files) together.
The way I've done it in the past is to include the library's resource file in the application's resource file. See how afxres.rc is included by the MFC wizard (View > Resource Includes in VC6).
|
|
|
|
|
Seems as if that's the only way. Thanks!
|
|
|
|
|
hello everyone
i have a project i have been trying to do mainly for myself .. well i posted a few days ago about buttons well i got that to work in a way
hmm lets see ok i have a dialog made with 9 buttons on it ok well i have also created 9 other dialogs well what i am trying to do is when i click on a button i want it to load up one of the other dialogs i made well with them other dialogs they have anywere from 10-25 buttons on them and when i click on one of them buttons i want it to bring up a web page if possable
if anyone knows of a few good tutorials on this or anything that would be great
....i dont start collage for programing till next year if everything goes ok so i am mailny learning how to use VC++ from this web page .. and it has been a great help.... thats the reason for these newbie questions hehe ..
thanks
"Effort within the mind further limits the mind, because effort implies struggle towards a goal and when you have a goal, a purpose, an end in view, you have placed a limit on the mind"
|
|
|
|
|
Is there an easy way to read a file line-by-line, not using MFC? I looked at fread, ReadFile, and ofstream, but I couldn't find a "ReadLine" function in any of them.
Thanks!
|
|
|
|
|
Take a look at ifstream::getline and string::getline .
- Mike
|
|
|
|
|