|
I can certainly give this a try! Thanks for the reply!
-Will
|
|
|
|
|
Sadly, this doesn't work.
I set a breakpoint on the personTable.Requery() line
personTable.m_pDatabase->BeginTrans();
personTable.AddNew();
personTable.m_Name = "Joe";
personTable.Update();
personTable.Requery();
personTable.MoveLast();
personTable.m_pDatabase->CommitTrans();
I then ran another instance of the program to let it run to completion first, so I ended up with the imageTable.PersonId == 2 for both rows in the imageTable. Thanks for your time!
-Will
|
|
|
|
|
Few months back i had asked about how to disable USB ports thru vc++.
and i got replies saying disable it through registry.
one thing i forgot to ask.
if i disable the USB post through registry then will windows still recognise the USB ports??
and will it still send some power to it?
and is there any way to control the power to it?
basically m making a project on power management.
can someone help me out with it?
i need help on accessing BIOS from windows...
|
|
|
|
|
|
hey i jus saw the article
but this is want i dont like:
"DICS_DISABLE
Disables the device. If the device can be disabled but this function cannot disable the device dynamically, this function marks the device to be disabled the next time the machine reboots. "
i need to disable the USB port thru my prog and then enable it again without restarting the comp.
|
|
|
|
|
Hi,
I'd expect power saving to be apply to most devices, not just USB, so it's quite possible there is an API to do this. Just as the setup API I mentioned provided what I needed. In a quick search on MSDN I found http://msdn.microsoft.com/en-us/library/aa387973(VS.85).aspx. This starts off: "The CIM_PowerSupply class represents the capabilities and management of the power supply logical device.". I don't know if this applies to USB but this could be where you need to start researching.
|
|
|
|
|
hey thank you so much.
I'll search on that page for more info.Really thanks a lot for that link.Contains exactly what i need.
|
|
|
|
|
I want to show the icon with each record(row) in listview . I am using listview as recordview . how it is possible.
Trioum
|
|
|
|
|
Create an imagelist (CImageList).
Add icons to the imagelist.
Attach it to the listctrl.
While inserting items pass the index of the icon in the imagelist to the insert function.
|
|
|
|
|
Check out this tutorial[^]. It describes about everything about listctrl which includes how to add images in report view.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
I need something similar to MSWord's "Type Your Title Here" or "[Type the document title]" thing in the view, so that the user can do in-place editing of the doc's title. How to start on this?
Please suggest.
Thanks
Ronnie.
|
|
|
|
|
Where is this at?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
This is still at start
I have this idea..
I will draw the text "Type Title Here" at the top of doc.
When user clicks on this text I will show a rectangle surrounding the text and a cursor at that position.
User types the title, I'll accept the input character by character and display it. As soon as the user clicks outside the rectangle I will hide the rectangle.
Should I go on with this? or
Have a better idea?
Please suggest.
Thanks
Ron
|
|
|
|
|
Hi All,
I am trying to open a web page using the following code.
ShellExecute(this->m_hWnd, _T("open"), _T("www.xyz.com"), NULL, NULL, SW_SHOWNORMAL);
It works well.
Consider,
Default browser is Mozilla Firefox.
An instance of the Mozilla Firefox is running with some tabs open in it.
The above code will open a new tab (www.xyz.com) in the existing instance.
Now what i want is to open my web page with new instance.
Thanks & Regards,
K. Sushilkumar.
|
|
|
|
|
You will have to retrieve the path to the default browser and directly execute it, passing in the URL as a parameter.
ShellExecute(this->m_hWnd, _T("open"), pathToBrowser, _T("www.xyz.com"), NULL, SW_SHOWNORMAL);
|
|
|
|
|
Hi,
This ShellExecute documentation[^] states:
If the default Web browser currently runs, ShellExecute tells the instance that runs to go to your Uniform Resource Locator (URL). If it is not running, ShellExecute starts the application and then browses to your URL.
Looks like the default behavior. You may need to use CreateProcess[^] instead.
Best Wishes,
-David Delaune
|
|
|
|
|
below code will open in new instance
ShellExecute(this->m_hWnd, _T("open"), _T("firefox.exe"), _T("www.google.com"), NULL, SW_SHOWNORMAL);
or
ShellExecute(this->m_hWnd, _T("open"), _T("iexplore.exe"), _T("www.google.com"), NULL, SW_SHOWNORMAL);
|
|
|
|
|
K. Sushilkumar wrote: The above code will open a new tab (www.xyz.com) in the existing instance K. Sushilkumar wrote: Now what i want is to open my web page with new instance.
Firefox decides (depending on the options you select in Firefox) where a URL should be opened. Your program has no way of altering that.
|
|
|
|
|
I have created a push button in a Toolbar. I want to add image to this button.How can i do this.
|
|
|
|
|
Did you see CToolBar::LoadBitmap?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
I want to add for a particular button
|
|
|
|
|
Source code:
CButton btn;
btn.Create("TEST",WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON,rect,m_ToolBar,ID_BTN);
m_ToolBar.SetButtonInfo(21, ID_BTN, TBBS_PUSHBUTTON, IDB_CANCEL);
|
|
|
|
|
Is it possible to add image
|
|
|
|
|
I suggest you to look in here[^]
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
if ((nFlags & MK_LBUTTON) && (this == GetCapture()))
{
m_SecondPoint = point;
if (m_pTempElement)
{
m_pTempElement->Draw(&aDC);
delete m_pTempElement;
m_pTempElement = 0;
}
m_pTempElement = CreateElement();
m_pTempElement->Draw(&aDC);
}
This is a code of a message handler in a drawing application which now supports drawing lines, rectangles and circles.
We save the first cursor position in the Mouse button down handler
The CreateElement() creates an element (rectangle, circle, line, curve) on the heap and returns a pointer to it.
I don't understand why do we need to redraw the old element. Like I created an element and then a mouse move occurs then why do we draw it two times? First, in the inner if block and second, after the if block.
It is drawing over the previously drawn element in the inner if block right?
|
|
|
|