|
Hi,
I have problem adding a bitmap to the background of my SDI App.
I know how to add it in a dialog, but I have some problem adding it to a SDI App.
any ideas?
thanks
Everything's beautiful if you look at it long enough...
|
|
|
|
|
One solution is to repaint the background in OnDraw(). Another solution add a handler to WM_ERASEBKGND.
Kuphryn
|
|
|
|
|
If I embed a CPropertySheet derived class as a child in a Cformview window. The controls of the initial page are not shown.
You can only see a blank page page.
If I select another tab and swith back to the first page,
the page is shown correctly
Since it's the second time I encounter this same problem,
I think there is someone who might have a solution for this.
thanks in advance.
|
|
|
|
|
use create instead of DoModal
includeh10
|
|
|
|
|
I am creating a RFC-868 compliant time server. It must support TCP/IP and UDP on server port 37. TCP/IP works fine. Each protocol dependent server runs in a separate thread and both threads always get created and appear to run fine.
The problem is on the UDP thread side. I wait for a packet to be rcvd on port 37 then transmit the current time as a long back to the requesting IP or computer. Though, it looks like I am sending the packet, I cannot capture it with a sniffer. There are no errors using the sendto() command and I even sent a bogus string as a test and still cannot see it on the network.
I have verified the socket is created and valid. The only thing I can think of is that maybe there is a conflict when binding the same adapter and IP address using two different protocols, UDP and TCP/IP. Is anyone aware of one? I am currently binding to INADDR_ANY which is supposed to allow me to receive from all network interfaces but I only transmit back to the IP address and port that I received in the request. One of my sniffers is monitoring all network adapters and doesn't see the response that I am sending. Another sniffer a coworker has for Linux did not see it either even though that is a private 2 computer network (crossover cable).
Hope someone can help.
|
|
|
|
|
Update: Though, I am unable to see the reply on a sniffer, apparently it does send it since the device/computer requesting the time can see the reply.
BTW, does anyone know what the minimum packet size for UDP is? I have tried sending a UDP reply packet of 46 bytes -- 42 bytes of IP and UDP header and 4 bytes of data. Also, tried padding it to total 64 bytes but it doesn't seem to matter.
|
|
|
|
|
If I remember correctly, it is something like 400
|
|
|
|
|
Hi
Do you know where I can find the true colour 32bpp 24*24 bitmaps from Microsoft displayed as “Common Toolbar Icons” in this Microsoft page http://msdn.microsoft.com/library/?url=/library/en-us/dnwxp/html/winxpicons.asp?frame=true ? And are we allowed to use them without royalties?
Thank you very much in advance.
Best regards
Guy LECOMTE
|
|
|
|
|
I'm sure this is something real stupid but I am completely lost on getting this simple class (see below) to compile. The compiler returns a
'cout' : undeclared identifier
I'm using the <iostream> include rather than <iostream.h> (I'm using Visual 6.0)... doesn't the compiler by default add the Standard C++ library...so this should work? Actually, I tried it both ways; neither works???
Do I have to add libraries to the Proj/Settings/Link tab (Aren't these automatically added). I think my Directories are OK... Tools/Options/Directory tab... Include files: VC98/Include, VC98/MFC/Include
Library files: VC98/Lib, VC98/MFC/Lib
Source files: VC98/MFC/SRC, VC98/MFC/Include
// Client.cpp: implementation of the CClient class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "Client.h"
#include <iostream> //For cout; Use <iostream> instead of older <iostream.h>
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CClient::CClient()
: mName("xxx"),mGender('X'), mAge(0)
{
}
CClient::~CClient()
{
}
void CClient::Input()
{
char name[20];
cout << "\n Name : "; cin>>name;
mName = name;
cout << " Gender : "; cin >> mGender;
cout << " Age : "; cin >> mAge;
return;
}
void CClient::Display() const
{
CString s;
s.Format("%-10s %c %d", mName,mGender,mAge);
cout << s;
}
// Client.h: interface for the CClient class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_CLIENT_H__CF02BD78_2CA4_4624_A797_479355DA2103__INCLUDED_)
#define AFX_CLIENT_H__CF02BD78_2CA4_4624_A797_479355DA2103__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CClient
{
private:
CString mName;
char mGender;
int mAge;
public:
CClient();
virtual ~CClient();
void Input();
void Display() const;
};
#endif // !defined(AFX_CLIENT_H__CF02BD78_2CA4_4624_A797_479355DA2103__INCLUDED_)
|
|
|
|
|
Note for people looking at my post above; the #include statements were not transmitted correctly; apparently the forum software thinks "<" ">" are HTML tags.
I tried including "<"iostream">" rather than "<"iostream.h">" per MSDN literature for the newer Standard C++ libraries. Neither worked
Thanks for any help you can provide.
kyle01
|
|
|
|
|
Either use std::cout or type using namespace std; right after your #include's...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
|
|
Hello
I am a amature in programming with Borland c++ builder 5.
I wanted to make a dual player to play 2 songs simultaniusly.
That works.
The master volume controll does also work.
But the problem is i don´t have anny clue how to manipulate
the audio volume for the both songs seperately.
I can have 1 or to sound cards in the pc.
Actually i dont know wat to do because i also want to have a headphone
to prelisten each song i would like to play.
It is actually to create my own home PC discobar.
If annyone can give me a hint how and where to start or anny interesting links. Free to mail to koen.bielen@pandora.be
Greetings Koen
|
|
|
|
|
Hello!
I have a network connection which is unavailable (defined, but inaccessible) because this connection requires autentication. When I try to enter this connection, explorer asks me about a user and password. Anybody knows how to provide such functionality? Moreover GetLogicalDrives and GetLogicalDriveStrings do not return unautorised drives. I have managed to return it through shell interface, but I don't know how to force windows to display autorisation dialog.
Thanks for any suggestions
|
|
|
|
|
I'm pulling my hair out over this one!
I am trying to dynamically create an icon to display in the system tray. This icon acts like a mini-graph so I don't want to pre-create all possible icons.
I have a template icon resource that I want to use as a base. I have used GetIconInfo to retreive the icon's HBITMAP handles for the mask and color bitmaps. However, from here I don't know how I should get an appropriate DC to select the bitmap into.
Any suggestions?
Kelly Herald
Software Developer
MPC
|
|
|
|
|
Can you use the CreateIconIndirect API? It has a ICONINFO param which take HBITMAP as structur members. I think you can paint the bitmap and then create an icon form it.
The bitmap could be selected in a memory dc (use CreateCompatibleDC), then drawing can be done
|
|
|
|
|
I finally got it working. What I hadn't done was use the CreateCompatibleDC method.
Thank you.
Kelly Herald
Software Developer
MPC
|
|
|
|
|
I started with Microsoft's Development Environment 2002. I am trying to use an Extended combo box. I want to specify 'COMCTL32.LIB. is linked into my program. How do I do it. I can not find where I specify the library so it is linked into my program. What configuratio dialog, project setting dialog and how do I get to it.
Thanks,
SAK
|
|
|
|
|
Go to the project settings dialog and switch to the tab "Linker". There you will find an editbox with caption "Object-/Library-Modules" where you can enter "comctl32.lib".
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
Thank you ...I think I must have a bad install....I cant seem to find this dialog box with the 'linker' tab. I have tried menu option 'Build > configuration manager' and 'Project > Properties' and dont see no tab. Should I be looking somewhere else for this dialog?
|
|
|
|
|
Project --> Settings, or Alt+F7.
|
|
|
|
|
Got it...thank you Guys,
Help was most appreciated.
SAK
|
|
|
|
|
You could also type #pragma comment(lib, "COMCTL32.LIB"); somewhere in your code, then COMCTL32.LIB is included by the linker
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Anders,
Anders Molin wrote:
You could also type #pragma comment(lib, "COMCTL32.LIB");
Another good suggestion...Thank you
|
|
|
|