|
Yes,I don't think it is a right control.
But what I mean is I want to do something when the user double click on the controlbar( include the area covered by the rebar), how should I do?(And I am sure the rebar needn't process this message).And it really work for right click message.
Thanks
Benben
|
|
|
|
|
<font style="color:green;">
CPoint p(GetMessagePos());
ScreenToClient(&p);
<font style="color:green;">
CRect rect;
GetClientRect(rect);
<font style="color:green;">
<font style="color:blue;">if </font>(rect.PtInRect(p)) {
<font style="color:green;">
<font style="color:green;">
Invalidate();
}
TOXCCT >>> GEII power
|
|
|
|
|
I just want to complete a app in ms excel style , it seems multi doc/multi view, and one can give me an opinion?
thks a lot
|
|
|
|
|
|
Use MDI, multiple views per document too. You might want to take a good look at Chris' excellent grid control (I've used it in similar applications), as it should help with most of the 'spreadsheet' style stuff.
Steve S
Developer for hire
|
|
|
|
|
thks a lot , what I want is just a excel-style app, not a grid edit app. it means there are one documnent have several (pages)view (like excel's worksheet), each page has it's seperate full content. how to organize it?
Multi-doc -> multi view
single-doc -> multi view
which one is better?
I prefer the first one . haha
|
|
|
|
|
HI.
Steps to add a BMP as a resource.
and how to load it.
if Picture COntrol is used then steps
plz
thanx
|
|
|
|
|
Go to resources tab
right click on topmost tree item 'resources' / choose insert... / choose bitmap and click 'import ...', choose bitmap you want to import.
When you want to place it into some dialog then: Insert Picture Control (2nd icon from left), double click the control (you can see black rectangle on dialog) to see its properties.
Change type to bitmap; change image to your imported bitmap's name as displayed in 'Resources\Bitmap'
Thats it ... now the black rectangle should change to your bitmap.
|
|
|
|
|
i did all step u said .. but ther is only a white squre appear.
nothing else
|
|
|
|
|
Is there only a white square also when you run the program ? Because sometimes white square shows only in dialog design. Else then that you should try to change BMP's colour bit depth in some graphic editor, that should solve problem.
|
|
|
|
|
hello, I wrote a player class and I also wrote a dvdplayer class that is supposed to inherit from player class(both are very simple, no GUI, just simulateion)
my question:
1. in dvdplayer what should I put as the type of disk tray and media reader, should I create a new class?
//dvdplayer.h
#ifndef DVDPLAYER_H
#define DVDPLAYER_H
#include "player.h"
#include <iostream.h>
#include "mystring.h"
#include "button.h"
#include "terminal.h"
class dvdplayer:public player
{
public:
dvdplayer(const char * info);
~dvdplayer();
virtual int play();
virtual int stop();
virtual int powerOn();
virtual int powerOff();
int videoConnect();
int audioConnect();
void insert();
void remove();
private:
terminal vedio_out;
terminal audio_out;
//disk_tray;
//media_reader;
};
#endif
2. Can somebody give me some suggestion on both player and dvdplayer class? I am a student who just start to learn C++, Thanks for your help!
//player.h
#ifndef PLAYER_H
#define PLAYER_H
#include "mystring.h"
#include "terminal.h"
#include "button.h"
class player
{
public:
Player(const char * info);
virtual ~player();
void getPlayerInfo();
//enum status {Playing, Paused, Stopped, Ejected, Open, Close, connected, disconnected);
void acConnect();
void setPlayerInfo();
//void acConnect();
void acDisconnect();
virtual int play() = 0;
virtual int stop() = 0;
virtual int powerOn() = 0;
virtual int powerOff() = 0;
protected:
button player;
button stop;
button power;
mystring PlayerInfo();
terminal AC;
};
#endif
_____________________________________
#include "player.h"
player::player(const char* info)
{
setPlayerInfo(info);
AC.setState(0); //set 0 to terminal ac denotes disconnect;
}
//constructor;
player::~player()
{
delete playerInfo;
delete polayer;
delete power;
delete stop;
delete AC;
}
//destructor;
void player::acConnect();
{
if(AC.getState == 0)
AC.setState(1);
else
cout<<"AC has already connected"<
|
|
|
|
|
Hi all,
I'm writing my first ISAPI Extension. I'm not very familiar with anything webby, but everything has been going 'OK' so far (I haven't had to pull my hair out for more than about a day at a time before figuring stuff out).
Anyways... in order to debug my ISAPI Extension I followed the instructions found under this heading:
Establishing Windows NT Security Privileges and Debugging an IIS 4.0 DLL
at this website:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsdebug/html/vxtskdebuggingwithiis40orlater.asp
Dodgy as all hell, but it worked, so I'm not complaining.
As I said, everything was going well. I'd browse to right URL, see a nice web page, click some buttons, get another webpage... all good... until I moved from VS.NET 2002 to VS.NET 2003.
Now... when I browse to where my extension is (and where it has always been), I don't even get into my DLL (not even to the constructor of my extension class). I get this error instead:
"First-chance exception at 0x77f966bc in Inetinfo.exe: 0xC0000139: Entry Point Not Found."
and the resulting web page tells me this:
"The specified procedure could not be found."
I'm not exactly sure where to start with this...
The only thing I can see that has changed is that when InetInfo.exe starts (when I run the debugger), it loads these:
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_filter.dll
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\msvcr71.dll
and I'm assuming it would have previously loaded them from
C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705
My box:
Windows XP Pro sp1
IIS 5.1
Visual Studio .NET (2002)
Visual Studio .NET 2003
IE 6 sp2
Mez is not pez.
|
|
|
|
|
Help please!!
I try to create drag and drop in CTreeCtrl.
But when I create DrugImage I have some trouble.
Here is my function OnBegindragTree1;
void CW3Dlg::OnBegindragTree1(NMHDR* pNMHDR, LRESULT* pResult)
{
LPNMTREEVIEW lpnmtv = (LPNMTREEVIEW)pNMHDR;
*pResult = 0; // allow drag
CImageList* piml = NULL; /* handle of image list */
POINT ptOffset;
RECT rcItem;
if ((piml = m_tree.CreateDragImage(lpnmtv->itemNew.hItem)) == NULL)
AfxMessageBox("123");
//return;
}
Why does not work CreateDragImage
announcement in class dialog CTreeCtrl m_tree;
|
|
|
|
|
How to give the page range customized print dialog for HTMLPage in Programmatically(Control DHTLED getting from Microsoft msdn).
kcoop
|
|
|
|
|
Hai friends
We are using DhtmlEd Sample which is getting from MSDN.com services.
i want to Insert jsp tag like <%@ language=JavaScript %>. How can i do this pls give the suggesition.
KCOOP
|
|
|
|
|
Can any one tell me how can I detect keyboard whenever it is unplugged?
Any hint !!!
|
|
|
|
|
Hardware changes cause the WM_DEVICECHANGE message to be sent - You might be notifed with that I guess...
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/devio/base/wm_devicechange.asp
|
|
|
|
|
Thanks for help. It works for Mouse but it doesn't work for Keyboard.
|
|
|
|
|
Still didnt find the answer..Can any one help me!!!
|
|
|
|
|
just like what EnableWindow() do to enable/disable a control. what's the function to switch between visable/hidden?
|
|
|
|
|
ShowWindow()
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I'm trying to read from a socket using this code:
while (e = recv (m_socServer, m_szBuff, sbuff, 0)) The code works fine the first time it's executed, but then hangs the next time it gets to it. Any insight into why this is happening would be appreciated. Thanks.
- Aaron
|
|
|
|
|
monrobot13 wrote:
The code works fine the first time it's executed, but then hangs the next time it gets to it. Any insight into why this is happening
Sounds like there is no data for it to receive. recv will hang if there is no data available.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
your socket is a blocking socket
and is waiting for data to arrive before that code will continue
if you want it to return if there is no data to return try using a non blocking socket
Bryce
---
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
|
|
|
|
|
You could check that the socket is readible firstly
BOOL IsSocketReadible(SOCKET socket, DWORD dwTimeout, BOOL& bReadible)
{
timeval timeout;
timeout.tv_sec = dwTimeout / 1000;
timeout.tv_usec = (dwTimeout % 1000) * 1000;
fd_set fds;
FD_ZERO(&fds);
FD_SET(socket, &fds);
int nStatus = select(0, &fds, NULL, NULL, &timeout);
if (nStatus == SOCKET_ERROR)
return FALSE;
else
{
bReadible = !(nStatus == 0);
return TRUE;
}
}
You specify a timeout for it to wait for data on the socket.
NOTE: Param 1 is ignored in windows sockets.
Ant.
|
|
|
|