|
See Here[^] maybe it is some helpful to you
whitesky
|
|
|
|
|
Thanks two.I want the curve is free, no rule, casually for two, may draw passes
through these two curves.
alantop
|
|
|
|
|
hi friends,
in my application i have applied a bitmap image as the background of dialog but when i do this the background of static controls,radio buttons is not changing how can i get rid of this problem.
please suggest a solution for this problem.
sathish
|
|
|
|
|
Use ModifyStyleEx(0, WS_EX_TRANSPARENT); for control.
As well as you have to handle the OnCtlColor of the Dialog and Return the NULL brush for controls
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
For Static Controls
See Here[^]
(You can also do this)
For a radio button try this in OnCtlColor as A_Laxman suggests:
if(pWnd->GetDlgCtrlID()==IDC_RADIO1 || pWnd->GetDlgCtrlID()==IDC_STATIC) //IDC_RADIO1 is controlID for radio button
hbr=(HBRUSH)GetStockObject(NULL_BRUSH);
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
i my project io have one list control and one add button.one we click on the add button a new window is open to enter the item after clicking ok the item should be entered in list control.up to here my program is working
after that once we again complie we did not get the aded items.please solve my problem.
thank u,
vasu.
|
|
|
|
|
Do you mean that you are closing your application, Compiling the source code again and then again running it to see the output?
If yes you will need to save the entries of the list control somewhere in a file/ database and set those entries again in the list control, at the time you show up your dialog containing the list control.
Or else please make your problem clear if I understood it incorrectly.
and yes you can use CListCtrl::SetItemText() to set the items of the list control
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
-- modified at 8:53 Saturday 17th June, 2006
|
|
|
|
|
vasusree wrote: i my project io have one list control and one add button.one we click on the add button a new window is open to enter the item after clicking ok the item should be entered in list control.up to here my program is working
after that once we again complie we did not get the aded items.please solve my problem.
thank u,
Save the entries of the ListBox before exiting from the application some where in file/Registry
And when you run the application search for the information stored, if present load it else do regular routine..
That's ALL
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
You need to save your values(list) that when you run your program this values insert to your list
you can use registry or file or another ways.
whitesky
|
|
|
|
|
In my dialog based MFC application, I initiate windows hook as follows
HHOOK TheHook; <br />
LRESULT CALLBACK ShellProc( int nCode,<br />
WPARAM wParam,<br />
LPARAM lParam<br />
);<br />
<br />
BOOL CTmphookDlg::OnInitDialog()<br />
{<br />
..<br />
..<br />
HINSTANCE ppI = AfxGetInstanceHandle();<br />
TheHook=SetWindowsHookEx(WH_SHELL, ShellProc, ppI,0);<br />
..<br />
..<br />
}<br />
<br />
LRESULT CALLBACK ShellProc( int nCode,<br />
WPARAM wParam,<br />
LPARAM lParam<br />
)<br />
{<br />
<br />
if(nCode==HSHELL_WINDOWCREATED)<br />
{<br />
HWND hWnd = (HWND)(wParam);<br />
char szClassName[256];<br />
GetClassName(hWnd, szClassName, sizeof(szClassName));<br />
AfxMessageBox(szClassName);<br />
}<br />
<br />
return CallNextHookEx(TheHook, nCode, wParam, lParam);<br />
}
What I want is when any window (other applications) is created on the operating system.. it should flash a message telling its class name.
But this code only shows its class name initially when the dialog is being created. I tried to open notepad or other windows of other applications, it didnt flash any message.
Why is that so.? What to do to get this?
Row
|
|
|
|
|
You're calling SetWindowsHookEx with the dwThreadId set to zero and the hMod set the the .EXE module handle. If you look at the documentation you'll see the following:
dwThreadId
[in] Specifies the identifier of the thread with which the hook procedure is to be associated.
If this parameter is zero, the hook procedure is associated with all existing threads running
in the same desktop as the calling thread.
All global hook functions must be in libraries.
In short you're you're using a global hook and global hook procudures must be in a DLL (that's how it gets into the address space of another process; the other processes loads it). You're hook procudure is in the MFC .EXE.
Steve
|
|
|
|
|
|
|
WH_KEYBOARD_LL and WH_MOUSE_LL are special cases. The following is a quote from MSDN:
"However, the WH_KEYBOARD_LL hook is not injected into another process. Instead, the context switches back to the process that installed the hook and it is called in its original context. Then the context switches back to the application that generated the event."
This is why the example he gave works; it has nothing to do with his Microsoft conspiracy theories. My advice is to follow the rules and ignore that article.
Steve
|
|
|
|
|
You are right steve.
Regards,
FarPointer
Blog:http://farpointer.blogspot.com/
|
|
|
|
|
Hello,everyone!I want to use ADO to connect MS SQL Server which locates in the public Internet,and the Client locates in a Local Area NetWork.How should I code?Who can give me some advices?And the example code is the better,Thanks!
|
|
|
|
|
hello anyone!
how do i call an api function in __asm block?(in VC++ project)
can some one give me a simple sample for understanding?
thank.
Zo.Naderi-Iran
|
|
|
|
|
zoncpp25 wrote: how do i call an api function in __asm block?(in VC++ project)
see here[^]
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Hai all,
I am not able to understand how to use ADO.net in VC++.net. If possible, please guide me.
Ravindra
|
|
|
|
|
See Here[^] and Here[^] maybe it is some helpful to you
whitesky
|
|
|
|
|
That's a pretty broad question. Have you read the MSDN help ? What are you tring to do ? How far have you got ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
hi all. im new here and to windows programming. actually i started out to learn Visual C++. the book i follow first goes thru windows programming basics in C++. i tried out the first prog in the book and got stuck. im using VC 6.0. the prog is here:
#include<windows.h>
int_stdcall WinMain(HINSTANCE hinstance,
HINSTANCE hPrevinstance,
LPSTR lpszCmdline,
int nCmdShow)
{
MessageBox(0, "Hello!", "Title", 0);
return (0);
}
though it is simple, i get error messages that i cannot eliminate. please help.
the errors are:
E:\Program Files\Microsoft Visual Studio\sample1\sample1.cpp(3) : error C2146: syntax error : missing ';' before identifier 'WinMain'
E:\Program Files\Microsoft Visual Studio\sample1\sample1.cpp(3) : error C2501: 'int_stdcall' : missing storage-class or type specifiers
E:\Program Files\Microsoft Visual Studio\sample1\sample1.cpp(3) : fatal error C1004: unexpected end of file found
Error executing cl.exe.
well i dunnot know if this is the right place to post my problem, but i did not find another better place for it. if this is not the right place then tell me.
thx 2 all 4 any hlp.
-- modified at 6:41 Saturday 17th June, 2006
|
|
|
|
|
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
// TODO: Place code here.
::MessageBox (NULL,"Hello","1",MB_OK);
return 0;
}
In your code // there should be two underscore signs before stdcall and a space between int and __stdcall
int __stdcall WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
// TODO: Place code here.
::MessageBox (NULL,"Hello","1",MB_OK);
return 0;
}
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
-- modified at 6:51 Saturday 17th June, 2006
|
|
|
|
|
thanks _AnShUmAn_. i tried ur suggestion. it worked.
|
|
|
|
|
See Here[^] maybe it is some helpful to you
whitesky
|
|
|
|