|
Cédric Moonen wrote: I have a cold, so it's sticking to the keyboard
Be careful cedric;)
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
|
toxcct wrote: you lost it too
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
I have the following code in MFC but it says type cant be converted from Varitant to Class1
void VRMControl::SetVariant(VARIANT VariantParam)
{
Cls::Class1 *obj = (Cls::Class1) VariantParam;
}
Class1 is an user defined class; how can i convert this type and i need access the members of Class1 thro VariantParam. While calling im sending the object as Cls::Class1 type.
|
|
|
|
|
sivaprakashshanmugam wrote: void VRMControl::SetVariant(VARIANT VariantParam){Cls::Class1 *obj = (Cls::Class1) VariantParam;}
Cls::Class1 *obj = (Cls::Class1*)& VariantParam;
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
A VARIANT is a big struct, casting the VARIANT itself is meaningless (even if you fix the cast/assignment to obj ). You need to know which field of the VARIANT the caller set and read that field.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
HiAll,
Can anyone tell me how to remove the "Create Shortcut" context menu from a particular Desktop icon?
Thanks and Regards,
Anil
|
|
|
|
|
|
how to get user name from kerberos ticket obtained from server using SSPI API
|
|
|
|
|
i would like to find a free source code in c# language for detecting hidden messages of EZstego algorithm
|
|
|
|
|
nailahazem wrote: i would like to find a free source code in c# language for detecting hidden messages of EZstego algorithm
For C# go HERE[^], any way whydon't you try googling on same subject!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
|
How can i load bitmap in InitInstance() function?i am trying to create a window that looks like a bit map useing setwindorrgn() but in InitInsatnce function LoadImage,LoadBitmap are not working?give me some suggestions to do this
BOOL CFlyWndApp::InitInstance()
{
CMainFrame* pFrame = new CMainFrame;
m_pMainWnd = pFrame;
pFrame->LoadFrame(IDR_MAINFRAME,
WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL,
NULL);
HBITMAP hBmp=(HBITMAP)LoadImage(m_hInstance,"BFLY1.bmp",IMAGE_BITMAP,0,0,LR_DEFAULTSIZE|LR_LOADFROMFILE|LR_CREATEDIBSECTION);
if(hBmp==NULL)
return TRUE;
/*here bitmap is not loading*/
CBitmap bmp;
bmp.Attach(hBmp);
BITMAP bm;
bmp.GetBitmap(&bm);
int bh=bm.bmHeight;
int bw=bm.bmWidth;
CDC dcMem;
CRgn rgnA;CBrush br;
br.CreatePatternBrush(&bmp);
rgnA.CreateRectRgn(0,0,bh,bw);
dcMem.FillRgn(&rgnA,&br);
pFrame->SetWindowRgn(rgnA,TRUE);
pFrame->ShowWindow(SW_SHOW);
pFrame->UpdateWindow();
return TRUE;
}
E-Ramu
|
|
|
|
|
Ramu.e wrote: CDC dcMem;
CRgn rgnA;CBrush br;
br.CreatePatternBrush(&bmp);
rgnA.CreateRectRgn(0,0,bh,bw);
dcMem.FillRgn(&rgnA,&br);
Where are you creating the DC , i.e. dcMem ? Doesn't it ASSERT ?
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
i've used ASSERT for CDC.but the problem is araising in the LoadImage function.hBmp is becoming NULL.
E-Ramu
|
|
|
|
|
I guess that's because your m_hInstance parameter is NULL . This could be because the current application instance has not been created.
Unless and until InitInstance returns successfully I don't think the instance handle will be created.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
Ramu wrote: How can i load bitmap in InitInstance() function?i am trying to create a window that looks like a bit map useing setwindorrgn() but in InitInsatnce function LoadImage,LoadBitmap are not working?give me some suggestions to do this
If your application is dialog based
Write your code in OnDraw or initdialog of dialog instead of Initinstance() of application
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Hi,
I want to enter the values in registry, but i am running application with other user, so I have not the admin rights. How can I get admin rights or enter/ change regisrty values while running application with other user.
Thanks
Regards.
|
|
|
|
|
|
but u have to know user's(who has admin priviledge) name and password to use LogOnUser
never say die
-- modified at 8:00 Tuesday 23rd May, 2006
|
|
|
|
|
sunit5 wrote: but u have to know user's(who has admin priviledge) name and password to use LogOnUser
but poster is looking for Api to achieve same, it will his task to provide Admin password to achieve same!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
When I do not now the user name and password then would it work , I think not?
SO how can I do my task if not know the user and password of admin,
Regards.
|
|
|
|
|
zahid_ash wrote: SO how can I do my task if not know the user and password of admin,
Then Make Window Service!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
zahid_ash wrote:
SO how can I do my task if not know the user and password of admin,
Imagine if this were possible. It would render passwords useless. Not to mention the whole security system (since anyone could log in as admin and change whatever ACLs/settings that they didn't like)
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
Hi, I'm writing a visual C++ application that allows a computer, running a full screen 'old' PC game, to be controlled by a remote computer.
I want to be able to blank the screen of the game machine but still control the game i.e. go into the settings screens, change player name and various other settings. Then un-blank the screen once back into the real game.
My problem is that to blank the screen I'm creating a full screen always on top window filled in black. But I still need to be able to send inputs, mouse clicks and keyboard, into the game screens. So how can I create the blanking window so that mouse clicks etc pass through it, to the game window underneath?
Thanks,
Antony
|
|
|
|