|
I think Graphics::DrawString() renders only text,
trioum wrote: 1.text outline border width and color.
use Graphics::DrawRectangle()
trioum wrote: 2.text background color.
use Graphics::FillRectangle()
and order can be background fill, Text, border.
|
|
|
|
|
how can I change the text outline border width and color
Trioum
|
|
|
|
|
trioum wrote: how can I change the text outline border width and color
Did you already done and just want to change
if not, may be the following is useful. i just learnt how to.
Graphics graphics(hdc);
WCHAR szText[] = L"Sample Text";
Font arialFont(L"Arial", 16);
RectF layoutRect(25.0f, 25.0f, 150.0f, 25.0f);
StringFormat format;
format.SetAlignment(StringAlignmentCenter);
graphics.FillRectangle(&SolidBrush(Color(255, 100, 100, 100)), layoutRect);
graphics.DrawString(szText,11, &arialFont, layoutRect, &format, &SolidBrush(Color(255, 0, 0, 0)));
graphics.DrawRectangle(&Pen(Color::Black, 1), layoutRect);
|
|
|
|
|
Hello All,
I'm getting
libc.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function _mainCRTStartup error in a Win32 based application. IDE I'm using is VC++ 7 (Visual Studio .Net 2003). How it can be solved?
Any help is highly appreciated.
Come online at:-
jubinc@skype
|
|
|
|
|
int main(int argc, char * argv[])
{
return 0;
}
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
what is ur project type, DLL, win32 console, windows .... ?
May be the project ur working is different from the project settings.
May be u r creating the project with setting for WIN32 console for the existing source files written for DLL.
|
|
|
|
|
Open MSVisualC++.
Select Tools ->Customize from the MSVC menu.
Click on the Add-ins and Macro Files tab.
like this way i fallow ...but MATLAB for Visual Studio on the Add-ins and Macro Files list is not showing...PLZ help me...How to Configure the Matlab Add-in for Visual Studio vc++ 6.0..PLZ
#sanroop#
|
|
|
|
|
|
Dear All,
I want to use a new gina instead of msgina, I wanna use a fingerprint device for logon, I have to call a method of a dll using the finger print device. I have made all my changes and there is no error. while I call this method, even if I don't use the output of the function the windows logon, the desktop is shown and a moment later this message is shown on a blue screen and the system is shut down.
"STOP: c000021a {Fatal System Error}
The windows logon process system process terminated unexpectedly with a status of 0x0000005 (0x00000000 0x00000000).
The system has been shut down."
Do anyone have an idea?
Thnx in advance.
|
|
|
|
|
I have two lan cards in my Server in such a way that Lan Card a1 is connected to internet and holds Public IP infomration and Lan card a2 is meant for private internal network and holds internal IP information and connects to client machines in my internal network.
In my coding, I want to develop a module that can show me realtime IP addresses and/or computer name of the Client machines that are using internet via server in my internal network
plz reply me on mirtunjay.prodata@gmail.com and mirtunjayteri@gmail.com
|
|
|
|
|
How can this be done ?
Engineering is the effort !
|
|
|
|
|
|
The previous Post and ExtractIconEx is always at your service...
A Second Solution: (b******ized version)
There's always LoadResource(),FindResource()
modified 20-Oct-19 21:02pm.
|
|
|
|
|
Hello,
The question I have doesn't have a single correct answer. But I'm curious about what is a good solution, so I want to know the option of other people. Let's say you store some information about your users. Like name, address, a description of themselves, etc in a struct.
Now you have (at least) 2 options to save this data:
1) Fixed sized array: struct { char name[26]; char description[256]; };
2) Pointer: struct { char *name; char *description; };
Now I'm wondering what the best solution is. A fixed sized array is of course a bit easier, no need to malloc/free. But there will be wasted memory, or even worse, not enough memory to save the data.
Now what I'm really wondering about is the best method to create a struct that uses these pointers. My current idea is: I read a line from the input, save it in a temp char buffer, calculate the length of the string, malloc the space needed and finally copy the string to the malloc'ed memory. Is this a good algorithm? Or are there better/more efficient ways to do this?
NOTE: This is more oriented to standard C, not really C++.
|
|
|
|
|
With C, you don't have the advantages of the more modern string classes, so just
malloc'ing what you need for each string is probably the most memory efficient.
Note this is assuming in-memory storage....if you're referring to persistent storage, like a disk
file, then storing allocated pointers doesn't apply.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I have a main program that creates some threads, then goes into an event loop. The structure is:
main()
{
CreateThread....
CreateThread.....
while(1)
{
WaitForSingleObject(Main_Event)
.... do some processing....
}
}
I would like to increase the priority of "main" so that when "Main_Event" is sent, the threads suspend while main loop is processing.
Any idea how I can do this?
|
|
|
|
|
The main thread could use SuspendThread() to suspend the other threads when the
Main_Event is signaled.
Another possibly safer design is to make the threads able to stop themselves when
signaled somehow and wait for an event that lets them resume.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
How can I programmatically detect the plugin of a USB device or cable? Does anyone know of a sample code to do this?
Any help appreciated.
|
|
|
|
|
|
I am using the following code example (found on code project), but the page returned in page1 is www.codeproject.com/info/search.aspx and not www.codeproject.com/info/search.aspx?artkw=wininet.
<br />
#include "afxinet.h"<br />
<br />
CInternetSession sess;<br />
CHttpConnection* pHttpConnection1 = sess.GetHttpConnection(_T("www.codeproject.com"));<br />
CHttpFile* pFile1 = pHttpConnection1->OpenRequest(_T("POST"), _T("/info/search.aspx"));<br />
CString header1 = _T("Content-Type: application/x-www-form-urlencoded");<br />
CString mdata1 = _T("artkw=wininet");<br />
pFile1->SendRequest(header1, header1.GetLength(), (LPVOID)(LPCTSTR)mdata1, mdata1.GetLength());<br />
DWORD dwRet1;<br />
CString page1;<br />
pFile1->QueryInfoStatusCode(dwRet1);<br />
if (dwRet1 == HTTP_STATUS_OK){<br />
char buf12[999999];<br />
pFile1->Read(buf12, 999999);<br />
page1 = buf12;<br />
}<br />
I found this code here: http://www.codeproject.com/script/Forums/View.aspx?fid=1647&msg=1603553[^]
What am I doing wrong?
Lucky
|
|
|
|
|
I'm trying to use SHBrowseForFolder() into my application. I don'n know how to retrive the FULL path of the selected folder from the BROWSEINFO structure. Can anybody give me a code example?
In VC++6, please...
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
They hid it in the documentation[^]. Bastards!
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
Thanks a lot!
I'll try monday at work...
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
jhwurmbach wrote: They hid it in the documentation
hey hey now
led mike
|
|
|
|
|
OK, that was a bit harsh.
But simply entering SHBrowseforFolder in MSDN-serach gave anything he wanted.
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|