|
Exactly. But the other portions are ok.
|
|
|
|
|
I assume you're drawing in your WM_PAINT[^] handler?
Steve
|
|
|
|
|
How r u drawing the bitmaps? Call the InvalidateRect() function when the pop-up menu is exiting. Post us code for more clarity
|
|
|
|
|
Hi all,
I'm currently working on a program in C for a Win32 App where my parent window and its children have been created programmatically using CreateWindowEx(). I've set the extended style for the parent window to WS_EX_CONTROLPARENT and its children (edit controls) style to WS_CHILD | WS_TABSTOP, but no matter what I do, when I click inside the first edit control, type in the value, and then press TAB, the focus does not shift to the next window with WS_TABSTOP. Am I missing something here? The way I understood it, these two styles were all I would need, yet I am still unable to shift the focus from one edit control to the next.
All help is welcome. Thanks in advance.
|
|
|
|
|
Is the IsDialogMessage[^] function in your message pump? If not it will not work as you expect as it's the function which contains all the dialog box navigation magic.
Steve
|
|
|
|
|
So you're saying I just need to add IsDialogMessage() to my GetMessage() loop? Would I switch the message on the spot, or would I switch it in the WindowProc?
Thank you so far for you help.
|
|
|
|
|
The message pump would have to look something like this:
MSG m;
while (GetMessage(&m, NULL, 0, 0))
{
if (!IsDialogMessage(hDialog, &m))
{
TranslateMessage(&m);
DispatchMessage(&m);
}
}
Note that things just work for modal dialogs as they implement their own message pumps which do the right thing. For modeless dialog and other windows you have to do it yourself.
Steve
|
|
|
|
|
Okay, that helps out. Thank you very much Steve.
|
|
|
|
|
Hi,
is there any possible to having an communication between client side ( ASP .Net or others), server side is C++,MFC on the internet using SOCKET programing...
if it is possible means please tell me how they communicating...?
thanks in advance....
|
|
|
|
|
You said you wanted to communicate over the Internet with sockets (and previously worked with MFC and Win32).
Do you have a specific question or are you looking for tutorials?
/M
|
|
|
|
|
I am trying to build a VC++ POCKET PC 2003(ARMV4) application in visual studio 2005,It compile successfully but i am getting runtime error
C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\PocketPC2003\include\winnt.h(648) : fatal error C1189: #error : Must define a target architecture.
Thanks in advance.
|
|
|
|
|
|
See the "blue" suggestion posted by gexaman here.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
In a template project I am working on I have basic matrix product fine.
so given I have that working, I was looking at how to deal with matrix and vector product correctly as my books lack the algorithm I need.
vector operator*(const matrix that) {
vector result;
for (int i = 0; i < that.data.size{}; i++)
for (int j = 0; j < that.data[].size(); j++)
....
return vector;
}
I am not sure how this loop needs to work
|
|
|
|
|
Here, this[^] link should help.
|
|
|
|
|
I just need some code, now I am dealing with another problem, overloading []
http://www.contract-developer.tk
|
|
|
|
|
vector[i] += that[i][j] * (*this)[j];
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I want to disable some shortcuts in CRichEdit control. Using PreTranslateMsg it is done but how to block some shortcut events ??
For example Left align , right align.
Thanks in advance.
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
Have you tried adding handlers for those events and doing nothing there?
Workout progress:
Current arm size: 14.4in
Desired arm size: 18in
Next Target: 15.4in by Dec 2010
Current training method: HIT
|
|
|
|
|
Hi,
I'd like write a function doing sth like that.
if(a == 5)
val = val | 1000
if( b == 20)
val= val | 100
in the end if i have the both condictions corrects i'd like to have 1100 as result on val. but i always do 1000.
which operator should i use to have the 1100 as resut.
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|
|
why are you using bitwise OR, if what you really want is addition ?
|
|
|
|
|
Being slightly cynical addition sounds like the operator you neeed... With your statements val is going to end up containing 1004 as there's a large overlap in the bits set between the bit pattern for 1000 (1111101000b) and the bit pattern for 100 (1100100b).
If you're trying to fiddle individual bits (i.e. turn bits with OR 1, turn them off with AND 0) then perhaps encode your numbers as powers of two and/or use hex:
if( a == 5 )
val |= 0x1000;
if( b == 20 )
val |= 0x100;
Cheers,
Ash
PS: Another way of setting and resetting individual bits is to use bit fields. Perhaps they might be more in tune with what you want?
|
|
|
|
|
int blo=0;
for(int i=0; i< New.GetLength(); i++ )
{
if(isalpha(New.GetAt(i)))
{
blo |=0x1000;
if(isupper(New.GetAt(i)))
blo |= 0x100;
else
blo |=0x10;
}
}
if i try it with Blood what will give me is 4352 or what i need is 1100 (1000 for being an alpha and 100 for being uppercase¨.
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|
|
Blood_HaZaRd wrote: if i try it with Blood what will give me is 4352 or what i need is 1100...
You are confusing base-10 with base-16.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
So are you trying to get a count of the number of alpha characters, the number of uppercase and the number of lowercase and encode them into a set of decimal digits?
|
|
|
|