|
Hari_16 wrote: where i can make the application hang
I am not sure why you want to hang your own thread but this should work:
SuspendThread(GetCurrentThread());
Best Wishes,
-David Delaune
|
|
|
|
|
|
Dear friends,
When I draw a simple cube, in a DXUT empty project (which can be found in DirectX Sample Browser), the cube becomes transparent. all sides of the cube are visible. I like to have a concrete cube. I'm exhausted. How can I do that?
|
|
|
|
|
Hello,
How to change the background color of the dropdown list in combo box.
I changed the back ground color of dialog box in OnCtlColor() method, this changed the color of all the items on the dialog.
I could individual controls color but not able to change the dropdown list color of combo box.
Below is the code snippet.
if(pWnd->GetDlgCtrlID() == IDC_COMBO1)
{
HBRUSH g_bkcolor = CreateSolidBrush(RGB(255,255,255));
pDC->SetTextColor(RGB(0,0,0));
pDC->SetBkColor (RGB(255,255,255));
hbr = g_bkcolor;
return hbr;
}
If someone knows how to change the color please let me know.. Thank You..
|
|
|
|
|
1.Derive the Combo box class
2.Overide the WM_CREATE message
i.e CBS_OWNERDRAWFIXED in Create function
3. Handel the DrawItem function of Combobox
Here
a. Fill the Item's rectabgle with the color you wanted to show as background
b. Then drawtext on top of it.
I think this much clue is sufficient.
|
|
|
|
|
Thanks for the reply.
I am not that expect in MFC to get it.
Could you explain it with an example?
Than you once again..
|
|
|
|
|
Using colors in CEdit and CStatic[^]
This article will help you to understand how to create the custom control according to requirement. After understanding those start working on your combo box.
|
|
|
|
|
Hello Friends
I am using setWindowLong with parameters like:
HWND colorpickerHwnd= bmap->GetWindow();
WNDPROC wpOrigPPProc15 = (WNDPROC) SetWindowLong(colorpickerHwnd,
GWL_WNDPROC, (LONG) PPSubclassProc15);
and the Window Procedure is
LRESULT CALLBACK PPSubclassProc15(
HWND hwnd,
UINT uMsg,
WPARAM wParam,
LPARAM lParam)
{
if(uMsg == WM_LBUTTONDOWN)
{
}
return CallWindowProc(wpOrigPPProc15, hwnd, uMsg,
wParam, lParam);
}
Now,the Problem is that It is going to that Window procedure but not recieving any messages(like mouse click and move etc)
Am I missing Something?
please suggest me something.
Thanks
Yogesh
|
|
|
|
|
yogeshs wrote: Now,the Problem is that It is going to that Window procedure but not recieving any messages(like mouse click and move etc)
This does not really make sense; if it is calling the windows procedure then it must be sending messages to it.
What is 'bmap' and where does it sit in the zorder of your windows? Are you sure it has the focus at the time that you are trying to use the mouse on it?
|
|
|
|
|
bmap is object of BitMap.
Actually I change from vs 2002 to vs 2008.In 2002 it was working but after conversion it is behaving like this.
|
|
|
|
|
As I think Problem in getting handle of BitMap.
Beacuse now we are getting like this:
Bitmap *bmap;
BitmapInfo* bi = new BitmapInfo(mybmt->GetMapName());
BMMRES stat;
bmap = TheManager->Load(bi, &stat);
bmap->Display("", BMM_CN, FALSE, TRUE);
colorpickerHwnd = bmap->GetWindow();
Now,whenever I click on border of that window only then it is going inside of WM_LBUTTONDOWN but when i click Inside of the Window means on Bitmap then No response.
Is any problem in getting handle to that Bitmap?
thanks
|
|
|
|
|
Hi All,
I have to place a combobox in a column of MS flexigrid control.
Please help me...
Thanks in advance.
|
|
|
|
|
OnClick Event on cell you should
Get the Cell Client Rectangle
Create your Dynamic Combo box by passing the ClientRect
Delete the combo box once you finish.
modified on Tuesday, November 3, 2009 7:03 AM
|
|
|
|
|
Thakyou ,Can u give an example please......
|
|
|
|
|
Hello All,
I have developed an Executable in MFC which runs different instances for different number of users. Every thing works fine untill I am running that executable with account which is part of 'Administrators' group. but when I try to start it from a normal user with limited rights and even after giving the folder rights to be accessed by 'everyone' , the executable comes into action for a second and dissapears , also it is not making any log for the time duration it comes into picture . Can some body suggest me what must be happening .As I am totally sytuck here and have no idea as to what is happening
Kushagra
|
|
|
|
|
the admin-exe process has higher rights than the user-exe process so it got killed of course some security issues...
Vista or W7 ?
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
The thing is that this is not getting executed even for restricted users in Windows XP and Windows 2003 , I am not able to find our why .
|
|
|
|
|
Kushagra Tiwari wrote: .As I am totally sytuck here and have no idea as to what is happening
Use the debugger to step into the code?
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Finally I got the clue .. using restricted user failed to open certain registry sections in read-write mode... Sometimes u even forget that u always have debugger to help you out .thanks for help.
Kushagra
|
|
|
|
|
Kushagra Tiwari wrote: Finally I got the clue .. using restricted user failed to open certain registry sections in read-write mode... Sometimes u even forget that u always have debugger to help you out. thanks for help.
You're welcome. Always remember the debugger. No, really.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
some tipps
- use of functions or dlls which arent supported in xp
- check whether the manifest or linker settings require admins rights
- debug in user mode
- take out functionality up till it works (that would i do)
The hard way:
if nothings works, consider making a new and empty porject and than stepwise adding the functionality and proof whether every step is destroying
good luck
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
Hello everybody !
I don't want to read the Text File,because the file is too large.
example , if the text file only have this characters ,like "12356789".
when I user this C++ code ,it will cover the old data.
<br />
FILE *pFile = fopen("1.txt","w");<br />
fseek(pFile,3,SEEK_SET);<br />
fwrite("4",1,strlen("4"),pFile);<br />
fclose(pFile);<br />
How to insert the character '4' into the text file ?
thanks for your reply !
Best Reguards !
|
|
|
|
|
wangningyu wrote: How to insert the character '4' into the text file ?
Create a temporary file and copy contents of 1.txt into this file up to the insertion point. Insert '4' into temporary file. Copy remainder of 1.txt into temporary file. Close both files. Delete 1.txt. Rename temporary file to 1.txt.
Make sense?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
|
Hi; I am stumped on what search terms to use to find information on this without getting far far too many 'false positives'.
My application embeds metadata in files that support embedded metadata. For files that DON'T support embedded metadata, I want to create a "sidecar" file.
There is a feature of Internet Explorer that works like this:
When you save a Webpage from Internet Explorer (in certain circumstances, I'm not sure which) it will create a folder with the same name as the file (without the extension of course) and store all the "assets" associated with the page in that folder. If you attempt to delete the folder of assets, it also deletes the .html file that refers to them... and vice versa.
so, there is some kind of hard-wired relationship between the HTML file and the folder full of assets.
I want to be able to make such a connection between a file that has been tagged, and the metadata that is associated with that file, such that if the file is moved, the metadata will be moved along with it, as an artifact of this OS-level "feature".
Perhaps its not an OS level feature on Windows, and some other jiggery-pokery is involved.
But the best I could come up with is to search terms and phrases like
"Webpage, complete" save from Internet Explorer files joined
and in place of "joined" using terms like "linked", "group" etc.
Can someone provide either a suggestion for the exact functionality I am trying to learn about, perhaps a code fragment that can be used to establish such a connection between a datafile and the metadata "sidecar" file?
Thanks in advance
|
|
|
|