|
Thx for this.The code given in this is not for the application shown.I couldnt get weather this is a animated gif or png.If anybody can provide its code
Thx
|
|
|
|
|
CAN ANY BODY TELL ME THE BEST SITE WHERE I CAN GET BRAINDUMPS FOR VC++ EXAMS.IS THERE ANY EXAM FOR VC++.NET RIGHT NOW WHEN IS IT LAUNCHING
|
|
|
|
|
How about brainbench.com?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi all
I had a problem with MFC CSocket class.I use VisalStudio.Net
and corresponding MFC librarys from one.
My .exe application use an COM server which used this CSocket class.This pseudocode demonstrate what i try to do:
/////////////////Snippet from exe app////////////////
....
///pMySock is COM interface from my MySock.dll library
pMySock->Connect(...)
....
////////////////Snippet from MySock.dll library///////
class ATL_NO_VTABLE CMySock
{
....
CMySock::Connect(...)
{
if (m_sock.m_hSocket == INVALID_SOCKET)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
//Just try to create syncronous socket
//but failed here in Win98,see following
m_sock.Create()
....
}
}
CSocket m_sock;
}
Also in InitInstance method i invoke AfxInitSocket()
function and rather use MFC static linkage.
This code work fine in Win2000 system, but then i launch same application in Win98 m_sock.Create() failed.
And i can't catch why it happens.
Please any suggestions
THANK
|
|
|
|
|
This can be down to the following registry being corrupt
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Winsock2
See Related article[^]
It explains how to sort this out.
Hope this helps
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Hello,
I just started using VC++ and developing a simple udp server application which uses listbox to show the incoming messages.
I am having trouble finding out if :
1. a new thread should be spawned to receive messages by the udp server (the received messages are to be displayed in the listbox)
2. or a different class should be created for the server
3. or the main dialog class can contain a function to invoke receive by server.
4. will this application require postmessage and getmessage functions: i mean a simple recieved message can be updated in the listbox window or not?
Also, if I want the application to start accepting the udp messages without any starting event (such as 'press start button'), where should the server code begin?
Any help will be highly appreciated. Thanks in advance.
|
|
|
|
|
Given the HWND of a dialog, is it possible to determine if the dialog is modal or not?
Using MFC, I could get the dialog's parent and see if it was disabled or not (due to the way MFC implements modal dialogs), but that will fail if [1] there is no parent or [2] if someone broke the "modal chain" by popping up another modal dialog from another window lower in the hierarchy/Z-Order.
Does anyone know if there is a way to do this? Assume that I have no internal knowledge of the dialog other than having access to its HWND .
Peace!
-=- James
Tip for inexperienced drivers: "Professional Driver on Closed Course" does not mean "your Dumb Ass on a Public Road"! Articles -- Products: Delete FXP Files & Check Favorites
|
|
|
|
|
Hey James. I don't have an answer for you, but your question has got me thinking about it and frankly I'm stumped. If you ever do get a satisfactory answer could you possibly share it here, as an article perhaps?
An idea I had was using the CDialog::m_nFlags member and checking for the WF_MODALLOOP and WF_CONTINUEMODAL flags. But that is MFC only, and the flags did not seem to be consistant between modal and modeless dialogs.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|
|
Is there anybody out there still using Visual C++ 5.) ?
I am looking for a possibility to draw animated GIF in my application. On CP there are some examples, but they are all for VC6. I do have a CPicture class which can draw BMP, JPG and GIF, but when I try to import an animated GIF in my resources, developer studio says it is not a valid GIF file. When I open this file in an explorer window I see the animated picture.
Can anyone help?
|
|
|
|
|
is there anyway i can find out the height and width of the title bar? (i noticed the sizes changed from Windows Classic mode to Windows XP mode)
|
|
|
|
|
I think what you are wanting is GetSystemMetrics(SM_CYCAPTION) .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I used Shell_NotifyIcon to minimize the application to the nofitication area (system tray) and put an icon there. When the minimize button of the system menu is pressed, the dialog is minimized to the system tray. It was working perfectly until I tried to put an option in the title bar menu, which gave the possibility to choose whether or not to start the application as minimized. I save this information in a file, and read from the file on initialization.
The problem is that the application starts as minimized, but the main dialog can never be displayed when the Menu->Open is clicked from the tray menu. I guess it is restored to the previous position, and the previous position was "minimized".
Does anyone know how to overcome this problem?
Thanks in advance...
PS: my dialog is of fixed size.
CMyDialog::OnInitDialog()
{
...
if(startOnTray)
{
SetWindowPos(&this->wndNoTopMost,0,0,0,0,SWP_HIDEWINDOW);
this->Minimize2NotifArea();
}
else
SetWindowPos(&this->wndNoTopMost,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
return TRUE;
}
CMyDialog::OnMenuOpen()
{
Shell_NotifyIcon(...);
this->ShowWindow(SW_RESTORE);
}
|
|
|
|
|
I have not tried this recently, but IIRC, when Win32 first came out, the behavior of Minimized windows changed. Instead of a "real" state of being Minimized that did not affect your real X/Y position, they were moved off-screen to some really high X/Y location, and brought back when Restored. That behavior broke older applications that saved and restored their last position when they were closed down while minimized and then restarted.
When you restore your window, you should check its current position and make sure that you are being placed somewhere visible. You might have to reposition the dialog yourself. You can save your last position before being minimized and then restore yourself to that position.
You might be able to see if this is your problem by trying to restore your dialog from the menu, and then pressing <alt-space> to activate the dialog's System Menu. You can then select Move and try to use the arrow keys to being your window back into the visible screen. Be sure to use the KEYBOARD for this, not the mouse.
Peace!
-=- James
Tip for SUV winter driving survival: "Professional Driver on Closed Course" does not mean "your Dumb Ass on a Public Road"! Articles -- Products: Delete FXP Files & Check Favorites
|
|
|
|
|
Thanks..
From the system menu, I chose move and the keyboard moved the mouse cursor, the dialog did not come into visible area. Then when I clicked close from the system menu, the messages which pop up on closing popped up centering the latest mouse location.
I think now I will try repositioning myself.
|
|
|
|
|
You might have to "move" the dialog for a long time before it becomes visible.
Be sure to trace some information in your dialog class upon handling the Move messages so that you can get an idea of what is going on with your dialog.
Peace!
-=- James
Tip for inexperienced drivers: "Professional Driver on Closed Course" does not mean "your Dumb Ass on a Public Road"! Articles -- Products: Delete FXP Files & Check Favorites
|
|
|
|
|
Hi,
could someone help me ! I would like to create multiple windows (or pages) when creating my mainframe in my Windows MFC project. How do I do that ?
With regards
Jens Christiansen
|
|
|
|
|
If you're talking about creating multiple views of your document, you can always use the splitter control. Check out the MSDN documentation[^] that has a couple sample code on this.
I Dream of Absolute Zero
|
|
|
|
|
no, actually I would like to have multiple windows filling the hole frame, as if they were created by "New Window" or "New File" in my menu.
|
|
|
|
|
Call OnFileNew function multiple times !
VikramS
|
|
|
|
|
This is working, but then I don't go through my MainFrame which is controlling my toolbars and menu's. So would it be possible to create the windows (pages) and control then in the MainFrame ?
|
|
|
|
|
What you are referring to is a multiple-document interface (MDI). Examples are bountiful.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
yes, but I would like my application to work with exact lets say 4 windows (pages) and no option to create more.
|
|
|
|
|
The number of open documents can easily be controlled.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi,
I'm working on a project in which I need to load and install a USB device driver as part of my setup procedure. So I'm basically messing around trying to get this device installed manually, before I add it to the setup script.
I have a problem though... After my latest attempt, I get this error message in the device properties box:
"This device is not working properly because Windows cannot load the drivers required for this device. (Code 31)"
Does anyone know if there's a log somwhere or somthing which I can use to find out what exactly went wrong?
Joel Holdsworth
|
|
|
|
|
the file ist called setupapi.log and should be located in the windows directory.
Don't try it, just do it!
|
|
|
|