|
anybody knows how to load and "get" into a HFONT a TT font file (like I have myfont.ttf and I want to use it without installing it prior to use)
|
|
|
|
|
see CreateScalableFontResource and AddFontResource
-c
Being just contaminates the void. --Robyn Hitchcock
|
|
|
|
|
I want to create a pdf finder. It can find keywords from the pdf files stored on my harddisk. So I need to know the structure of pdf. Anyone knows the details of the pdf structure? Thanks!
|
|
|
|
|
Hi Ivex,
Have a look at this http://partners.adobe.com/asn/developer/acrosdk/
Regards,
Venet.
--------
Black holes are where God divided by zero.(Steven Wright)
|
|
|
|
|
|
I have a dialog-based app. How can I hide its icon on the taskbar?
|
|
|
|
|
Check out Nishant's article here: http://www.codeproject.com/dialog/dlgboxtricks.asp
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
ShowWindow(SW_HIDE)
Help me!
|
|
|
|
|
This one has been driving me mad for hours. I should have stopped to ask for help a long time ago.
Under certain circumstances I am unable to open the clipboard after using keybd_event to send a synthesized ctrl-c keystroke. (here's how i'm using keybd_event)
keybd_event(VK_CONTROL, 0, 0, 0);
keybd_event('C', 0, 0, 0);
keybd_event('C', 0, KEYEVENTF_KEYUP, 0);
keybd_event(VK_CONTROL, 0, KEYEVENTF_KEYUP, 0);
if (OpenClipboard())
...etc
The circumstances under which OpenClipboard fails is if I have previously opened the clipboard and have "pasted" text into it with the CopyStringToClipboard() function below. (Here are both of the clipboard functions i'm using)
void CClipboardDlg::CopyCurrentClipboardText()
{
if (OpenClipboard())
{
HANDLE hClipboardData = GetClipboardData(CF_TEXT);
char * pchData = (char*)GlobalLock(hClipboardData);
CString strFromClipboard = pchData;
GlobalUnlock(hClipboardData);
CloseClipboard();
}
}
<BR><BR>
void CClipboardDlg::CopyStringToClipboard()
{
CString strData;
m_ClipboardStringList.GetText((m_iClipboardListPosition), strData);
if (OpenClipboard())
{
if (::IsClipboardFormatAvailable(CF_TEXT)||
::IsClipboardFormatAvailable(CF_OEMTEXT))
{
HGLOBAL hClipboardData;
EmptyClipboard();
hClipboardData = GlobalAlloc(GMEM_DDESHARE, strData.GetLength() + 1);
char * pchData;
pchData = (char*)GlobalLock(hClipboardData);
strcpy(pchData, LPCSTR(strData));
GlobalUnlock(hClipboardData);
SetClipboardData(CF_TEXT, hClipboardData);
}
CloseClipboard();
}
}
The strange thing is before I ever call CopyStringToClipboard() I can open the clipboard before and after the keystroke just fine. After calling CopyStringToClipboard() I can open the clipboard fine before sending the keystroke but not afterward. Stranger still, if I send the keystroke twice (not in code, but say, by a registered hotkey that calls the function) then it works fine for the second and for every subsequent keystroke until I call CopyStringToClipboard() again! It's only that first keystroke after calling CopyStringToClipboard() that behaves badly.
My first suspicion was I wasn't allowing enough time between sending the keystroke and attempting to open the clipboard but I found that waiting 5000 ms was the minimum time until the clipboard could be opened. That is beside the fact that everything works fine until CopyStringToClipboard() gets called.
I eagerly await enlightenment with my open hand poised in front of my forehead and the word "DOH" on the tip of my tongue.
|
|
|
|
|
Given an existing .mdb database, I want to change the Password every time I close the database.
Ideas
|
|
|
|
|
class CMyDaoDatabase : public CDaoDatabase
{
// ....
virtual ~CMyDaoDatabase()
{
// 1. random gen new password.
// 2. set the new password into the MDB file
// 3. save the new password into register or file
// (maybe before saving, you can encode the password)
}
};
///////////////////////////////////////////////////////
// I am not sure my idea, but you can try!
|
|
|
|
|
So its in the CDaoDatabase and not in the CDaoWorkspace.
Thanks
|
|
|
|
|
Hey, uh, how do you delete a file from C++?
Dude
|
|
|
|
|
int remove( const char *path );
#include <stdio.h>
void main( void )
{
if( remove( "remove.obj" ) == -1 )
perror( "Could not delete 'REMOVE.OBJ'" );
else
printf( "Deleted 'REMOVE.OBJ'\n" );
}
|
|
|
|
|
I thought perror function wasn't available in VC++ ?
I saw it in Borland all right.
Or maybe I just didn't link with the correct libraries.
Regards,
Venet.
--------
Black holes are where God divided by zero.(Steven Wright)
|
|
|
|
|
Hey, uh, try DeleteFile, Dude!
Scot Brennecke
Software Developer
VC++ MVP
|
|
|
|
|
|
I'm trying to develop a tool that give me system information like MSINFO does.
I need to know hardware info such what type of cpu, how much memory, what card of network card, etc...
and software info such what type and version of OS, drivers, suites are installed, etc.
Does anybody could give some guide?
Thanks all.
Fernando H. Pratti
|
|
|
|
|
Nearly every piece of information that you listed has a separate API function to retrieve it. Some are easier to use than others. If you already have a tool on your system that gathers this information (such as MSInfo), use the Dependency Walker tool (Depends.exe) to view its dependencies. Look at the API functions it calls, and that will give you leads to follow for your own tool.
Some of the API functions you'll need include: GetVersionEx, GetSystemInfo, GetDiskFreeSpaceEx, and GlobalMemoryStatus.
Scot Brennecke
Software Developer
VC++ MVP
|
|
|
|
|
|
Is there any tool like this for Remote System?
Please....
|
|
|
|
|
Hi all, I have a straight forward problem for those who know anything about Direct3D and matrices. I have managed to setup the geometry pipeline and get my object (a cube) rotating around the world spaces origin (i.e. you can see it spinning around the camera view - it disappears out the left side of the screen and re-enters at the right, and keeps going). However, I would like it to spin on its own axis in front of the camera (not around the damn thing). I have setup the rotation (x,y and/or z), translation and scale matrix functions, but am unsure as to which ones I use? At the moment I am modifying the world_matrix because I want the actual object to spin and not the camera. My world matrix is the Identity matrix and in the UpdateFrame() function adds the rotationx evaluation before set the transform to that matrix and rendering it. Does this need to get set every frame update? or should I only set it once but do something else to the matrix to get it going? Urgent responses would be extremely appreciated (obviously).
Cheers all,
Alan.
"When I left you I was but the learner, now I am the master" - Darth Vader
|
|
|
|
|
Hi there,
I'm writing program which i have to transparent bitmaps on that.
The program must be work on Win2000 and Win98 Arabic version.
For trasparting bitmaps i used TransparentBlt function.
As i read in MSDN, TransparentBlt could work on Win98 and Win2000.
I tested my program on Win2000, it works fine.
But when i test my program on Win98, my program don't show transparent bitmaps !!!
What's wrong ?
Any Idea ?!
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
I have never had any luck using TransparentBlt() on win98. There are a couple good methods for drawing transparent bitmaps in the Bitmap & Palette section here on The Code Project, but my favorite method is the True Mask method.
---
CPUA 0x5041
Sonork 100.11743 Chicken Little
Within you lies the power for good - Use it!
|
|
|
|
|
Thanks for your helps
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|