|
Hi,
I have a dialog implemented using the CPropertySheet. To this I add as two pages two diff dialogs. I want the whole thing to be colored diff(grey is boring)
To change the color of dialogs, I can override the WM_CTLCOLOR.
I tried the same with propertysheets, but it fails to change the color.
Any suggestions are most welcome.
Regards,
Deepti.
|
|
|
|
|
Hi,
I have a dialog in that i have a picture box,at some point of time i just want to display only the picture box.
I tried with SetForegroundWindow().But it didn't help me.
Regards
Neha
|
|
|
|
|
Are you running under W2K or XP? MS changed the behavior of SetForegroundWindow(). What you need to do is attach to the thread that has the foreground and switch from there. Check out
http://www.mooremvp.freeserve.co.uk/Win32/framed_tip033.htm
for a workaround.
D
|
|
|
|
|
I have a dialer that has to enumerate the ISDN modem on a computer. It works fine if i compare the szDeviceType with "isdn" on Win2k. But when I try to test it on win98 it shows the device as "modem" to my dialer even it is isdn. So how can i make sure tht the device is ISDN and not modem even windows is telling me its a modem. I know its not modem but ISDN but windows 98 thinks its modem and so shows 2 modems for both the channels.
how to verify a devide for being isdn or modem.
In my dream, I was dorwning my §orrow§
But my §orrow§, they learned to §wim
|
|
|
|
|
I want to create a wave file manually in my project (not by quicktime or anyother software) . If anyone can send me the resulting code i will be grateful.Wave file in VC++.
Hamza.
hamza
|
|
|
|
|
Hamza wrote:
If anyone can send me the resulting code i will be grateful.
No one answered you, maybe because you're asking WAY too much,
Have you been doing research, didn't you search for "wave file write", or "wave file format header" ?
Have you searched for samples, technologies, demos... ?
Help us help you by working on your side !
Max.
|
|
|
|
|
Hi,All
RecordCount Property giving me -1 value
Please read my code and give me where i am doing wrong;
and also please comment on my Code(if their any mistakes)
Thanks in Advance..
/////////////This is my code To Test the Function////////////////////
_RecordsetPtr pRst;
CString strTemp;
pRst.CreateInstance(__uuidof(Recordset));
pRst=GetData(1);
if(pRst!=NULL)
{
int nCount=(int)pRst->RecordCount;
strTemp.Format("%d",nCount);
AfxMessageBox(strTemp);
}
else
{
AfxMessageBox("Recordset null");
}
pRst.Close();
pRst.Release();
////////////////////////////////////
///////////////////This is my funtion which will return me Recordset object///////////
_RecordsetPtr GetData(int nType)
{
CString strType;
strType.Format("%d",nType);
try
{
//COM Library Initialization
if(FAILED(::CoInitialize(NULL)))
{
//Log error
return NULL;
}//if(FAILED(::CoInitialize(NULL))
//Open the Connection
m_hr=m_pConnection.CreateInstance(__uuidof(Connection));
if(FAILED(m_hr))
{
::CoUninitialize();
//Log error
return NULL;
}
m_strCnnString=GetConnectionString();//It will give me the Connection String
_bstr_t cnnString(m_strCnnString);
_bstr_t bstrEmpty("");
m_hr=m_pConnection->Open(cnnString,bstrEmpty,bstrEmpty,adConnectUnspecified);
if(FAILED(m_hr))
{
m_pConnection.Release();
::CoUninitialize();
//Log error
return NULL;
}
//Get the Command objet
m_hr=m_pCommand.CreateInstance(__uuidof(Command));
if(FAILED(m_hr))
{
m_pConnection->Close();
m_pConnection.Release();
::CoUninitialize();
//Log error
return NULL;
}
m_pCommand->ActiveConnection=m_pConnection;
m_pCommand->CommandText="Sp_GetData";
m_pCommand->CommandType=adCmdStoredProc;
//Append the Parameters to Command object
//Type Parameter
m_pParam=m_pCommand->CreateParameter(_bstr_t("Type"),adInteger,adParamInput,4,_variant_t(strType));
m_pCommand->Parameters->Append(m_pParam);
m_hr=m_pRecordSet.CreateInstance(__uuidof(Recordset));
if(FAILED(m_hr))
{
m_pConnection->Close();
m_pConnection.Release();
::CoUninitialize();
//Log error
return NULL;
}
//Execute the SP
m_pRecordSet->CursorType=adOpenStatic;
m_pRecordSet=m_pCommand->Execute(NULL,NULL,adCmdStoredProc);
return m_pRecordSet;
}//try block
catch(_com_error &comExcep)
{
//Handle the error
}
catch(CException * GenExcep)
{
//Handle the error
GenExcep->Delete();
}
//CleanUp the objects
if(m_pCommand!=NULL)
{
m_pCommand.Release();
}
if(m_pConnection!=NULL)
{
m_pConnection->Close();
m_pConnection.Release();
}
::CoUninitialize();
return NULL;
}
//////////////////This is my StoredProcedure /////////
CREATE PROCEDURE [dbo].[Sp_GetData]
(
@Type[int]
)
AS
Begin
SELECT
Data1,
Data2,
Data3
Data4,
Data5
FROM
tblTestData
WHERE
(Data1=@Type)
End
GO
////////////////////////////////
anju
|
|
|
|
|
from msdn:
Use the RecordCount property to find out how many records are in a Recordset object. The property returns -1 when ADO cannot determine the number of records or if the provider or cursor type does not support RecordCount. Reading the RecordCount property on a closed Recordset causes an error.
Basically, what you need to do is set the CursorLocation property of your recordset to adUseClient before opening it.
#include <beer.h>
|
|
|
|
|
|
hi,
I want to know what tech. does applications like MSN Messenger, Yahoo
Messenger, NetMeeting etc uses to enable voice conferencing over Internet.
What programming APIs are available to develop Voice conferencing over
internet
|
|
|
|
|
|
Please could someone help me (really desperate)???
I need to write an application with simulates the windows logon screeen.
I need to enter a username, password and domain. Then it needs to validate this info from a server (permissions, privileges, groups etc..).
Does anyone have any ideas or sample source code.
I would be eternally grateful if anyone could help me out with this prob.
Thankyou for your t
Richard
|
|
|
|
|
You need to write your own GINA dll. Do a search on msdn for the word "gina.dll" and you'll get enough results to get you started.
|
|
|
|
|
Thanks Steve.
I will look into it.
Hopefully this will start me in the right direction.
Cheers
|
|
|
|
|
Can anyone have an idea, how can I trap a SelectChange event in a combo box control that is a member of a class derived from CEdit. Here is my sample codes of the class definition.
class CEditBox : public CEdit
{
// Construction
public:
CEditBox();
// Attributes
public:
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CEditBox)
public:
virtual BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CEditBox();
protected:
CComboBox m_cComboUnit;
// Generated message map functions
protected:
//{{AFX_MSG(CEditBox)
afx_msg void OnSelChangeUnitX(NMHDR * pNotifyStruct, LRESULT * result);
//afx_msg void OnSelChangeUnitX();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
|
|
|
|
|
Sir,
In the mainframe in the title bar we have the MFC icon.Instead of that I want to load a bitmap.Can it be done.If so please help me do that.
Thanking you.
with regards,
Subhashree
Subhashree,
ProjectAssociate,
Structural Engg Lab,
IIT,Chennai-36
|
|
|
|
|
Click on the resources tab, and look at your icon resource. The 16x16 icon, IDR_MAINFRAME i think, is the icon you're talking about. Design a nice new one.
#include <beer.h>
|
|
|
|
|
create a new icon resource,and change the resource ID of the Icon in the Code (generated by the Wizarrd Already listed in your code)..ARE YOU SURE YOU WANT TO LOAD A BITMAP RATHER THAN THE ICON..????
Code the Dreams.
|
|
|
|
|
Reasonable Developer
i wanted to download the SDK of Microsoft Project, i try my best but fail(it give overview of MS Project 2002) pls help me. So nice of u
NOte
i have already test msdn but it was just an overview of sdk whereas i have to integrate the MS Project & therefore i need to download the complete sdk, now pls try for it & if u find any solution inform me
So nice of u OK
|
|
|
|
|
Abubakar Siddque wrote:
i try my best but fail
You haven't tried at all. I took the advice I gave you, went to msdn.microsoft.com and typed 'project sdk' into the search dialog, and this was the first link
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/pr2ksdk/html/Default.asp[^]
If you're not smart enough to work that out, maybe you should save your bandwidth......
<edit>Just want to apologise - the last sentence was uncalled for. I would encourage you to realise that just because an answer is not the one you wanted, it does not mean that it's the right thing to do to repeat the question over and over. Having said that, I apologise for being rude. I hope you managed to figure out how to use the Project 'SDK'</edit>
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
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
I assumed he'd already done this. I think he's looking for something that doesn't exist. I think he's expecting a platform sdk type download, where as the project sdk seems to be bits of the COM automation object and various scripty bits.
Michael
Life’s not a song.
Life isn’t bliss.
Life is just this.
It’s living. -- Buffy the Vampire Slayer: Once more, with feeling
|
|
|
|
|
Apparently - he's emailed me explaining as much. The Microsoft site does not contain the SDK, it contains something else, where can he get the SDK, etc.
His email heading was 'reality', and he finished with 'now please try and find it and send it to me'. Give me a break.
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
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
I think its time for someone to start work on the internet slap attack program, just plug in the IP then slap them silly
sorry, off topic but couldn't resist
|
|
|
|
|
I look forward to reading the article.
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
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Yeah, I've been looking for a way to connect the monitor's high voltage supply directly to the keyboard via script in an HTML page, but no luck yet.
Stay tuned...
Software Zen: delete this;
|
|
|
|