|
WM_CTLCOLOR has the value 0x0019.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
I'm still trying to learn this whole device context stuff in windows.
Here is my Visual C++ 6.0 problem with an MFC application: I've got some DC that has some stuff drawn to it, and I want to output said DC (or actually just a portion of it) to a .bmp file. How in the world would I do this?
|
|
|
|
|
You actually want to output the bitmap that is selected into the DC, and the answer is in the FAQ.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
I used SQL server to design database for my application,I use this line of code to make connection:
hr = m_pConnection->Open(L"Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Name;",L"",L"",-1);
and everythings work properly.
Because I want to use this application on another computer and deploy a package for it,
I think I should changed the "Open" function .I used this but it does not work:
hr = m_pConnection->Open(L"Provider=SQLOLEDB.1;Data Source=D:\\MSSQL7\\Data\\Name_Data.MDF;",L"",L"",-1);
(SQL server make "Name_Data.mdf" for my database).Should I use this file?What should I change in my code
to use my application in another computer?
|
|
|
|
|
i use odbc links on the client machines ... can your method not use the same?
---
"every year we invent better idiot proof systems and every year they invent better idiots ... and the linux zealots still aren't being sterilized"
|
|
|
|
|
i am doing an assignment related to ftpclient appication..
as a download manager.. like getright or download accelerator plus..
i have problem regarding multiple dialog box opening per thread.
if only one dialog box is opened it it is working fine,
but for multiple dialog box data of one dialog box is mixing with another one.
have any solution?
|
|
|
|
|
What do you mean by one dialog is mixing with another?
I'd be very curious in such a phenomenon.
You mean they fuse at pixel level??????
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
The declaration of CArray class is as follows ..
template< class TYPE, class ARG_TYPE > class CArray
why do we need two template parameters TYPE and ARG_TYPE?
What is the significance of the ARG_TYPE ?
vimal
|
|
|
|
|
The ARG_TYPE determines the type used when adding and returning elements from the array. This is usually a reference to the element type, to avoid an extra copy constructor call.
--Mike--
My really out-of-date homepage
He who laughs last, didn't get the punchline and is just laughing so he won't look silly.
Sonork - 100.10414 AcidHelm
Big fan of Alyson Hannigan.
|
|
|
|
|
Ok, I'm want to copy the contents of one double array into another; ie
double *topArray;
double *Array;
...
...
topArray = new double[foo];
Array = new double[foo*4];
...
...
memcpy( Array[0], topArray, sizeof(double)*foo );
I thought that using memcpy() would work, but it doesn't. I guess because the arrays aren't chars
Is there any way to do this other than using for loops? as the arrays are both contiguous in memory it seems that memcpy() or similar would do the job quicker and neater.
TIA,
Pete
|
|
|
|
|
memcpy actually copies bytes. so it should work with double too.
try :-
memcpy(Array,topArray,sizeof toArray)
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
or in your syntax (i think):
memcopy(&array[0],&toparray[0],sizeof(double) * foo);
---
"every year we invent better idiot proof systems and every year they invent better idiots ... and the linux zealots still aren't being sterilized"
|
|
|
|
|
When an ActiveX control is the parent window of a modeless dialog box the TAB key, ToolTips don't work as expected. The problem with the TAB key could be solved using ::SetWindowsHookEx function, though it is quite dangerous.
But I still can't enable tooltips. Does anybody has any idea how to do this?
Thank you in advance,
Ruslan
|
|
|
|
|
Hey Guys
Does anybody know how to declare your own size variables in c++ for instance i want to make my own variable that is say 4bits or is 5 bytes big.
I guess this would have to be done in assembler.
Cheers
Peter
|
|
|
|
|
|
I'm not sure I fully understand the question at hand.
However you can create custom data types using structs or classes.
struct CustomType{
char theBytes[5]; //5 byte data type
unsigned theBits : 2; //*** : *** allows bit control
};
with the above code it's now possible to create an instance of your custom data type which holds 5 bytes instead of the built-in generic char, int, long, etc...
CustomType newType; //new datatype
unsigned char Type; //built-in datatype
Hope this helps
"An expert is someone who has made all the mistakes in thier field" - Niels Bohr
|
|
|
|
|
I have an NT service program that seems to get a lot of access violations. In trying to track them down, I've found all sorts of odd things going on. Here is one of them.
In this example this piece of code is called from a OnTimer callback routine. The timer was started from the COM object that the ATL wizard makes when you ask it to build a serice.
e.g. Service -> IEntry.StartProcess -> SetTimer
LONG OdysseyLog::GetRegStrValue(const TCHAR szSubKey[], const TCHAR szValueName[], TCHAR *pszReturnVal[], unsigned int *uiLen){ LONG lRes = ERROR_SUCCESS; DWORD dwType; DWORD dwSize; HKEY hKey; try { dwType = REG_SZ; lRes = RegOpenKeyEx( HKEY_LOCAL_MACHINE, szSubKey, 0, KEY_READ, &hKey); if (lRes != ERROR_SUCCESS) { throw true; }
I get an Access Violation from the throw statement! How can that happen? The access violation is in Kernel32.dll at 0xE06D7363. running NT 4.0 with latest SPs (don't know the number, but the admin guys assure me this server is up to date).
Thanks for the help,
Bill
|
|
|
|
|
I have been using Win32 API for four years now and I never came across this function before. I thought I would bring it to every one else's attention.
MessageBoxIndirect creates a standard style MessageBox but will use a custom icon if specified and will load strings from a resource string table! (Great for international applications.) According to MSDN it is available on Windows 95 and up.
|
|
|
|
|
According to Smart Computing in Fall 2000 the MSDN listed 1949 API's, I wonder how many ship with XP. Nonetheless 2000 of anything is alot to learn, nevermind complex API functions.
"An expert is someone who has made all the mistakes in thier field" - Niels Bohr
|
|
|
|
|
Hi all,
I need to make my program respond to a hotkey, and I have written a DLL that installs a global keyboard hook to send a message back to my main window.
The only problem is I only get the keyboard messages when my app has focus.
Does anyone know why I don't see keyboard events for all threads? }
Thanks in advance for any help!
Here's some code from the DLL:
// Keyboard hook install
PSKEYBD_API BOOL CreateKeybdHook(UINT nCallbackMessage, HWND hwndWindow, DWORD dwVirtKeyCode, DWORD dwKeyInfo) {
hwndKBHookWindow = hwndWindow;
dwKBHookCallbackMessage = nCallbackMessage;
dwKBHookHotkey = dwVirtKeyCode;
// Install as global hook (last param is 0)
SetWindowsHookEx(WH_KEYBOARD, (HOOKPROC)KeyboardHookProc, (HINSTANCE)hInstance, 0);
return TRUE;
}
// The keyboard hook function
LRESULT CALLBACK KeyboardHookProc(int code, WPARAM wParam, LPARAM lParam) {
// Make sure this is a WM_KEYDOWN and not a key repeat
if (code == HC_ACTION && !(lParam & 0x80000000) && !(lParam & 0x40000000)) {
// Was this our hotkey?
if (wParam == dwKBHookHotkey) {
::PostMessage(hwndKBHookWindow, dwKBHookCallbackMessage, WPARAM(0), LPARAM(0));
//MessageBeep(MB_ICONINFORMATION);
}
}
return CallNextHookEx(hHook, code, wParam, lParam);
}
|
|
|
|
|
I used a keyboard hook a while but cannot remember the details. I will check my code when I get home (at work right now) and see if I can help.
In the mean time, you may want to look at RegisterHotKey. As I understand from the documentation, Windows will send a WM_HOTKEY message to the HWND specified when RegisterHotKey was called when your key combination is pressed. (I have never tried this myself so I don't know if it will do what you are need it to do.)
|
|
|
|
|
Hi Henry,
I fixed my problem.
In my DLL I forgot to put:
#pragma comment(linker, "/section:.XDATA,rws")
After my shared data segment definition.
Thanks a lot for your reply!
|
|
|
|
|
I need to filter the records a user will be able to see based on an int field. I set the m_strFilter variable of the recordset belonging to the recordview.
<br />
m_pSet->m_strFilter = "[Active] = 1";<br />
However, scrolling through the records from the recordview still presents me with all records, including ones where Active != 1. So I thought perhaps I should call requery to make it notice my filter change. Instead, now scrolling through the records presents me with endless "field can't be updated" errors.
I have the feeling I just don't understand the DAO framework as of yet. Any suggestions? TIA.
Simon
Hey, it looks like you're writing a letter!
Sonork ID 100.10024
|
|
|
|
|
Try to open de Table with a sentences SQL
strQry.Format("Select * from MyTable where Active = %d", 1);
Regards...
Is Friday!!! And Party!!!
My Big Question is: Where is Buffy???
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
The problem is that I have a checkbox on the form that will enable the user to skip records where Active = 0. Opening and closing the recordset makes funny things happen.
Simon
Nobody does chicken like MFC
Sonork ID 100.10024
|
|
|
|