|
hello..
i want to display whatever user input in the edit box to hex with a click of a button.. i want to display the characters in ascii codes..
can someone teach me how to do it?
thankss
~wilD cat~
|
|
|
|
|
|
Who can help my for below this code it just can operate window 2000, Xp or above. Now my problem is how I can modify this code to operate on Window 98 because my PC is using Window98. OR you has any example like this.
if (nIDEvent == 1)
{
CBitmap m_bmp;
m_bmp.LoadBitmap(IDB_BITMAP1);
m_bitmap.SetBitmap(m_bmp);
KillTimer(2);
SetTimer(2, 500, 0);
}
else if (nIDEvent == 2)
{
CBitmap m_bmp;
m_bmp.LoadBitmap(IDB_BITMAP2);
m_bitmap.SetBitmap(m_bmp);
KillTimer(2);
SetTimer(1, 500, 0);
}
Thanks.
|
|
|
|
|
This code should work correctly on Windows 98. Is it working?
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"
|
|
|
|
|
When I run this code on window 98 I press button 1 it will not come out any bitmap pictuce but when I run on Windows Xp it will come out the bitmap picture. So I don't know where my problem.
|
|
|
|
|
I really don't know if this could be the problem but perhaps give it a try:
Best Friend wrote:
...
else if (nIDEvent == 2)
{
CBitmap m_bmp;
m_bmp.LoadBitmap(IDB_BITMAP2);
m_bitmap.SetBitmap(m_bmp);
KillTimer(2);
SetTimer(1, 500, 0);
}
I think it's better to make a KillTimer(1); before setting it again. Perhaps Win98 got a problem with this.
I don't know the structure of your application but for the timer1-branch I would also suggest to KillTimer(1); because you restart this timer in timer2-branch. So my solution would be:
if (nIDEvent == 1)
{
CBitmap m_bmp;
m_bmp.LoadBitmap(IDB_BITMAP1);
m_bitmap.SetBitmap(m_bmp);
KillTimer(1);
KillTimer(2);
SetTimer(2, 500, 0);
}
else if (nIDEvent == 2)
{
CBitmap m_bmp;
m_bmp.LoadBitmap(IDB_BITMAP2);
m_bitmap.SetBitmap(m_bmp);
KillTimer(2);
KillTimer(1);
SetTimer(1, 500, 0);
}
Regards, mYkel
|
|
|
|
|
It still can not popup the bitmap picture. I has to read the MSDN on that he say LoadBitmap need to Import library User32.lib.
|
|
|
|
|
I also looked up the method in MSDN but couldn't find anything that says something about linking to user32.lib. Anyway, I found two very interesting links for you which should solve your problem.
At first try this one:
PRB: CStatic::SetBitmap Doesn't Display Bitmap on Win NT 3.51
Last reviewed: July 10, 1997
Article ID: Q151378
<a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;151378">http://support.microsoft.com/default.aspx?scid=kb;en-us;151378</a>[<a target=_blank title='New Window' href="http://support.microsoft.com/default.aspx?scid=kb;en-us;151378">^</a>] If that doesn't work either you have to do it like described here:
SAMPLE: Drawing a Bitmap in a Foundation Class Dialog Box
Last reviewed: October 23, 1998
Article ID: Q141863
<a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;141863">http: The latter is a little bit more complicated but it works to 100%. I use this way of painting bitmaps in lots of my projects
Regards, mYkel
|
|
|
|
|
why are windows in some softwares (which I think are written in delphi) like CONTEXT(the editor) or UMPS(8051 and other microcontrollers simulator) are very different to ones written in vcpp.
does different languages offer different ways to make a window look different.( i hope u understand this sentence)
|
|
|
|
|
different styles,
u can make VC windows look like VB form windows very easily
|
|
|
|
|
Hi
I badly need a chart within an application that i am building. It should accept values from the database and draw lines but however, i was faced with a major problem, LACK OF DOCUMENTATION. Can somebody, please, help me to implement a simple bar char in visual c++ 6.0.
Thank you for your precious help.
I really need this stuff quick.
Krugger
|
|
|
|
|
|
hi,
im looking to get access to the data in the main parent window dialog from another dialog,
i need a pointer to the main window ?
can someone give me exact code,
as i asked this before and was given instructions and
not concencrate help
|
|
|
|
|
You can try with
AfxGetMainWnd()
|
|
|
|
|
that returns a pointer to desktop
|
|
|
|
|
you need to pass the "main parent window" pointer to the other dialogs.
if you are creating the other dialogs from the parent dialog do something like :
{
CAnotherDialog dlg;
dlg.pParentDialog = this;
dlg.DoModal();
}
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
|
I have a data file that has info as show below.
What is the best way to retrive info only the email addresses. In VC++ 6.0, How can I read a data file by lines?
------- Data file begin -----------
From: "test1 at yahoo" <test1@yahoo.com>
Subject: Follow Up Research
To: "Someone at yahoo" <someone@yahoo.com>, "Someone at Microsoft"
<someone@ms.com>, "Someone at Lycos" <someone@lycos.com>
Cc: "Someone2 at yahoo" <someone2@yahoo.com>, "Someone2 at Microsoft"
<someone2@ms.com>, "Someone2 at Lycos" <someone2@lycos.com>
Content-Type: multipart/mixed; boundary="=_NextPart_2rfkindysadvnqw3nerasdf"
--------------- End here
|
|
|
|
|
sysmatrix wrote:
In VC++ 6.0, How can I read a data file by lines?
CStdioFile::ReadString()
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I am using ODBC 3.0 to connect to Microsoft Access Database, using ODBC functions like SQLFetch() and likes....
The data enters the database successfully but while retrieving date for no reasons Month and Year are going hayways....
the code being
HSTMT hstmt;<br />
SQLRETURN sr;<br />
SQLCHAR SQL[] = "SELECT DONumber, RelDate, Validity FROM DODetails";<br />
char mess[500];<br />
strcpy(mess,"Fetch:\n");<br />
<br />
sr = SQLAllocHandle(SQL_HANDLE_STMT, hDbConn, &hstmt);<br />
if(sr != SQL_SUCCESS && sr != SQL_SUCCESS_WITH_INFO)<br />
displayError(sr, "Error in Allocating Handle to Statement");<br />
<br />
sr = SQLExecDirect(hstmt, SQL, SQL_NTS);<br />
if(sr != SQL_SUCCESS && sr != SQL_SUCCESS_WITH_INFO)<br />
displayError(sr, "Error in Executing the Statement");<br />
<br />
<br />
sr = SQLBindCol(hstmt,1,SQL_C_TCHAR,<br />
don.donum,sizeof(don.donum),&don.dolen);<br />
if(sr != SQL_SUCCESS && sr != SQL_SUCCESS_WITH_INFO)<br />
displayError(sr, "Error in Bind 1");<br />
<br />
sr = SQLBindCol(hstmt,2,SQL_TYPE_DATE,<br />
&don.reldate,sizeof(don.reldate),&don.relen);<br />
if(sr != SQL_SUCCESS && sr != SQL_SUCCESS_WITH_INFO)<br />
displayError(sr, "Error in Bind 2");<br />
<br />
sr = SQLBindCol(hstmt,3,SQL_INTEGER,<br />
&don.valid,sizeof(don.valid),&don.valen);<br />
if(sr != SQL_SUCCESS && sr != SQL_SUCCESS_WITH_INFO)<br />
displayError(sr, "Error in Bind 3");<br />
<br />
<br />
while(SQLFetch(hstmt) == SQL_SUCCESS)<br />
{<br />
sprintf(mess,"%s\tName : %s \tRel Date : %s \t Validity : %d\n",mess,don.donum,(LPCTSTR)don.reldate.Format("%d/%m/%Y"),don.valid);<br />
<br />
}<br />
<br />
MessageBox(mess);<br />
SQLFreeHandle(SQL_HANDLE_STMT,hstmt);<br />
Also got some trouble using the CMonthCalCtrl...again the problem being the date turns out to be wrong everytime...
All help will be appreciated;)
|
|
|
|
|
hello,
i am developing an addin for outlook to insert an image to outlook email body but my problem when i insert image on top of a text (using DOM) the text splits into two sides and image got placed between the text but this is not allowed i have to place image on top of the text without the splitting. Is there any way in VC++,COM,DHTML.
|
|
|
|
|
I find that Graphics::DrawImage performs better when its first parameter is an instance of Image than that of Bitmap. This makes me confused:
this code fragment:
Image image(L"C:\a.jpg");
Rect rect(0,0,100,100);
g.DrawImage(&image,rect);
and this one:
Bitmap bmp(L"C:\a.jpg");
Rect rect(0,0,100,100);
g.DrawImage(&bmp,rect);
and the result is that the first one performs much better when i deflate the "rect" object.
Can any one explain this?
In my application, I read image data from an HBITMAP handle not a file,so Bitmap is preferred, but as you can see above,i need an Image object to display the image.So how can i convert a Bitmap instance to an Image instance. The type cast won't help and I have also tried Bitmap::GetThumbnailImage. And another way is to use IStream, but i am really not good at using it.
Thanks.
|
|
|
|
|
ok, i need another way to test if caps lock is on or off, i tried doing
GetKeyState(VK_CAPITAL) but it doesnt work out too well. is there another method or function i can use to test if caps lock is on or off?
Compiler: VC++ 6 Enterprise
|
|
|
|
|
|
Hello,
I have a few questions regarding Memory Management in Visual C++. I am using Visual Studio .NET 2002 and as a sidenote I am creating a Win32 application that uses the DirectX API. I am compiling in Debug mode (not Release). If I create a Class, I generally make a constructor and destructor for each class. I know the constructor is called when the user creates (instantiates) a class object. When is the destructor called?
Do I need to do something to my class object to call the destructor? Or is this automated somehow?
Also, I want to be sure I don't have any memory leaks (releasing all COM objects and freeing all pointers). How do I specifically check to see that I have successfully done so in Visual Studio .NET?
Thank You,
CBerg
|
|
|
|