|
Thank you! I think I can adapt this code to my needs without much trouble.
|
|
|
|
|
I want to learn how to load the defualt character in a MFC app.;P
cf
|
|
|
|
|
I want to learn how to load the defualt character in a MFC app.;P
cf
|
|
|
|
|
Hello guys, I know that it will sound stupid - but I can't find any way of clearing the selection of a ListView control the way it is before you select an item for a first time.
Thanks for your patience ,
Deian
|
|
|
|
|
ListView_SetItemState(hwndList, -1, LVIS_SELECTED, 0);
--Mike--
Just released - RightClick-Encrypt - Adds fast & easy file encryption to Explorer
Like the Google toolbar? Then check out UltraBar, with more features & customizable search engines!
My really out-of-date homepage
Sonork - 100.10414 AcidHelm
|
|
|
|
|
Thanks again Mike
Deian
|
|
|
|
|
Is there a way to subclass a groupbox so that it automaticly contain, say four CButtons. ie when I add my derived class to a dlg project it will automaticly add the four member buttons. The problem for me is how i do with the resources for these buttons.
Thanx...
|
|
|
|
|
Do you really need the resource for the buttons?
Can't you just create them from your subclass?
|
|
|
|
|
I have some code in ASM but I can change it to VC++ command, how to use ASM in VC++???
please help me!!! thanks
|
|
|
|
|
Have a look in the MSDN at "__asm" if you have a MS compiler, otherwise look out for "asm".
Good luck
-Dominik
|
|
|
|
|
try
__asm
{
your asm code here
}
|
|
|
|
|
__asm
{
//write your assembly code here
}
R_Renjith The True CP ian
|
|
|
|
|
also think so
|
|
|
|
|
I need that when my windows is created it automatically execute some task.
In particular query the database using ado and displaying the results in editbox, lists, etc...
I tryed to put the call to the function that retrive the data in the constructor, but the controls are not yet created so Assertion Failure.
I went on and tryed when the window post WM_CREATE, same error, I tried with WM_SHOWWINDOW, same same.
Finally in the WM_PAINT, OnPaint, everything works perfectly.
The downside is that everytime my window is covered, resized, maximized, etc, my App requery the database, and this is a Big WASTE OF RESOURCES, especially if made on sone network.
I solved this by creating a BOOL m_AlreadyQueried.
And putting an if(!m_AlreadyQueried){...}
So when the WM_PAINT is posted the OnPaint calls the Query function, and sets m_AlreadyQueried = TRUE, the next time OnPaint is called the if evalutates false and the App doesn't query the database.
There is anther way of making this?
I mean maybe I'm wrong using WM_PAINT, but the other messages are posted "TOO EARLY".
"Nelle cose del mondo non e' il sapere ma il volere che puo'."
|
|
|
|
|
If yo want to do it in your view class you can do it in OnInitUpdate()
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
Or if you are in Dialog, do it in OnInitDialog
Or, if you are in generic CWnd, you can try to do it in OnShowWindow , checking that the command is SW_SHOW and GetSafeHwnd() returns you not null and then query the database. Remember to have some flag, for example a static boolean variable inside function, then, after query, set it to false, e.g.:
...
if(GetSafeHwnd() != NULL){
static bool bFirstTime = true;
if(bFirstTime){
bFirstTime = false;
}
}
Hope this helps
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
Need Web-based database administrator? You already have it!
|
|
|
|
|
Yes, WM_PAINT is no good place to stuff code in.
Register our own message and when you window is beeing created, post
it to yourself and the do the proccessing in response to the message.
If it's a dialog post it in WM_INITIDIALOG, if its a window post it in WM_CREATE.
|
|
|
|
|
how to send a virtual key in a service when the Winlogon desktop is the input desktop?
|
|
|
|
|
perhaps have a look at the function ::keybd_event or SendInput?
|
|
|
|
|
? use which api function?
I'm a beginner of VC++...
|
|
|
|
|
BOOL CDlg::OnInitDialog()
{
CDialog::OnInitDialog();
CenterWindow();//???????????
return TRUE;
}
|
|
|
|
|
|
You can set the flag "Center" in the properties of your Dialog ("More Style" Tab).
Best regards,
Eugene Pustovoyt
|
|
|
|
|
Try CenterWindow()
|
|
|
|
|
Hi!
I have created a SDI program (CRichEditView)and I tryed to draw some shapes.
But: I havent found the OnDraw function!
How can draw something????
Thanks
|
|
|
|