|
Hi
I have recently had a problem with my application which uses direct x. On the latest detinator drivers when I create my window it dosn't display.. All I get is a small icon on the bottom of the task bar (almost like a window button but it only displays the icon)..
if I use the older nvidia drivers (40.42) it works fine..
can anybody point me in the right direction with a forum to go to or some documentation to read.
I am still using the DX7 api..
Many Thanks
Chris Leathley
|
|
|
|
|
Have you verified that the window exists, and called ShowWindow(SW_SHOW) on it ? Checked the return from ::IsWindowVisible or GetWindowPos ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
Yes.. the window is valid. (I checked showwindow() and it is all ok).. I can can hear the window working (it makes noise when i press a key) and the pause dialog is displaying ok so its processing message..
Its just not rendering.. It only does it on the latest detinator drivers.. 100% ok on all the older ones..
|
|
|
|
|
and the GetWindowPos value was ? I'm thinking you may have an offscreen window, or a 1 pixel one.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
I used GetWindowRect and it all looks ok..
I changed the output render size to smaller than the desktop and i can see the window in the right place but DX is not drawing anything..
I checked the DX init and all the surfaces are being created (its all error trapped anyway)
I need to find out whats going on, or there are going to be 16000 not happy people looking at me (the program is Visual Pinball if you have heard of it..)
Chris
|
|
|
|
|
If you run some of the Direct X demo stuff that comes with the SDK, does it display OK ? How much of your code can you comment out without it doing nothing at all ? I'd try other code first, then I'd try to turn off stuff to see if I could find which bit is breaking it. Then I'd blame the driver. :P
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
The problem is about Drivers, not about your code.
The DirectX run-time should only run certified display device drivers. But in practice, a lot of the drivers are not certified at all.
I have started a business 4 years ago with a DirectShow-based program, and I had so many such issues so I stopped everything.
DirectX is a joke.
Now I wish you good luck.
Back to real work : D-19.
|
|
|
|
|
I want a MDI child window to be resizeable not less than 200 not bigger than 500 pix for example, and only height.
When you size the window less than that 200 pix the application should make the window 200 height, when you size to 300 pix won´t do anything, and when it will be bigger than 500 size to 500.
I think it should be done on OnSize function but i dont know how.
Other option is let sizing window in this interval 200-500 and when reach it 200 or 500 stop sizing.
help would be appreciate, thanks.
|
|
|
|
|
you better handle WM_GETMINMAXINFO message.
|
|
|
|
|
And here's some example...
void <Some View or Dialog etc.>::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI)
{
// TODO: Add your message handler code here and/or call default
if (m_bInit) // Make sure the view is initiated
{
lpMMI->ptMinTrackSize.x = <min_horizontal_size>;
lpMMI->ptMinTrackSize.y = <min_vertical_size>;
}
<Base Class>::OnGetMinMaxInfo(lpMMI);
}
|
|
|
|
|
If you handle the message you should not call BaseClass::OnGetMinMaxInfo(lpMMI) right?
|
|
|
|
|
Thanks, I handle WM_GETMINMAXINFO in CChildFrame::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI){
// TODO: .....
lpMMI->ptMinTrackSize.x = 200;
lpMMI->ptMaxTrackSize.x = 500;
}
it works but now i have a problem , I size the window to the min pixel size I choose, all ok, but then I try to make the window bigger traking it the traking border of the window not appear. why this problem? I use XP.
|
|
|
|
|
Especially when I want to transport only part of a file. For example, in a VOD system, transfer only a special part of a movie. How?
Is there any similar example project?
Kindly help me. Thank you.
|
|
|
|
|
during creation of dialog, how can i store the hwnd in an array so i can later destroy them, and would it be better to PostMessage(WM_QUIT)?
Thanks in advance
shotgun
|
|
|
|
|
Assuming you're creating lots of dialogs, surely you have some handle on them generally, such as a variable ? That gives you the HWND. Storing them in a vector is not a bad way of going about it, just remember if you're storing pointers that you need to delete them yourself.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
Posting a WM_QUIT makes the thread's message loop end, which is probably not what you want. Modeless dialogs are properly destroyed with DestroyWindow() .
--Mike--
"alyson hannigan is so cute it's crazy" -- Googlism
Just released - 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
I converted an mfc dll project into an extension one, and I can't link as long as I keep DllMain. (Reason of conversion).
I need notifications of thread start and termination in the dll, which is why I converted it to an extension dll, letting me have my own dllmain. Or is it some other way to catch DLL_THREAD_DETACH in a regular mfc dll?
dump of output window:
Linking...
mfcs70d.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in Hugonet DebugMonitor.obj
mfcs70d.lib(dllmodul.obj) : warning LNK4006: _DllMain@12 already defined in Hugonet DebugMonitor.obj; second definition ignored
Creating library d:\x.lib and object D:\x.exp
D:\x.dll : fatal error LNK1169: one or more multiply defined symbols found
|
|
|
|
|
MFC extension DLLs do not have DllMain or a CWinApp object. You'll need to export a special initialization function, which the EXE using the DLL calls during its own startup (such as InitInstance() ).
If you make a dummy extension DLL project with the AppWizard, you'll see that I mean. There are comments in the wizard-generated code that explain it further.
--Mike--
"alyson hannigan is so cute it's crazy" -- Googlism
Just released - 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
You are wrong.
Create a dummy Extension dll, and you'll see what I mean
|
|
|
|
|
How can I add a chat interface client into my MFC dialog app, without using IRC (IRC is too unsecure)? The server should be no problem (has mySQL), but I need to know of a good IRC-alternative for a MFC app.
Thanks!
|
|
|
|
|
I don't know if I have understand you right but:
Learn Winsock!
Then build your own client/server chat program!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
I created a simple blank workspace app in VC++6.0 and calls int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow){
blah blah...} for my main program
I compiled a release but I want a different Icon for the final .exe, right now it just shows the default windows console looking thingy icon.
Any methods/code on changing this?
Thanks
Joe
|
|
|
|
|
when you are defining your class, at the point where you define the icon...you write something like this:
wndclass.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(MY_ICON_HERE));
that's all...
|
|
|
|
|
Well, I can't get that to work b/c I have new classes in this project. The program simply minimizes all current windows and opens the default webbrowser.
I wonder if I have imported my icon in VC++6 correctly b/c there still is no resources tab, when viewing the Workspace, it does compile though
|
|
|
|
|
I figured it out, I needed to add the Script1.rc file it created to my project Thanks!!
"I'd rather be a smart ass, than a dumb ass"
|
|
|
|