|
Hi,
I want to set my dialog window background with JPG image. I want to set that image to fit in the entire window size.
I tried to use an ACTIVE-X control( Microsoft Picture Clip control)
But I cannot draw that image.
Is there any other way to make it?
Or can anyone provide info. abt Microsoft Picture Clip control & its usage?
Thanks in advance....
vinsankar
|
|
|
|
|
See here
<br />
#include AtlImage.h<br />
m_Image.Load("c:\\nature\\1.jpg");<br />
<pre>
CRect Rect;
GetWindowRect(Rect);
ScreenToClient(Rect);
m_Image.BitBlt(pDC.m_hDC,Rect.left,Rect.top,Rect.right,Rect.bottom,0,0);
</pre> <br />
<br />
<div class="ForumSig"><font size="2" color="#99ff66"><hr></font><div style="padding: 2px; text-align: left; color: rgba(255, 255, 255, 1); width: 80px"><font size="2" color="#99ff66">WhiteSky<br />
</font></div><hr></div>
|
|
|
|
|
Hi,
thanks .....
But one more doubt...
how can I create this "m_Image" object ?
Whether I need to insert any ATL object?
help me.....
vinsankar
|
|
|
|
|
Did you see MSDN
From the MSDN
"You can use CImage from either MFC or ATL.
Note When you create a project using CImage, you must define CString before you include atlimage.h. If your project uses ATL without MFC, include atlstr.h before you include atlimage.h. If your project uses MFC (or if it is an ATL project with MFC support), include afxstr.h before you include atlimage.h.
Likewise, you must include atlimage.h before you include atlimpl.cpp. To accomplish this easily, include atlimage.h in your stdafx.h."
|
|
|
|
|
Dear all,
I have created a window with three button control and 3 static text control in a win32 application.
Now I need to display the tooltips when i place the mouse over this button...So how to display the tooltips in win32 appication...
thanking you...
Manjunath S
GESL
Bangalore
|
|
|
|
|
You'll need to respond to the TTN_NEEDTEXT (or TTN_GETDISPINFO ) notification.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
See TTM_ADDTOOL and seethis[^] and OnButton() maybe it is some helpful to you
|
|
|
|
|
Formerly, in the tc environment, i used the inport/outport functions to acheive my goal.But now, when i move to the vc++ 6.0 environment, how can i read/write a word from/to a physical address?
Please help me!
|
|
|
|
|
zhoufanking wrote: how can i read/write a word from/to a physical address?
Are you sure that the HAL will allow you to do this? What is it that you are trying to accomplish? Have you looked into _inp() and _outp() ? There's also the WinIO library.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi:
Thank you for your help! In my program i need to read/write data from/to a digital I/O, so i need this function.
|
|
|
|
|
Under Windows NT/2000/XP/2003, user applications are not allowed to access I/O ports directly. I/O ports are allowed to be accessed only by device drivers.
If you have purchased a piece of hardware that you wish to control, then you need to contact the manufacturer for a driver and interface software for it.
If you are building custom hardware, then you will need to write a device driver using the Windows Driver Kit[^] or WDK, formerly called the DDK.
Software Zen: delete this;
|
|
|
|
|
you should use driver and call its functions .
|
|
|
|
|
Hi ,
I want to write a VPN client in C++. I am wondering if someone can tell me what is involved in this or maybe point me at some whitepaper on how to do this. I know that VPN servers work on several protocals ie. L2PP, IPSEC, PPP etc. but I am not sure how to connect to a server using these protocal or what is required in terms of sending and recieving.(ie, handshaking) in VC++.
I have looked at the web and couldn't really find an open source Windows VPN program to study.
Thanks in Advance
S
|
|
|
|
|
_mss wrote: I am wondering if someone can tell me what is involved in this or maybe point me at some whitepaper on how to do this.
There are several RFCs available, each covering a specific topic.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Dear Sir;
I am using Visual c++ 6.0 with sql server 2000 as database.
I have one view on wich there are 3 buttons : Update button, clear and search button.
One time, when I search some thing, i can change other fields of my screen and I click on Update button to update my database . But there is some thing strange.
even if I update my database, when I search for second time the same record, I don't see those modifications but when I open manually the database I see that the record is changed. Then where comes that from the program it show me the first record(without changes) ?.
What to do?
|
|
|
|
|
hi i want to make tha packet filtering application using packet filtering api's
i m using code below
if(::PfCreateInterface(0,PF_ACTION_DROP,PF_ACTION_FORWARD,false,true,&ihandle)==NO_ERROR)
{
AfxMessageBox("Step 1 Done");
if(::PfAddGlobalFilterToInterface(ihandle,GF_FRAGMENTS)==NO_ERROR)
{
AfxMessageBox("Step 2 done");
if(::PfAddGlobalFilterToInterface(ihandle,GF_STRONGHOST)==NO_ERROR)
{
AfxMessageBox("Step 2 done");
if(::PfAddGlobalFilterToInterface(ihandle,GF_FRAGCACHE)==NO_ERROR)
{
int i[]={202,165,250,50};
AfxMessageBox("Step 2 done");
PBYTE ip=(PBYTE)i;
if(::PfBindInterfaceToIPAddress(ihandle,PF_IPV4,ip)==NO_ERROR)//here it fails all other works fine i dont know what the problem is.
{
AfxMessageBox("IP Adress Binded");
}
}
}
}
}}
thanks in advance.
Tasleem Arif
|
|
|
|
|
Hi,
Hi i designed a seperate soft keyboard in my application with the same layout of system keyboard using Bitmap.If i press F1 in that soft keyboard it will gives same functionality of system F1.So, to mapping this keys,i use WM_SYSKEYDOWN..etc..
My problem is ...In my soft keyboard..alphapet and number keys are not working.I will gie the code here
CView *curView = (CView*)fChWnd->GetActiveView ();
switch (keyvalue)
{
case 56 :
curView->PostMessage(WM_KEYDOWN,54,0);
break;
case 57 :
if (curView)
curView->PostMessage(WM_KEYDOWN,55,0);
break;
case 58 :
if (curView)
curView->PostMessage(WM_KEYDOWN,56,0); break;
This is my code snippet..where keyvalue is number of total keys in my soft keyboard.
I think iam using correct command..But when i entering 1,2,3..in my soft keyboard,it won't enter in my dialog.
Please help me..
Iam getting the active window by using GetActiveView() function.
Anu
|
|
|
|
|
did u try mapping WM_KEYDOWN?
nave
|
|
|
|
|
curView->PostMessage(WM_KEYDOWN,54,0);
This is my code,im using WM_KEYDOWN only.But its not working.
Anu
|
|
|
|
|
try this
curView->PostMessage( WM_CHAR,54,0);
nave
|
|
|
|
|
I tried but its now working.
I used this combination..
curView->SendMessage (WM_KEYDOWN,VK_SHIFT,0);
curView->SendMessage (WM_KEYUP,49,0);
curView->SendMessage(WM_KEYUP,VK_SHIFT,0);
Then..
curView->SendMessage(WM_CHAR,49,0);
then..
curView->PostMessage (WM_KEYDOWN,49,0);
then..
curView->SendMessage (WM_KEYDOWN,49,0);
then..
curView->SendMessage(WM_CHAR,49,0);
But nothing is working...Pls help me
Anu
|
|
|
|
|
what the curView actullay. Hope its CEditView. right?
Go to the View class and overide the WM_CHAR , WM_KEYDOWN messages And chek if any of the message u send arrives here.
nave
|
|
|
|
|
CMDIFrameWnd *fWnd = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
CMDIChildWnd *fChWnd = (CMDIChildWnd*)fWnd->GetActiveFrame ();
CView *curView = (CView*)fChWnd->GetActiveView ();
I am getting currently active window in curView.In my appliction,i have to enter value int to dialog edit box by pressing numbers in soft keyboards(that i made in application)
Anu
|
|
|
|
|
that's wasn't my question...
If the currently active view is not a type of CEditView, there will not be any effect sending the WM_CHAR messages. If the view if of type CVew or CFormView etc nothing happens, when u send a message or even dirctly press a key from the actuall keyboard . So first make sure the active view is of type CEditView.
nave
|
|
|
|
|
Have you tried using WM_CHAR, instead of WM_KEYDOWN? The keycodes will be different, however. Or you could use SendInput, but I think you'd have to send a WM_KEYDOWN, WM_KEYUP combo.
- S
50 cups of coffee and you know it's on!
|
|
|
|