Click here to Skip to main content
15,921,250 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Execute a *.exe inside my application Pin
vcplusplus19-Oct-04 8:12
vcplusplus19-Oct-04 8:12 
GeneralRe: Execute a *.exe inside my application Pin
illidan9920-Oct-04 1:26
illidan9920-Oct-04 1:26 
GeneralComboboxes in WINAPI Pin
Ibana19-Oct-04 5:59
Ibana19-Oct-04 5:59 
GeneralRe: Comboboxes in WINAPI Pin
Tom Wright19-Oct-04 6:13
Tom Wright19-Oct-04 6:13 
GeneralRe: Comboboxes in WINAPI Pin
Ibana20-Oct-04 3:43
Ibana20-Oct-04 3:43 
GeneralRe: Comboboxes in WINAPI Pin
Tom Wright20-Oct-04 4:31
Tom Wright20-Oct-04 4:31 
GeneralRe: Comboboxes in WINAPI Pin
Ibana20-Oct-04 5:33
Ibana20-Oct-04 5:33 
GeneralRe: Comboboxes in WINAPI Pin
normanS20-Oct-04 4:17
normanS20-Oct-04 4:17 
I found an article in MSDN - in the "books" or "partial books", maybe?

In my application I have a combo-box which allows selection of recording Primary or Secondary or both (this explains the names used in the code below!)

In my main window procedure, I use simething like:

case WM_COMMAND:<br />
	switch(wParam & 0xFFFF) // Extract the low-order word<br />
	{<br />
		case ID_ToolbarRecordCombo:<br />
			if (HIWORD(wParam) == CBN_CLOSEUP)<br />
			{<br />
				iComboBoxSelection = SendMessage(hWndRecordCombo,<br />
					CB_GETCURSEL, 0, 0);<br />
				// iComboBoxSelection values are an index based on<br />
				// the order in which the strings are added in the <br />
				// DrawToolbar function, i.e. Prim then Sec then Both.<br />
				// If the selection has changed then change the source.<br />
				if (iComboBoxSelection == 0 && <br />
					recordingSelection != RecordPrimary)<br />
				{<br />
					recordingSelection = RecordPrimary;<br />
					break;<br />
				}<br />
				else if (iComboBoxSelection == 1 && <br />
					recordingSelection != RecordSecondary)<br />
				{<br />
					recordingSelection = RecordSecondary;<br />
					break;<br />
				}<br />
				else if (iComboBoxSelection == 2 && <br />
					recordingSelection != RecordBoth)<br />
				{<br />
					recordingSelection = RecordBoth;<br />
					break;<br />
				}<br />
				// If the selection has not changed, do nothing!<br />
			}<br />
			else<br />
				return(DefWindowProc(hwnd, message, wParam, lParam));


I hope this helps!
GeneralRe: Comboboxes in WINAPI Pin
Ibana20-Oct-04 6:07
Ibana20-Oct-04 6:07 
GeneralRe: Comboboxes in WINAPI Pin
Ibana20-Oct-04 6:31
Ibana20-Oct-04 6:31 
QuestionWhat data access is better and easier Pin
Tom Wright19-Oct-04 5:46
Tom Wright19-Oct-04 5:46 
AnswerRe: What data access is better and easier Pin
Nemanja Trifunovic19-Oct-04 6:46
Nemanja Trifunovic19-Oct-04 6:46 
AnswerRe: What data access is better and easier Pin
David Crow19-Oct-04 8:34
David Crow19-Oct-04 8:34 
GeneralRe: What data access is better and easier Pin
Tom Wright19-Oct-04 8:47
Tom Wright19-Oct-04 8:47 
Generalstarting mode Pin
Jenie_net19-Oct-04 5:28
Jenie_net19-Oct-04 5:28 
GeneralRe: starting mode Pin
David Crow19-Oct-04 8:11
David Crow19-Oct-04 8:11 
GeneralRe: starting mode Pin
Jenie_net19-Oct-04 11:31
Jenie_net19-Oct-04 11:31 
GeneralRe: starting mode Pin
David Crow20-Oct-04 3:06
David Crow20-Oct-04 3:06 
GeneralWireless signal strength and C++ Pin
zoid ! 19-Oct-04 5:26
zoid ! 19-Oct-04 5:26 
GeneralRe: Wireless signal strength and C++ Pin
psn19-Oct-04 7:13
psn19-Oct-04 7:13 
GeneralRe: Wireless signal strength and C++ Pin
zoid ! 19-Oct-04 8:20
zoid ! 19-Oct-04 8:20 
GeneralRe: Wireless signal strength and C++ Pin
crazy1dude19-Oct-04 9:18
crazy1dude19-Oct-04 9:18 
Generaltutorials Pin
tmoss19-Oct-04 5:10
tmoss19-Oct-04 5:10 
GeneralRe: tutorials Pin
David Crow19-Oct-04 8:10
David Crow19-Oct-04 8:10 
GeneralMemory leak.. Pin
RobJones19-Oct-04 4:13
RobJones19-Oct-04 4:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.