|
If that's all you want to do, and don't need ano of the "fancy" GDI stuff, just open LPT1: and write the chars to it.
|
|
|
|
|
Hi there,
In a dialog based application, I need create a window with spliter
control. In the creation of the MSVC Formview class, i find a debug error:
"Error: Dialog with IDD 0x%04X must have the child style" (lpszResource).
Where can i set this style?
This is also the problem I required last night with detailed source code.
http://www.codeproject.com/script/comments/forums.asp?forumid=1647&fr=26
Thanks for all the replys!
Best regards,
chen
|
|
|
|
|
chen wrote:
Where can i set this style?
In the dialog resource editor:
Rightclick - Properties - Styles tab - Style Combobox - bottom of the list
---
CPUA 0x5041
Sonork 100.11743 Chicken Little
Within you lies the power for good - Use it!
|
|
|
|
|
chen wrote:
Where can i set this style?
open the dialog in the resource editor. open the properties dialog; there is a drop down list of styles to choose from; "child" is one (popup is another)
-c
Being just contaminates the void. --Robyn Hitchcock
|
|
|
|
|
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....
|
|
|
|