|
I've checked it already and it seems to not work, I'm afraid...
thanks
|
|
|
|
|
use this in ur mainframe.cpp file, this is not a member function
long FAR PASCAL NewMDIClientProc(HWND hWnd,WORD wMesg,WORD wParam,LONG lParam)
{
switch (wMesg)
{
case WM_SIZE:
{
}
case WM_PAINT:
{
}
}
}
|
|
|
|
|
I used the SetCursor() function to change the cursor when the mouse pointer is on a button or on a notified picture,that I've been told, but there's something I'm doing wrong. Can anyone send me an example on how to do it???...Please in Win32 application..
|
|
|
|
|
BOOL CISSimpleViewerDlg::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
if (pWnd==(CWnd *)this)
{
if (nHitTest==HTCLIENT)
{
if ((message==WM_MOUSEMOVE) || (message==WM_LBUTTONDOWN) || (message==WM_LBUTTONUP))
{
if (m_bNeedGrabber)
{
if (m_hDIB!=NULL)
{
if (m_bMouseInImage)
{
if (m_bBtnDown)
{
SetCursor(AfxGetApp()->LoadCursor(IDC_CLOSEDHAND));
}
else
{
SetCursor(AfxGetApp()->LoadCursor(IDC_OPENHAND));
}
return TRUE;
}
}
}
}
}
}
return CDialog::OnSetCursor(pWnd, nHitTest, message);
}
A conclusion is simply the place where someone got tired of thinking.
|
|
|
|
|
Thank you for sending me that example, but i wanna do that in a Win32 application too... Could you please send another one in Win32???
|
|
|
|
|
sorry - i don't do Win32.
-c
A conclusion is simply the place where someone got tired of thinking.
|
|
|
|
|
|
I have been trying to do that for a while now too and I just figured it out, almost...I subclassed the windows/buttons where I want the cursor to be a different image and I process the WM_MOUSEMOVE message setting the cursor like so:
WM_MOUSEMOVE:
SetCursor(hCursor);
The only problem with this is that when I click on the button it changes into the arrow for a fraction of a second then back to a hand...that's the best I can do for now. If you do find something better than this (Win32 of course) please let me know I am also very curious...Email georgiek50@yahoo.com.
|
|
|
|
|
Anonymous wrote:
WM_MOUSEMOVE:
SetCursor(hCursor);
The only problem with this is that when I click on the button it changes into the arrow for a fraction of a second then back to a hand...that's the best I can do for now.
Call SetCursor(hCursor) in the WM_SETCUROSR message instead and that will alleviate this problem. WM_SETCURSOR gets called before every single mousemessage, whether it is mouse move, button click or whatever.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Chris Losinger wrote:
i don't do Win32
Are you fixed on MFC? Are you gonna be that rest of your life?
You scare me! Don't do that....
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++!
|
|
|
|
|
In your message window proc:
case WM_SETCURSOR:
{
if (HTCLIENT == lParam)
{
::SetCursor(hCursor);
return TRUE;
}
}
This code will set the cursor when the cursor is in the client area of your window. It will still turn into the sizing arrows if your window contains the WS_THICKFRAME style for resizing. By returning true after you set the cursor, it prevents the default handler from setting the cursor to the arrow. If you would like to change any of the cursor for some other portion of the window, not just the client, you can see a list of HitTest codes in the WM_NCHITTEST message.
Good Luck
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
I've been working on a game using bitmap files, and now I'd like to change it to a smaller format in order to save a lot of disk space. Gif's and such won't do as it needs to be 16/24-bit images.
So I was thinking PCX. Now I just need to make a file loader. Problem is - I don't know anything about the PCX format. So, could anyone refer me to some reading material or source code?
Is there any other graphics format that would be better?
Isaac Sasson,
Small time programmer - complainer at large!
Sonork ID 100.13704
|
|
|
|
|
PCX is a nightmare. don't bother.
BMP has a 16-bit flavor and you can find the specs in MSDN.
-c
A conclusion is simply the place where someone got tired of thinking.
|
|
|
|
|
Hi,
Wonder anyone can answer my Question. I need to create a directory with many sub-directories using c commands. Which command to use and if possible where to find to source code. THKS.....
|
|
|
|
|
CreateDirectory - Win32
mkdir (or maybe it's _mkdir) - Standard "C"
Take a look in the MSDN.
Chris Richardson
Programmers find all sorts of ingenious ways to screw ourselves over. - Tim Smith
|
|
|
|
|
Hi,
Thks for the tip...
Thks and regards.
|
|
|
|
|
MakeSureDirectoryPathExists() - Win32 only, but this is recursive
Dave
|
|
|
|
|
There is no API that works on all OSes, however SHCreateDirectoryEx() works on Me and 2K+ if that restriction is acceptable to you.
--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 have created a service that interactes with desktop
only then when i select a service in a service window and right click on it and after clicking the properties i select the logon tab.
after that i have to click check box that contain following text?
---------------------------------------
allow service to interacts with desktop
---------------------------------------
is there any way to do it in my program i am having exe of service and source code in csharp it solution does not exist in dot net but its solution is here in vc++?
r00d0034@yahoo.com
|
|
|
|
|
Haven't I answered you already. From what I remember I have given the symbol to use and the WIN32 API method to call. You haven't followed my answer by an acknowledgement of whether it did anything good for you. Which is already a BAD thing, let aside you didn't even thank.
Now this renewed post looks like an insult to me.
Back to real work : D-17.
|
|
|
|
|
first of let me say that
i am very sorry for that.
a bundle of thanks for your previous help .
yes you told me the win32 api i know that.
[DllImport("advapi32.dll", CharSet=CharSet.Auto)]
public extern static IntPtr CreateService(IntPtr databaseHandle, string serviceName, string displayName, int access, int serviceType, int startType, int errorControl, string binaryPath, string loadOrderGroup, IntPtr pTagId, string dependencies, string servicesStartName, string password);
MY service has been created in csharp may i have to
re-create it in vc++ to do this ?
or it is possible with the existing service?
i am very much confused about this win32 api?
there are a number of perameters although i study the msdn?
but i am confused where i have to call it in my code existing code or i have to creat it again in vc++?
r00d0034@yahoo.com
|
|
|
|
|
Hi,
I've to make an application that allows the user to write his own script(VB Script) and the application has execute that script does anybody has an idea of how to go about it. any ideas would be greatly appreciated.
Thanks & Regds,
Vijay.
|
|
|
|
|
Does it have to be vbscript ? Python provides an excellent interface for allowing users to enter their own script and running it within the app.
Does the script interact with the app, or just run on the machine ?
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
|
|
|
|
|
Hi,
thanks for your reply. it can be any script. only thing is it should interact with the application.
|
|
|
|
|
i am having string's like following examples in a loop
-------------------
@123456
@65465498
@-65465498
123456k
65465498 k
-65465498 l
how are u
nice dear
--------------------
these are the strings that i want to convert them into integer value but they also contain characters and speces and sentances. how to convert valied strings into int?
can any body tell the good check so that ?
is there any way to neglect character in a string?
r00d0034@yahoo.com
|
|
|
|